LaTeX: temporarily override quote macro

I'm new to latex, but it looks like you can temporarily override some commands? My problem is that quoting is usually (SMITH, 2000). But sometimes I would like to have Smith (2000). In any case, can I temporarily override it and then use the standard version again after this “block” of code?

+5
source share
2 answers

Include the local definition in braces ({}).

\newcommand\foo{FOO!}
\foo
{\renewcommand\foo{BAR?}\foo\foo}
\foo

This will create something like:

FOO!BAR?BAR? FOO!

This can also be done inside macro definitions - just make sure you add extra curly braces:

\newcommand\newfoo{{\renewcommand\foo{BAR?}\foo}}

Hope this helps.

+6
source

\citep \citet, , , .

+1

All Articles