[NTG-context] definesynonyms

Aditya Mahajan adityam at umich.edu
Thu Jul 27 07:54:46 CEST 2006


On Mon, 24 Jul 2006, Bernd Militzer wrote:

> Thanks a Taco!
>
> with PID[268]%
>                      ^
> [Fam=Rudolph,
>         Nam=Rudluffen,
>         Vor=Adam]
>

You can also do

\def\PID[#1]#2[#3]{\getparameters[PID#1][#3]}
% #2 is to gobble spaces

\def\doGetPID#1#2{\getvalue{PID#2#1}}

\def\getPID#1{\doGetPID{Fam}{#1}, \doGetPID{Vor}{#1}~(#1)}

with this both
\PID[268]
     [Fam=Rudolph,
      Nam=Rudluffen,
      Vor=Adam]

and

\PID[268][Fam=Rudolph,Nam=Rudluffen,Vor=Adam]

work.

Aditya


More information about the ntg-context mailing list