TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I achieve lining figures with mhchem while maintaining text figures in the text (lualatex).

My MWE is:


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

\setmainfont[Ligatures=TeX, Numbers=OldStyle]{Tex Gyre Pagella}%
%\setmainfont[Ligatures=TeX]{Tex Gyre Pagella}%


Chemical formula: \ce{Al2O3}

which produces

text figure example

but the desired output is (and as far as I am concerned should be)

desired chemical formula

share|improve this question
up vote 11 down vote accepted



inside your document. But: I have never used that package, so I don't know if there is a better way.

share|improve this answer

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.