Take the 2-minute tour ×
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.

I am using XeLaTeX and the Linux Libertine font to typeset my thesis. I set it up to use old style numerals in the text by:

\setromanfont[Ligatures={Common}, Numbers={OldStyle}]{Linux Libertine O}

Sometimes I use inline math, and these numbers are in Lining format, which looks strange with other numbers in the text (e.g. referring to a figure). I didn't specify a specific math font, if I do so (e.g. \usepackage[oldstylenums]{kpfonts} ), I do get the old style numerals in math mode but the font is not balanced with the text, so I'd like to stick with the default math font, or something that goes well with Linux Libertine. Of course, I can put all numbers outside the $ $, but that just seems like a hack, not something that you're supposed to do.

Am I trying to do something that is typographically incorrect? How do I use old style numerals for math mode?

share|improve this question
Welcome to TeX.SX! You can highlight your code by indenting lines with 4 spaces or putting the text between backquotes as I have done. –  ℝaphink Sep 21 '11 at 13:44
Why don't you keep the kpfonts family as a whole? –  pluton Sep 21 '11 at 14:14
Raphink: Thanks! @Pluton: I'm not sure what you mean; I tried to use the kpfonts package as I indicated but it doesn't look good with the text (a bit too black). –  Ivo Sep 21 '11 at 14:37
My experience with using "oldstyle" figures in math mode is that it's ok to do so if the numerals show up mainly on the baseline of some formula or by themselves in the limits of a sum or integral. However, trouble an arise with an expressions such as $2^{36}$, which can look disquietingly similar to $2^{3^6}$ (because the "3" has a descender and the "6" has an ascender part). Tellingly, in opentype fonts that have numerator- and denominator-style numerals, these are always in "lining" and never in "oldstyle" format, even if the text font has oldstyle numerals. –  Mico Sep 21 '11 at 16:02
there's an article by don knuth in tugboat on "the typesetting of concrete mathematics" that goes into the differences between old-style and lining numerals and reasons for using one or the other (in particular, not using old-style numerals in math). it's a personal opinion, of course, but you may find it interesting. –  barbara beeton Sep 21 '11 at 17:30

1 Answer 1

up vote 2 down vote accepted
\setmainfont[Mapping=tex-text]{Linux Libertine O}
\setmathfont(Digits,Greek,Latin)[Numbers=OldStyle]{Linux Libertine O}



enter image description here

share|improve this answer
After resolving some conflicts with other packages (mathspec seems to behave a bit peculiar with amsmath), it works! Not sure about these strange figures above, though. –  Ivo Sep 21 '11 at 14:52
I had two versions of libertine, that was the problem. Now everything is ok –  Herbert Sep 21 '11 at 15:04
Thanks a lot for your suggestion! –  Ivo Sep 22 '11 at 8:17

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.