If I define the following two commands:
\newcommand{\TestA}[1][]{a^{#1} aaa}
\newcommand{\TestB}[1][]{#1}
and then call it by
$\TestA[\TestB[111]]$
I get the error:
"Argument of \\TestB has an extra }."
But $\TestB[111]$ and $\TestA[111]$ works...
Is this a bug or am I doing something wrong?
\documentclass...\begin{document}...\end{document}
, it should compile and contain close to the minimal amount of code needed to explain/demonstrate what you are asking. This saves everyone time:)