# Problem Libertine semi-bold with lining nums

I wish I could use the semi-bold version of the Libertine font.

By default, I use elzevirian numbers and there, no problem, I can have elzevirian numbers in semi-bold.

On some occasions, I would need to use lining nums with semi-bold.

However, the lining numbers that are supposed to be in semi-bold are actually in normal weight.

Here is a MWE :

\documentclass{article}

\RequirePackage[oldstyle,proportional]{libertine}
\DeclareRobustCommand\textsb[1]{{\libertineSB#1}}

\begin{document}
\LARGE

\noindent
Some "default" text with old style nums : 1234567890\\
\textsb{Some semi-bold text with old style nums : 1234567890}\\
\textbf{Some bold text with old style nums : 1234567890}\\

\noindent
Some text with lining nums : \liningnums{1234567890}\\
\textsb{Some semi-bold text with lining nums : \liningnums{1234567890}}\\
\textbf{Some bold text with lining nums : \liningnums{1234567890}}\\
\end{document}


Do you know how to solve this problem?

Thank you.

• Welcome. I get semibold figures. Can you please add \listfiles to the top of the example, run LaTeX and report what you find at the end of the log file? Mar 26 '20 at 17:25
• @egreg not with lualatex, only with pdflatex. Mar 26 '20 at 17:33
• @egreg I tried with PDFLaTeX and... its works. I have no problem anymore. Idem with if I use Lualatex or Xetex. It's weird... Normally, I use the TeXMaker with "Quick Run". Sorry for the inconvenience, I didn't know "Quick run" could cause this kind of problem. Mar 26 '20 at 18:06

It works with pdflatex, but not with (Lua|Xe)LaTeX, due to a bug in libertine.sty that resets the font family, instead of adding the required features when doing \liningnums.

\documentclass{article}
\usepackage{iftex}

\usepackage[oldstyle,proportional]{libertine}

\DeclareTextFontCommand\textsb{\libertineSB}

\iftutex % XeLaTeX or LuaLaTeX
\RenewDocumentCommand{\liningnums}{m}{%
}
\fi

\begin{document}

\noindent
Some "default" text with old style nums: 1234567890\\
\textsb{Some semi-bold text with old style nums: 1234567890}\\
\textbf{Some bold text with old style nums: 1234567890}

\noindent
Some text with lining nums: \liningnums{1234567890}\\
\textsb{Some semi-bold text with lining nums: \liningnums{1234567890}}\\
\textbf{Some bold text with lining nums: \liningnums{1234567890}}

\end{document}


• Yes, you are right! It works! Thank you very much! ;) Mar 26 '20 at 19:17
• Version 5.3.0 of libertine, released 2020-03-26, should have fixed the issue. Mar 27 '20 at 21:47