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.
\documentclass{article}
\begin{document}
\MakeUppercase{abc $n$}
\end{document}
The following works for individual characters, but I would like something more general.
\documentclass{article}
\begin{document}
\newcount\mycount
\mycount\mathcode`n
\MakeUppercase{abc $\mathchar\mycount$}
\end{document}

textcasepackage, AFAIK it has a\MakeUppercaseTextmacro – daleif Mar 02 '12 at 16:35\MakeUppercaseto section headings. I need to prevent the existing command from affecting mathematics. – Ian Thompson Mar 02 '12 at 16:44\MakeUppercasethen? – Werner Mar 02 '12 at 16:47\MakeUppercasefrom changing mathematics, similar to the use of braces to preventBIBTeXfrom changing the case of letters. Failing that, your suggestion of\let\MakeUppercas\MakeTextUppercaselooks like a good alternative. – Ian Thompson Mar 02 '12 at 17:04