TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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

This document compiles (in XeLaTeX), but the boldface numbers are set oldstyle. Why? How to use boldface lining digits with Linux Libertine?

\documentclass{article}

\RequirePackage{fontspec}
\setmainfont[Mapping=tex-text,Numbers=OldStyle]{Linux Libertine O}
\def\Lpnum#1{{\addfontfeatures{RawFeature=+lnum;+pnum;-tnum;-onum}#1}}

\begin{document}

123\Lpnum{456}\textbf{\Lpnum{789}}

\end{document}

%%% Local Variables:
%%% TeX-engine:xetex
%%% End:
share|improve this question
up vote 5 down vote accepted

I've already suggested this approach in the answers about \tagform@ and \maketag@@@:

\documentclass{article}

\usepackage{fontspec}
\setmainfont[Ligatures=TeX,Numbers=OldStyle]{Linux Libertine O}
\newfontfamily{\Lpnum}[Ligatures=TeX,Numbers=Lining]{Linux Libertine O}

\begin{document}

123\Lpnum{456}\textbf{\Lpnum{789}}

123\Lpnum{456}\textit{\Lpnum{789}}

\end{document}
share|improve this answer
    
Might be worth clarifying OP's (common?) misunderstanding: addfontfeatures doesn't actually change any fonts. – Brent.Longborough Apr 14 '12 at 11:41
\documentclass{article}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures={TeX}}
\setmainfont[Numbers=OldStyle]{Linux Libertine G}
\newfontfamily{\boldlibertine}{Linux Libertine G Bold}



\begin{document}


123456789 %oldstyle

\boldlibertine{123456789} %normal

123456789 %oldstyle again


\boldlibertine{\emph{123456789}} %bold italic


\end{document}
share|improve this answer

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.