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

I'm working on a document which is fairly math-heavy, but also contains numbers outside of math mode. I want these numbers to be displayed as old-style/text figures. I also want a Palatino-type font (either mathpazo or tgpagella). Using tgpagella with textcomp gives me text figures, but then math mode is displayed in the regular Computer Modern font. Using mathpazo with the [osf] option gives me text figures everywhere---even in titles, headings, and math mode, where they don't belong. I can't seem to figure out how to mix text and lining figures with Palatino-like math fonts.

share|improve this question
Are you sure that with the [osf] option of mathpazo, you get text figures in math mode? I agree with the fact that you get text figures in titles, but not in math mode. – Bruno Mar 13 '12 at 8:12
With \usepackage[osf]{mathpazo} you certainly get text figures in titles and headers, and certainly not in math mode. If you want lining figures in titles and headers, you should tell more about the document class you're using. – egreg Mar 13 '12 at 9:58

This is a XeLaTeX solution:


% Load mathpazo as a math font

% Load Pagella as a text font by specifying no-math to fontspec
\setmainfont[Numbers=OldStyle]{TeX Gyre Pagella}


Some numbers outside math mode: 1 2 3 4 5

Some numbers in math mode: $1 2 3 4 5$


It works the same for headers (use math-mode if you don't want old-style figures).

Edit: OSF are fine in headers and titles unless you write them in full capital letters (by contrast to roman, bold, italic and small-caps). Automatically putting lining figures there would require quite a bit more work (such as redefining the section headers) and I don't quite think it is worth it – especially since the result would not be typographically correct.

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.