4

There are alternative glyphs for digits, with ascending and descending elements (such that the rounded part of the character is roughly the size of the minuscule "o"), is there a way to get that kind of characters (for decoration purposes, not for use in formulas)?

Here are some images to explain what I mean: https://graphicdesign.stackexchange.com/questions/8360/

  • 1
    \oldstyle{1234567890}; but there are methods for getting them without explicit markup. Can you be more specific? – egreg Nov 28 '14 at 21:23
  • @egreg thanks! Even though that didn't actually work for me, but googling it I found that there's \oldstylenums{} which did work. – wvxvw Nov 28 '14 at 21:28
  • Oh, sorry! I went with memory. – egreg Nov 28 '14 at 21:29
  • To use them without such markup, we need to know your font setup and a minimal working example (MWE) is, therefore, essential. – cfr Nov 28 '14 at 21:39
5

Several fonts families provide the so called “old style numerals”, besides the crude method of enclosing the number as argument to \oldstylenums

For instance, you can load the eco package:

\documentclass{article}
\usepackage{eco}

\begin{document}

Text numbers 123457890

Math numbers $1234567890$

\end{document}

enter image description here

Another font family is Latin Modern via the cfr-lm package:

\documentclass{article}
\usepackage[
  rm={oldstyle,proportional},
  sf={oldstyle,proportional},
  tt={lining,tabular,monowidth},
]{cfr-lm}

\begin{document}

Text numbers 123457890

Math numbers $1234567890$

{\sffamily Sans serif 1234567890}

{\ttfamily Monospaced 1234567890}

\end{document}

enter image description here

Here a combination of Erewhon (an Utopia clone), Cabin for sans serif and Inconsolata for monospaced; note that Cabin has no old style digits.

\documentclass{article}

\usepackage[p,osf,scaled=.98]{erewhon}
\usepackage[varqu,varl]{inconsolata} % typewriter
\usepackage[type1,scaled=.95]{cabin} % sans serif like Gill Sans
\usepackage[utopia,vvarbb,bigdelims]{newtxmath}

\begin{document}

Text numbers 123457890

Math numbers $1234567890$

{\sffamily Sans serif 1234567890}

{\ttfamily Monospaced 1234567890}

\end{document}

enter image description here

There are many more possibilities.

  • Oh, thanks. I use memoir package, and the font used in it looks like Bodoni... I don't know where to find that info to be honest. But to my best knowledge those are just different glyphs, so they have their dedicated codepoints in the character table the font implements. So I'd expect not every font to implement them, but would expect the procedure to be the same for all those which do. – wvxvw Nov 28 '14 at 21:50
  • @wvxvw Your first expectation will be fulfilled, but not your second ;). But your comment makes clear why a minimal working example (MWE) is so important. Note that you can get information about the fonts used from 'Properties' using your PDF viewer or using pdffonts on the command line, at least for GNU/Linux. Of you can look at the console output or log file, or the class documentation. – cfr Nov 29 '14 at 16:33
  • @cfr would you kindly tell me where in the log file it is? I do usually have it handy open in the other buffer, but I'm not sure what to look at? I'm using latexmk with pdflatex to generate a PDF. I'm not sure about a minimal example... I'm not determined to use memoir or any other template, the minimal example would be then a... string of digits? That seems too trivial to me. – wvxvw Nov 29 '14 at 18:23
  • @cfr the Properties in Ocular at least give odd font names, something that looks like BFNCDC+LMRoman10-Regular (and there are about half a dozen of them). I don't think it refers to the part of the "Times New Roman" name, because the actual font doesn't look like Times. This must be the kind of outlines used. – wvxvw Nov 29 '14 at 18:27
  • 2
    @wvxvw That's Latin Modern Roman 10 point. The letters at the start are just because a subset of the font is embedded rather than the whole thing. In that case, cfr-lm is your best bet. [Disclaimer: I wrote it. But I wrote it for pretty much this purpose.] – cfr Nov 29 '14 at 19:08
2

Two more possibilities: If you're interested in using a Times Roman clone, you could issue the commands

\usepackage{newtxtext,newtxmath}
\useosf %% old-style numerals in text mode only

in the preamble. Alternatively, if you're interested in a Palatino clone, the commands to use are

\usepackage{newpxtext,newpxmath}
\useosf %% old-style numerals in text mode only

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.