Fonts & Character SetsOldstylenums in lmodern?

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
Christos
Posts: 25
Joined: Sun Nov 30, 2008 10:06 pm

Oldstylenums in lmodern?

Post by Christos »

Hi,
I was wondering if anyone knows a way to turn oldstylenums in lmodern fonts as a global option (i.e. in the preamble). I do know other fonts that have this option, such as the kpfonts. However, I would like to know if there is a way to do this with the lmodern ones, probably, by renewing a command that I'm not aware of.
Thanks

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

Oldstylenums in lmodern?

Post by phi »

Unfortunately, this is not possible. Because of some historical quirk that was inherited from the Computer Modern fonts, the Latin Modern fonts contain the text figures in the math italic font. Enabling text figures globally would imply using the math italic font for the whole document, with disastrous results. Consider this simple example:

Code: Select all

\documentclass{article}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\begin{document}
\oldstylenums{abc ABC 123 \% \& - . ,}
\end{document}
Nothing but the digits appears right.
Christos
Posts: 25
Joined: Sun Nov 30, 2008 10:06 pm

Re: Oldstylenums in lmodern?

Post by Christos »

Phi,
thanks for your reply. Yeap, I agree with you. Although I tested many ways to make it work, I gave it up. Kpfonts seem to work better, though, unfortunately I get a number of LaTeX warnings concerning the shape.
Keta
Posts: 63
Joined: Tue Nov 25, 2008 1:00 pm

Oldstylenums in lmodern?

Post by Keta »

What about the eco package? Never tested it, but you might give it a try.
Christos
Posts: 25
Joined: Sun Nov 30, 2008 10:06 pm

Re: Oldstylenums in lmodern?

Post by Christos »

Keta,
nice idea. I've tried it already, but it seems that some font characteristics are changed, glyphs etc. Thanks anyway
Post Reply