↧
Answer by Phelype Oleinik for Adding optional argument (as exponent) to...
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][]%...
View ArticleAdding optional argument (as exponent) to custom math expressions
I want to define a command \bigO where if I type something like \bigO[3]{\epsilon} it gives $\mathcal{O}(\epsilon^3)$, and if I leave out the optional argument and have \bigO{\epsilon} it defaults to...
View Article