3

How do I achieve a proper uppercase including chemical formulas typeset with mhchem, i.e. everything but chemical formulas are capital letters?

MWE:

\documentclass{minimal}

\RequirePackage[paperwidth=70mm, paperheight=20mm, left=10pt, top=20pt]{geometry}%

\RequirePackage[version=3]{mhchem}

\begin{document}
\MakeUppercase{Preparation of \ce{Mn3Ga}.}
\end{document}

output:

incorrect example output

which produces MN and GA instead of Mn and Ga, respectively. Please note that I do not want to use $...$ (cp. this question) and \MakeTextUppercase from the textcase package, but the mhchem package and \ce{...}.

8

The textcase package provides a version of uppercase that is more careful about these things

\documentclass{minimal}

\usepackage[paperwidth=70mm, paperheight=20mm, left=10pt, top=20pt]{geometry}%

\usepackage{textcase}

\usepackage[version=3]{mhchem}

\begin{document}
\MakeTextUppercase{Preparation of \NoCaseChange{\ce{Mn3Ga}}.}
\end{document}

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.