I defined a macro for the supremum norm by
\DeclarePairedDelimiter{\supnorm}{\|}{\|_\infty}
which works nicely. However, as soon as I want to place a superscript like
\supnorm{f}^2
things look funny, as the 2 appears after the infty-sign. However, I would like to look things more like what you get by
\|f\|_\infty^2
Of course, one can achieve this by using
\newcommand{\supnorm}[1]{\|#1\|_\infty}
but then one looses the nice functionality of \DeclarePairedDelimiter, which I really started to like a lot. Any ideas how one can combine the benefits of both?
Best Answer
Update:
Now with all the options provided by
\DeclarePairedDelimiter
! See the new definition (without usingxparse
):For example, the following code:
will give you: