3

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.

enter image description here

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.

3
  • 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?
    – egreg
    Commented Mar 26, 2020 at 17:25
  • @egreg not with lualatex, only with pdflatex. Commented Mar 26, 2020 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.
    – Bastien
    Commented Mar 26, 2020 at 18:06

1 Answer 1

3

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}{%
    {\addfontfeatures{Numbers=Lining}#1}%
  }
\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}

enter image description here

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .