Take the 2-minute tour ×
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.

I am using the Linux Libertine font for my document. The font provides different numeral sets, "normal" numbers which are all the same height, and medieval/minuscle numbers with varying height.

enter image description here

By default, LaTeX uses the normal numbers but I prefer the look of the medieval numbers.

How can I tell LaTeX which numeral set to use?

P.S.: I am using LuaLaTeX

share|improve this question
add comment

3 Answers 3

up vote 11 down vote accepted

In LuaLaTeX and XeLaTeX you can specifiy font features with the fontspec package.

The Numbers/RawFeature features are

  • Lining and Uppercase/lnum: normal/majuscule figures
  • OldStyle and Lowercase/onum: medieval/minuscule figures
  • Proportional/pnum
  • Monospaced/tnum (t stands for tabular)
  • SlashedZero/zero: gives slashed 0

You can activate these features with either

\addfontfeatures{Numbers={OldStyle,Proportional}}

or

\addfontfeatures{RawFeature=+onum;+pnum}

If you use the libertineotf package (which also provides shortcuts to change these settings in-document, cf the package manual), you can give these arguments directly as package options:

\usepackage[
    libertine={Ligatures=TeX,RawFeature=+onum;+pnum},
     biolinum={Ligatures=TeX,RawFeature=+onum;+pnum},
         mono={Scale=MatchLowercase,RawFeature=+zero}]
    {libertineotf} 

If you don't you can still set the options directly when specifying the fonts:

\setmainfont[RawFeature=+onum;+pnum]{Linux Libertine O}
\setsansfont[RawFeature=+onum;+pnum]{Linux Biolinum O}

Here is an exemplary code:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Linux Libertine O}
\def\numbers{0123456789}
\begin{document}
    \begin{tabular}{lrrr}
        \textbf{Normal Zero} &                                              Monospaced &                                              Proportional &  \\
        Lining               &   \addfontfeatures{Numbers={Lining,Monospaced}}\numbers &  \addfontfeatures{Numbers={Lining,Proportional}} \numbers &  \\
        OldStyle             & \addfontfeatures{Numbers={OldStyle,Monospaced}}\numbers & \addfontfeatures{Numbers={OldStyle,Proportional}}\numbers &  \\
    \end{tabular}

    \vspace{1ex}
    \addfontfeatures{Numbers=SlashedZero}
    \begin{tabular}{lrrr}
        \textbf{Slashed Zero} &                                              Monospaced &                                              Proportional &  \\
        Lining                &   \addfontfeatures{Numbers={Lining,Monospaced}}\numbers &  \addfontfeatures{Numbers={Lining,Proportional}} \numbers &  \\
        OldStyle              & \addfontfeatures{Numbers={OldStyle,Monospaced}}\numbers & \addfontfeatures{Numbers={OldStyle,Proportional}}\numbers &  \\
    \end{tabular}
\end{document}

enter image description here

share|improve this answer
add comment

Use Numbers=OldStyle:

\setmainfont[Numbers={OldStyle}]{Linux Libertine O}

From fontspec's doc, table 4:

 Feature         Option             Tag

 Numbers =      Uppercase/Lining     lnum
                Lowercase/OldStyle   onum
                Proportional         pnum
                Monospaced           tnum
                SlashedZero          zero
                Arabic               anum
share|improve this answer
add comment
\documentclass{article}
\usepackage[libertine={Ligatures=TeX,RawFeature=+onum}]{libertineotf}
\begin{document}

0123456789

\end{document}

or also for the sans serif Biolinum

\usepackage[libertine={Ligatures=TeX,RawFeature=+onum},
            biolinum={Ligatures=TeX,RawFeature=+onum}]{libertineotf}
share|improve this answer
add comment

Your Answer

 
discard

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.