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.

The old style font is not applied to the whole document. Whats the issue there? The MWE:

\documentclass{article}
\usepackage{siunitx}
\usepackage[osf]{libertine}
\begin{document}
92\si{\percent}\par
$84^\star$
\end{document} 

enter image description here

share|improve this question
1  
I think this is because you have to specify the math font separately. (Like \setmathfont{...}, e.g. tex.stackexchange.com/questions/47628/…. In the extreme case you can do $\text{84}^\star$ (needs amsmath). –  alfC Apr 26 at 5:04
    
It works now..... –  subham soni Apr 26 at 5:14
    
IMO, the main problem here is not that the numbers are lining in “math mode” but the different font you use for the numbers in math mode. There is a package which offers math support for Libertine: \usepackage[libertine]{newtxmath}. –  Manuel Apr 26 at 9:16
    
there are some relevant comments on the difference in use of lining vs. old-style numerals in the tugboat article by knuth about typesetting the book concrete mathematics. there's a link to the article in the answer to question 22244. –  barbara beeton Apr 26 at 10:54

1 Answer 1

up vote 4 down vote accepted

In mathematical writing, it is not common to use oldstyle (aka "text-style") numerals, whether or not oldstyle numerals are used in ordinary text. I believe lining-style numerals are preferred for math-mode material for two reasons. First, using text-style figures (some of which have descenders, and some of which have ascenders) in superscript and subscript positions -- which happens rather a lot in math, doesn't it? -- can quickly confuse the reader. Second, text-style figures are usually (but not necessarily) proportionally spaced -- i.e., a 1 takes up less space than a 6 -- and are therefore not well suited for displaying numbers in tabular contexts; in contrast, lining-style figures are generally (but, again not necessarily) fixed-spaced and therefore much better suited for tabular material.

The libertine package is not the only package that does not use oldstyle numerals in math mode even though the osf option is specified. For instance, loading the cfr-lm package (which is based on the Latin Modern font families) with the option rm=oldstyle won't enable the use of oldstyle numerals in math. Similarly, beginning with version 1.23 of the newtx and newpx packages (which are based on the Times Roman and Palatino font families, respectively), setting the option osf only affects numerals in text mode but not those in math mode.

Turning to the issue of how one might (note: I'm not saying *should") use oldstyle numerals together with macros of the siunitx package. From section 5.2 of the user manual of the siunitx package:

The siunitx package controls the font used to print output independently of the surrounding material. The standard method is to ignore the surroundings entirely, and to use the current body fonts.

You can override this setting by setting the package's option detect-mode (note again that I don't recommend you do so):

enter image description here

\documentclass{article}
\usepackage{siunitx}
\usepackage[osf]{libertine}
\begin{document}
\SI{84}{\kilogram}

\num{36.1}\%

\sisetup{detect-mode}

\SI{84}{kilogram}

\num{36.1}\%
\end{document}
share|improve this answer
    
The OP need not use math mode. He should use \tnote actually, but he is caught with $^{\star}. See his previous question about threeparttable. May be this is better advised to him. –  Harish Kumar Apr 26 at 8:03
    
@HarishKumar - Thanks for providing this additional pointer. I agree with you that the OP probably shouldn't be using math mode for simple numbers; much better to use the \tnote device to generate table notes in a threeparttable environment. –  Mico Apr 26 at 8:18

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.