[tex-eplain] Help on a macro definition needed

Helmut Jarausch jarausch at igpm.rwth-aachen.de
Thu Feb 28 11:17:43 CET 2008


Hi,

I'm trying to define an abbreviation for the sidx macro.

The following does work
\catcode`\@=\active
\newtoks\myreffirstarg
\def @#1|{\myreffirstarg={#1}\myrefoneortwo}
\def \myrefoneortwo{%
   \expandafter\sidx\expandafter{\the\myreffirstarg}%
}

Now, I want to generate something like
\sidx[pagemarkup=myRefPrefix]{mandatory arg}[optional arg]

I have tried several variants of
\catcode`\@=\active
\newtoks\myreffirstarg
\def @#1|{\myreffirstarg={#1}\myrefoneortwo}
\def \myrefoneortwo{%
       \expandafter\expandafter\sidx[pagemarkup=myrefPrefix]\expandafter{\the\myreffirstarg}
}

but had no success.

Many thanks for a hint,
Helmut.
 
-- 
Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany


More information about the tex-eplain mailing list