[texhax] How equate two macros so that when you redefine one, the other also gets redefined.
Paul Isambert
zappathustra at free.fr
Sun Nov 13 08:30:48 CET 2011
Le 13/11/2011 04:52, Vafa Khalighi a écrit :
> Hi > > My questions is just the title of my question. Say, you have
\me which is defined as: > > \newcommand{\me}{ME} > > now you want to
have an alias macro (say \you) for \me such that whenever you redefine
\you, then \me also gets redefined.
The simplest solution is \def\me{\you}; then \me will always expand to
\you, although technically they don't have the same definition.
Otherwise you have to create a macro to redefine \you, so that \me gets
redefined too:
\long\def\defyou#1#{%
\DEFYOU{#1}%
}
\long\def\DEFYOU#1#2{%
\def\you#1{#2}%
\let\me\you
}
Best,
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20111113/1409c5bd/attachment.html>
More information about the texhax
mailing list