LaTeX Optional Arguments
Example from the guide: \newcommand{\example}[2][YYY]{Mandatory arg: #2; Optional arg: #1.} This defines \example to be a command with two arguments, referred to as #1 and #2 in the {<definition>}–nothing new so far. But by adding a second optional argument to this \newcommand (the [YYY]) the first argument (#1) of the newly defined command \example is … Read more