0

I found a lots of questions asking how to add a superscript to a variable defined with a superscript but none for how to do it the other way around.

My macro is \newcommand{\trsp}[1]{#1^T} and I want to apply it to e.g. \trsp{M^{-1}}.

How do I avoid a Double Superscript error ?

Tipo
  • 3
  • 1

1 Answers1

1

Use \def\trsp#1{{#1}^T}. The key is to use {#1} instead #1 in the body of the macro. You can use \newcommand too, if you are using LaTeX.

wipet
  • 74,238