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 using kpfonts in my document with old style numbers. However, in some sections (e.g. figures and tables), I want to revert to the normal style numbers. There is a command for doing that - \classicstylenums - but the text has to be given as an argument, like so: \classicstylenums{text text text text} Instead of having to repeat the command for each text segment, I want to declare it once, like so: \myclassicstylenums text text text ... And by doing it within a group, the text reverts back to old style numbers.

Anyone has any idea on how to achieve this?

share|improve this question
up vote 3 down vote accepted

You can revert to lined numbers by defining


This is a declaration that will respect grouping; so, for example, you can put it inside a table environment.

You can also use it as an environment by itself:

Material with lined numbers

but it's best to use it for complete paragraphs.

If one is devious enough to use the fulloldstylenums option, then something more is needed:

share|improve this answer
I've noticed that this doesn't work for math mode. Could you augment your answer to include that as well? – gablin Jan 30 '12 at 13:41
@gablin See edited message; I wouldn't use fulloldstylenums except for reproducing very old books (but I don't think that the Kp fonts are suitable for this). – egreg Jan 30 '12 at 14:14
Ah damn, didn't realize that kpfonts had two separate options for old style numbers. That solved my problem! Thanks! – gablin Jan 31 '12 at 8:01

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.