I've been trying to get some entries in my table typeset in boldface while using siunitx for the proper alignment.
I've tried numerous other answers I found on the web, but the issue I have is that I want the numbers to be rendered in the math font, not the main font.
This is the current minimal example code for my problem:
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
\documentclass[12pt,a4paper,oneside]{memoir}
\usepackage{mathtools}
\usepackage{babel} % Language hyphenation and typographical rules
\usepackage{csquotes} % Context sensitive quotation facilities
\usepackage{microtype} % Slightly tweak font spacing for aesthetics
\usepackage[warnings-off={mathtools-colon}]{unicode-math}
\usepackage{siunitx}
\usepackage{booktabs, longtable} % Better looking tables
\usepackage{etoolbox}
\setmainfont{EBGaramond-Regular}
\setmathfont{STIX Two Math}
\begin{document}
\begin{table}[t]
\centering
\robustify\bfseries
\sisetup{detect-weight, separate-uncertainty, group-minimum-digits = 4}
\begin{tabular}
{l S[table-format=3.2(1)] S[table-format=2.0] S[table-format=3.2(1)] S[table-format=3.0]}
\toprule
& \multicolumn{2}{c}{{Point-mass}} & \multicolumn{2}{c}{{Pendulum}} \\
\cmidrule(lr){2-3} \cmidrule(lr){4-5}
& {Cost $(\mu \pm \sigma)$} & {Succ.$^\dag$} & {Cost $(\mu \pm \sigma)$} & {Succ.$^\ddag$} \\
\midrule
{mppi}$^\S$ & {---} & {---} & 30.8 +- 12.6 & 100\unit{\percent} \\
{disco} & 250.8 +- 29.9 & 20\unit{\percent} & 61.3 +- 40.0 & 70\unit{\percent} \\
{svmpc} & 191.7 +- 56.5 & 25\unit{\percent} & 44.5 +- 17.9 & 70\unit{\percent} \\
{dust} & \bfseries 118.3 +- 7.9 & \bfseries 100\unit{\percent} & $\symbf{36.8 \pm 14.0}$ & 80\unit{\percent} \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
Using \symbf
gets the bf math font, but breaks the alignment. Could anyone please help? Thanks in advance!
\mathversion{bold}
\mathversion{bold}
didn't help too.