Difference between revisions of "Commands with optional arguments"
Jump to navigation
Jump to search
(first version) |
(No difference)
|
Revision as of 08:18, 4 August 2004
In LaTeX you define a new command with an optional argument with "newcommand":
\newcommand{\MyCommand}[2][World]{{#2Hello #1!}} \MyCommand{\bfseries} \MyCommand[Hans]{\scshape}
ConTeXt:
There is perhaps a way to do the same. Otherwise, the key value method is preferred, see Define Commands.