[NTG-context] How to extend an existing macro to take optional parameters?
Alan Braslau
alan.braslau at icloud.com
Tue Mar 14 03:08:52 CET 2023
Designating "optional" parameters within [...] is a LaTeX notion.
ConTeXt handles parameters differently.
Alan
> > and I'd like to be able to extend it so that any of the following
> > can be used:
> >
> > \mycommand{aa}{bb}{cc}
> > \mycommand{aa}{bb}{cc}{dd}
> > \mycommand{aa}{bb}{cc}{dd}[ee]
> >
> > or
> >
> > \mycommand[ee]{aa}{bb}{cc}{dd} % if this is more the ConTeXt way
> >
> > where {dd} is the optional extra parameter and, if it is present,
> > then [ee] can also be optionally added (because it controls how
> > {dd} is printed).
More information about the ntg-context
mailing list