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.

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 Computer Modern font (default) with \oldstylenums command to typeset numbers in oldstyle format. However I am having trouble using it with non-numeric characters such as decimal points and hyphens.

For e.g. decimal points appear as triangles:

Master of Science, Computer Science, \oldstylenums{3.76/4.0}

appears as:

enter image description here

Also, I have trouble with hyphens, etc.

Please suggest remedies.

share|improve this question
I have to point out that it's really easy to get oldstyle numbers with fontspec, meaning with XeTeX and LuaTeX and OpenType fonts (like lmodern). – Martin Schröder Oct 8 '12 at 12:45
up vote 8 down vote accepted

redefines \oldstylenumsto use the 8-bit encoding TS1 instead of the 7-bit math encoding OML.

Extended support

The following example parses the string to replace the digits by the old style variants.




Master of Science, Computer Science, \oldstyle{0-1--2---3; 7, 3.76/4.0}


share|improve this answer
Good things, when short, are twice as good :) – Fran Oct 7 '12 at 2:29
@HeikoOberdiek: Thanks for the suggestion, it solves the decimal point problem, but hyphen is now converted to = symbol. – abhinavkulkarni Oct 7 '12 at 2:30
@abhinavkulkarni, but on the contrary, = is converted to a long hyphen in this way. – Fran Oct 7 '12 at 2:36
@Fran: Thanks. How can I get the short hyphen? – abhinavkulkarni Oct 7 '12 at 2:37
@abhinavkulkarni, I do not know with a single key, but please see the trick of \sout in my answer. It works also with textcomp. – Fran Oct 7 '12 at 2:57

If you want old style figures throughout your document, you have a couple of choices assuming you still want to use the Computer Modern fonts or variations thereof.

Package eco


Package cfr-lm


The second package uses the Latin Modern fonts, which are very similar to Computer Modern; the first one uses a set of virtual fonts based on European Modern, again a variation of Computer Modern. I'd favor the latter.

share|improve this answer

I suppose that the best practice would be to leave out characters other than digits.

However, I could be a little messy, but you can obtain decimal points (mid point or down point), hyphens and fractions inside \oldstylenums in this way:

\usepackage{ulem} % needed for \sout{}
\oldstylenums{3·76=4·0 \sout{~} 3:76=4:0}

Another less tangled solution could be to define a newcommand for use \oldstylenums of another font that allow the use of normal characters inside the command:

\newcommand{\oldnum}[1]{{\fontfamily{artemisia}\scshape #1}}

\oldnum{3·76/4·0 - 3.76/4.0}

Note that in this case in there are text inside \oldnum, it appear as small caps instead of italics.


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.