I want to bold selected, isolated siunitx-formatted cells in a table.
Generally, I do this with \bfseries and \usepackage{etoolbox}, as suggested in Joseph Wright's answer here.
However, in the following MWE, the cells with the \SIrange commands do not appear to be formatted in bold. How can I fix this?
\documentclass[oneside,11pt]{book}
\usepackage[semibold,tt=false]{libertine}
\usepackage{libertinust1math}
\usepackage[
expansion = false ,
tracking = smallcaps ,
letterspace = 40 ,
final
]{microtype}
\usepackage[font={sf,small},labelsep=quad,labelfont=sc]{caption}
\usepackage[subrefformat=parens]{subcaption}
\usepackage{mathtools}
\usepackage{booktabs}
\usepackage{etoolbox}
\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}
}
\begin{document}
\begin{table}[!h]
\centering
\begin{tabular}{lll}
\bfseries A & \bfseries\numrange[range-phrase=--]{\sim 5}{17} & \bfseries Some words\
\bfseries B & \bfseries\numrange[range-phrase=--]{\sim 5}{17} & \bfseries More words\
\end{tabular}
\end{table}
\end{document}

semiboldoption fromlibertinepackage is overriding this. If you ommit it,~5-17is bold and the rest is not semibold but bold, too. – TVL Feb 08 '21 at 17:39