[NTG-context] Re: High level user macro (howto?)
Patrick Gundlach
ntg-context@ntg.nl
Mon Jun 28 10:49:18 CEST 2004
Bonjour Maurice,
> One thing is missing in context (or not documented in reference manual?)
> is a standard and easy way to build arbitrary parametrised high level
> macros.
what about:
\def\myCommand{\dosingleempty\doMyCommand}
\def\doMyCommand[#1]{%
\getparameters[XYZ][#1]% define your own ``namespace''
\getvalue{XYZtexti}
}
\starttext
\startlines
Hello \myCommand
\setvalue{XYZtexti}{World}
Hello \myCommand
Hello \myCommand[texti=Maurice]
\stoplines
\stoptext
Patrick
--
texshow-web: http://members.ping.de:8061
ConTeXt wiki: http://members.ping.de:8062
More information about the ntg-context
mailing list