Is there a way to prevent \MakeUppercase from affecting in-text equations? In this example, abc should change to ABC, but n should be left as it is.

\MakeUppercase{abc $n$}

The following works for individual characters, but I would like something more general.

\MakeUppercase{abc $\mathchar\mycount$}
  • 1
    try the textcase package, AFAIK it has a \MakeUppercaseText macro – daleif Mar 2 '12 at 16:35
  • Unfortunately that's not an option. This problem arises from a journal document class applying \MakeUppercase to section headings. I need to prevent the existing command from affecting mathematics. – Ian Thompson Mar 2 '12 at 16:44
  • So you want to modify \MakeUppercase then? – Werner Mar 2 '12 at 16:47
  • @Werner --- I thought there might be some way to prevent \MakeUppercase from changing mathematics, similar to the use of braces to prevent BIBTeX from changing the case of letters. Failing that, your suggestion of \let\MakeUppercas\MakeTextUppercase looks like a good alternative. – Ian Thompson Mar 2 '12 at 17:04

The textcase package was already mentioned. But if you are forced to stay with an unchanged \MakeUppercasefor some reason then you still have the poor man's choice of "hiding" the math:

\MakeUppercase{abc \protect\hidemath}

The \protect is needed as \MakeUppercase in LaTeX is essentially an \edef that only stops expanding at \protect.

Or the alternative with eTeX which has protection at the macro definition level:

\MakeUppercase{abc \hiddenmath}
|improve this answer|||||
  • I think the 'poor man's' choice is the best option here. I need this for a journal article, and the publishers may view redefining \MakeUppercase as hacking their class file. – Ian Thompson Mar 3 '12 at 10:48

textcase provides \MakeTextUppercase:

enter image description here

\usepackage{textcase}% http://ctan.org/pkg/textcase
\MakeUppercase{abc $n$} \par
\MakeTextUppercase{abc $n$}

For easy modification across the entire document, I suggest issuing

\usepackage[overload]{textcase}% http://ctan.org/pkg/textcase

which "overloads" both \MakeUppercase and \MakeLowercase with \MakeTextUppercase and \MakeTextLowercase, respectively. Similar to


Apparently the AMS document classes also provide this functionality - a math-aware \MakeUppercase using \uppercasenonmath. See @barbarabeeton's answer to Stop memoir from making mathmode section names uppercase in header.

|improve this answer|||||

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.