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 am using tufte-latex package, which uses mathpazo with old style numerals. To make figures (plots) I would like to use lining numbers. The problem is that the figures are converted from svg to pdf using inkscape and the numbers are not in mathmode (In math mode the numbers are lining numerals by default).

I think of two possible solutions:

a) Is there any command similar to \oldstylenums that does the opposite work?

b) inkscape put the text of the figure in \smash{-22.22} commands. Is any way, using sed, awk, perl,... to change that to \smash{$-22.22}?

share|improve this question
up vote 9 down vote accepted

The tufte classes load mathpazo with the osf option which defines \rmdefault as pplj (real small caps plus oldstyle numbers). To switch to lining numbers for the whole document, you want pplx (real small caps plus lining numbers).






As an alternative, you may define a \liningnums macro to switch to pplx within a group. Note: the additional pair of braces is necessary to keep the font switch local.


    {\fontfamily{pplx}\selectfont #1}}




share|improve this answer
Thanks. For the records, finally I use the following two commands to switch back and forth with old style numerals \newcommand{\liningnums}{% \fontfamily{pplx}\selectfont% } \newcommand{\oldnums}{% \fontfamily{pplj}\selectfont% } – TeXtnik May 18 '12 at 12:33
@zunbeltz Check my answer again - your macros are missing the additional pair of braces, which are necessary for keeping the font switch local. – lockstep May 18 '12 at 12:54
Thanks for your comment, but I need to change the fonts globally while I create the figure. Those command do not have any arguments. – TeXtnik May 18 '12 at 20:18

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.