TUGboat, Volume 42 (2021), No. 1 41 \NewDocumentCommand versus \newcommand versus ... Joseph Wright Creating new document comman
How to check for optional arguments of macro and modify expansion accordingly? · KaTeX KaTeX · Discussion #3520 · GitHub
![macros - How can I differentiate in \newcommand between an unused optional argument and an empty one? - TeX - LaTeX Stack Exchange macros - How can I differentiate in \newcommand between an unused optional argument and an empty one? - TeX - LaTeX Stack Exchange](https://i.stack.imgur.com/sAxjs.png)
macros - How can I differentiate in \newcommand between an unused optional argument and an empty one? - TeX - LaTeX Stack Exchange
![How to interpret the syntax of \newcommand in latex in comparison with the command it defines - Stack Overflow How to interpret the syntax of \newcommand in latex in comparison with the command it defines - Stack Overflow](https://i.stack.imgur.com/SuFwi.png)
How to interpret the syntax of \newcommand in latex in comparison with the command it defines - Stack Overflow
![macros - naming argument and optional-argument for \def, \newcommand and newenvironment - TeX - LaTeX Stack Exchange macros - naming argument and optional-argument for \def, \newcommand and newenvironment - TeX - LaTeX Stack Exchange](https://i.stack.imgur.com/oA6aL.png)
macros - naming argument and optional-argument for \def, \newcommand and newenvironment - TeX - LaTeX Stack Exchange
![macros - Bugs in conditional structure in a newcommand definition with optional arguments - TeX - LaTeX Stack Exchange macros - Bugs in conditional structure in a newcommand definition with optional arguments - TeX - LaTeX Stack Exchange](https://i.stack.imgur.com/zc6yX.png)