[Tex/LaTex] Bold siuntix’s function \num{} in math environment

boldenvironmentsequationssiunitx

I am looking for a way to make the \num function displayed in bold when used inside a \begin{equation}. Using \mathbf and \boldmath doesn't work (as boldmath makes the entire equation bold and should be used before instead of inside the environment) and the only thing that does, is using \bfseries which of course produces errors in math mode. So how could this work:

\usepackage{siunitx}


\begin{document}

    \sisetup{detect-weight=true,detect-inline-weight=math}
    \begin{equation}
       V= \frac{0,0003257}{150\cdot 99,96}= \mathbf{\num{2.1723e-8}}
    \end{equation}

\end{document}

Preferably without declaring new commands.

Best Answer

siunitx has never detected \mathbf. But you can change the font by setting the math-rm-key:

\documentclass[12pt]{scrartcl}
\usepackage{siunitx}


\begin{document}


    \begin{equation}
       V= \frac{0,0003257}{150\cdot 99,96}= \num[math-rm=\mathbf]{2.1723e-8}
 \end{equation}

\end{document}

enter image description here

Related Question