28
Apr
Sometimes it’s very handy if you define your own math operator and have it behave like other
LaTeX math functions (such as \log). Here is an example of how you can do it:
\DeclareMathOperator{\poly}{poly}
Once defined, you can simply write $O(2^k \poly(n))$ instead of $O(2^k \text{poly}(n))$.
Neat eh?