Saturday, June 26, 2004 Maurice Diamantini dom wrote:
Bonjour à tous,
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.
For exemple, instead of \def\myCommand#9{...} That I should call by \myCommand{param1}{param2}{...} {param9}
Id'like too keep default value for most of the parameters but param7 and write something like:
\myCommand[param7=value7]{body}
It is true, we need a "programming in ConTeXt" manual. It is still possible to 'know' how to do things by looking at the way things are done in ConTeXt itself. For example, in your case you want something like this: \def\myCommand[#1]#2{% \rawgetparameters[myCommand][param1=defaultvalue1,param2=defaultvalue2,#1]% do something with \csname myCommandparam1\endcsname and #2} This is of course very draft, and can be highly tuned and done multilingual, but that's much more complex. -- Giuseppe "Oblomov" Bilotta