I'm having problems making a normalizer command that can nest. Here is my code so far:
\documentclass{article}
\newcommand{\nrml}[2][]{N_{#1}(#2)}
\begin{document}
$\nrml[\nrml{H}]{J}$
\end{document}
which works fine, but when I try $\nrml[\nrml[G]{H}]{J}$
I get a bunch of error codes, the first one being ``Argument of \nrml has an extra }.'' How can I fix this?
Edit: originally posted incorrect code, fixed.
Edit 2: It looks like $\nrml[{\nrml[G]{H}}]{J}$
does what I'm trying to do, but it seems pretty ridiculous that I would need to surround an argument that's already indicated by square brackets by braces, and that is something I would like to avoid.