[texhax] Macros that define other macros

Uwe Lück uwe.lueck at web.de
Mon Dec 3 16:49:31 CET 2012


Am Montag, den 03.12.2012, 16:18 +0100 schrieb Uwe Lück:
> \newcommand{\setobject}[4]{%
>     \def\objectId{#1}%
>     \@namedef  {propI|#1}{#2}%
>     \@namedef {propII|#1}{#3}%
>     \@namedef{propIII|#1}{#4}}
> 
> This way you could use \objectId to refer to the object's identifier 
> in the second, third, and fourth argument of \setobject, such as 
> 
> \setobject{first}
>           {First property of object `\objectId'}
>           {Second property of object `\objectId'}
>           {Third property of object `\objectId'}

Sorry, this was very wrong with respect to \objectId.

\newcommand{\setobject}[4]{%    
    \@namedef  {propI|#1}{#2}%
    \@namedef {propII|#1}{#3}%
    \@namedef{propIII|#1}{#4}}

would be okay without the \objectId feature, which would mean 
something like that properties do not know whose properties 
they are.

So long ...

    Uwe.





More information about the texhax mailing list