4

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:
5

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}
  • Might be worth clarifying OP's (common?) misunderstanding: addfontfeatures doesn't actually change any fonts. – Brent.Longborough Apr 14 '12 at 11:41
3
\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}

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.