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.

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
add comment

2 Answers 2

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
add comment
\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
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.