New answers tagged optional-arguments
4
votes
Accepted
Adding optional argument (as exponent) to custom math expressions
You can use a flag value to represent “no value”. In this case, since it's for typesetting, it's pretty safe to use an empty default and test for that:
\newcommand\bigO[2][]%
{\mathcal{O}(#2\if\...
Top 50 recent answers are included
Related Tags
optional-arguments × 445macros × 203
environments × 59
xparse × 49
arguments × 44
conditionals × 29
tikz-pgf × 24
beamer × 15
spacing × 11
lists × 11
theorems × 11
expl3 × 11
listings × 10
enumitem × 9
math-mode × 8
errors × 8
document-classes × 8
expansion × 8
tables × 7
biblatex × 7
floats × 7
package-options × 7
key-value × 7
options × 7
sectioning × 6