# Using IEEEtran with siunitx's \num{…}

Using the MWE

\documentclass[conference]{IEEEtran}
\usepackage{siunitx}
\begin{document}
\begin{abstract}
foo \num{12.34} 12.34 bar.
\end{abstract}
\end{document}


The First 12.34 does not care about the bold font set by the abstract environment. Why is that and what is the right way to fix it?

• May be you should try \sisetup{detect-weight=true,detect-inline-weight=math}... See here: tex.stackexchange.com/a/66256/120578 – koleygr Oct 13 at 10:44
• Please make it an answer to I can accept it. (I ended up using detect-all, and would have expected that to be the default, but it is not). – apriori Oct 13 at 11:28

You should use \sisetup command in your preamble in order to tell siunitx detect the font weight.

This can be done by using the command:

\sisetup{detect-weight=true,detect-inline-weight=math}


(as suggested here)

Or -as you found out yourself- the command

\sisetup{detect-all=true}


Full MWE:

\documentclass[conference]{IEEEtran}
\usepackage{siunitx}
\sisetup{detect-all=true}
\begin{document}
\begin{abstract}
foo \num{12.34} 12.34 bar.
\end{abstract}
shit
\end{document}


Or

\documentclass[conference]{IEEEtran}
\usepackage[detect-weight]{siunitx}  % <---
\begin{document}
\begin{abstract}
foo \num{12.34}\,bar or \SI[mode=text]{12.34}{bar} % <---
\end{abstract}
\end{document}