我正在使用libertine
和libertinust1math
我的论文的软件包。据我所知,当我\boldseries
在以下 MWE 中使用它时,“Bob”行上的 75% 条目并没有变成粗体:
\documentclass[oneside,11pt]{book}
\usepackage[semibold,tt=false]{libertine}
\usepackage{libertinust1math}
\usepackage[
expansion = false ,
tracking = smallcaps ,
letterspace = 40 ,
]{microtype}
\usepackage{booktabs}
\usepackage{siunitx}
\sisetup{%
detect-family, detect-shape, detect-weight,
product-units = power,
list-final-separator = {, and },
retain-explicit-plus,
input-comparators = {<=>\approx\ge\geq\gg\le\leq\ll\sim\lesssim\gtrsim}
}
\DeclareSIUnit[number-unit-product = ]\percent{\char`\%}
\begin{document}
\begin{table}[!h]
\centering
\begin{tabular}{lSS}
\toprule
A & {B} & {C}\\
\midrule
\bfseries Bob & \bfseries \SI{75}{\percent} & \bfseries -11.11\\
Carla & \SI{75}{\percent} & 2.22\\
Dale & \SI{75}{\percent} & -3.33\\
Ena & \SI{75}{\percent} & 4.44\\
\bottomrule
\end{tabular}
\caption{Caption 1}
\end{table}
\end{document}
但是,如果我注释掉行\usepackage[semibold,tt=false]{libertine}
和\usepackage{libertinust1math}
,则“Bob”行上的 75% 条目将变为粗体:
这是为什么?有什么方法可以解决libertine
回应\boldseries
?
答案1
使用我的答案关于你之前的一个问题:
\documentclass[oneside,11pt]{book}
\usepackage[semibold,tt=false]{libertine} % <---
\usepackage{libertinust1math} % <---
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{etoolbox}
\newrobustcmd\B{\DeclareFontSeriesDefault[rm]{bf}{b}\bfseries}
\newcommand\mcc[1]{\multicolumn{1}{c}{#1}}
\begin{document}
\begin{table}[!h]
\centering
\sisetup{detect-weight,
table-format=2.0
}
\begin{tabular}{lS[table-space-text-post=\,\%]<{\,\%}
S[table-format=-2.2]}
\toprule
A & \mcc{B} & \mcc{C}\\
\midrule
\textbf{Bob} &\B 75 &\B -11.11\\
Carla & 75 & 2.22\\
Dale & 75 & -3.33\\
Ena & 75 & 4.44\\
\bottomrule
\end{tabular}
\caption{Caption 3}
\label{tab:boldsiunitx}
\end{table}
\end{document}
得到: