Changes

Jump to navigation Jump to search
State \dosingleempty as well, to avoid confusion.
< [[Inside ConTeXt]] | [[Commands with KeyVal arguments]] >
In ConTeXt, the optional argument processing is handled as a two-step process. First, we write the command for the end-user as a wrapper command, which calls {{cmd|dosingleempty}}, {{cmd|dodoubleempty}} , {{cmd|dotripleempty}}, ... (from {{src|syst-aux.mkiv}} or {{src|syst-gen.mkii}}) to handle the arguments properly -- including the optional ones -- and then calls a "private" command that contains the internals of the macro. Note that this function call does not explicitly refer to the arguments at all.
For a command with two optional arguments, we use:
<texcode>
\def\MyCommand{\dodoubleempty\doMyCommand}
8

edits

Navigation menu