Sign up ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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$}
share|improve this question
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

2 Answers 2

up vote 9 down vote accepted

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}
share|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

\MakeUppercase{abc $n$} \par
\MakeTextUppercase{abc $n$}

For easy modification across the entire document, I suggest issuing


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.

share|improve this answer
\usepackage[overload]{textcase} does the \let for you –  Frank Mittelbach Mar 2 '12 at 16:55
@FrankMittelbach: Thanks, modified answer to reflect that. –  Werner Mar 2 '12 at 16:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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