0

I am making a presentation and I need to use the following expression quite a lot, so I made the following new command

\newcommand{\extreig}[1][\lambda]{\ensuremath{{#1}_{\mbox{{\footnotesize extr}}}(\omega)}}

So when I use the command $\extreig{\mu}$, I expect to get $\mu_{\mbox{{\footnotesize extr}}}(\omega)$ (why is on the forum not a latex-editor?), the strange thing is that I get $\lambda_{\mbox{{\footnotesize extr}}\mu$.

If I instead use the command \newcommand without a default parameter, so \newcommand{\extreig}[1]{\ensuremath{{#1}_{\mbox{{\footnotesize extr}}}(\omega)}} then I shows it correctly.

How is this possible?

  • 3
    You have specified that \extreig takes an optional argument so should write \extreigh[\mu] with square brackets. – Andrew Swann Jan 15 '18 at 10:52
  • 3
    rather than _{\mbox{{\footnotesize extr}} it would be better to use _{\mathrm{extr}} and then sizing is automatic, even if the expression appears in a subscript – David Carlisle Jan 15 '18 at 10:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.