Linked Questions
37 questions linked to/from Can I redefine a command to contain itself?
35
votes
2
answers
6k
views
How to redefine a command properly to avoid recursive call to itself? [duplicate]
I'm trying to renew a command in terms of its old definition... something similar to this:
\renewcommand{\vec}[1]{\vec{\mathbf{#1}}}
But this seems to send the interpreter in an infinite loop. How do ...
5
votes
1
answer
4k
views
Redefine a built-in math command [duplicate]
Possible Duplicate:
Can I redefine a command to contain itself?
I'm trying to redefine the \int command so that it will always do \int \!. So here's my attempt at that:
\renewcommand{\int}{\int \!...
6
votes
1
answer
3k
views
Redefine macro in terms of old one [duplicate]
Possible Duplicate:
Can I redefine a command to contain itself?
How can I redefine the same macro that uses the original macro?
\newcommand{\macro}{zzz}
\renewcommand{\macro}{xyz\macro}
(this ...
6
votes
1
answer
522
views
Simple macro for new # symbol [duplicate]
I was unsatisfied with how the # symbol looked in my document and had a look at this question. I tried to create a simple macro to replace
#
with
\texttt{\#}
I thought that a simple
\renewcommand{...
0
votes
1
answer
873
views
How to set default footnote linespacing? [duplicate]
How to set default footnote linespacing? Now for each footnote I have to write
\footnote{\onehalfspacing ...}
But I would like to set the line spacing once.
I guess its possible to use \renewcommand{...
1
vote
0
answers
131
views
can't renew math command '\exp', why? [duplicate]
In the preamble of the main.tex file I've written \renewcommand{\exp}[1]{ \exp \left( {#1} \right) } so that the math function \exp automatically includes the round brackets. In the file I wrote ...
0
votes
0
answers
48
views
How to redefine \alpha as a command that takes parameters in Latex? [duplicate]
So, I've been trying to renewcommand \alpha by assigning it parameters in Latex. This is what I have for my preamble and the body...(seen below). On line 12, I attempted to create such a "function", ...
0
votes
0
answers
37
views
LaTeX Never Finishes Compiling After Renewing a Command [duplicate]
I have a document that frequently uses the \vec command from the amsmath package. I decided I wanted to make all the vectors boldfaced, so I added the following \renewcommand:
\renewcommand{\vec}[1]{\...
102
votes
10
answers
16k
views
Where do I find out how a command/environment is defined?
Say I want to redefine the itemize environment, or make a modified version of it. I want to know how it is currently defined. Where do I find this information? If it's some particular package command, ...
89
votes
1
answer
5k
views
When to use \LetLtxMacro?
Frequently I see users redefine macros using (for example)
\let\oldmacro\macro% Store \macro in \oldmacro
\renewcommand{\macro}{%
% ...redefined \macro
\oldmacro%
}
and other times they use
\...
21
votes
6
answers
10k
views
Align denominator of fraction to left
The highlighted part has the equation centred, which looks rather imbalance with the top equation, is it possible to align the highlighted part to the left?
Below is the code I am using.
\begin{...
23
votes
2
answers
3k
views
How to see which package define a particular command/macro?
We often encounter multiple definitions of certain commands/macros. Then, we often get the error, e.g.:
! LaTeX Error: Command \P already defined.
Or name \end... illegal, see p.192 of ...
7
votes
4
answers
4k
views
marginpar text alignment
I'm currently using the book class and I'm using marginpar to cite sources. I would like the marginpar on right pages to be aligned left and the marginpar on left pages to be aligned right. Is there ...
8
votes
2
answers
1k
views
Environment decorators
I'm looking for a way to write a "decorator" (in Python terminology) or a "wrapper" for LaTeX environments: a way to give addition behaviour with save of the notation. For example, before every \begin{...
5
votes
3
answers
16k
views
Using the basic \approx symbol with MnSymbol
I want to use MnSymbol (to get various sorts of down arrows), but I don't like its \approx symbol. I'd like to use the basic one instead. I've tried using savesym (as below), but this still outputs ...