本文档编译通过(使用 XeLaTeX),但粗体数字设置为旧样式。为什么?如何在 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:
答案1
\tagform@
我已经在关于和的答案中建议了这种方法\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}
答案2
\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}