4

\si seems to be not showing decimal points, unless I specifically specify \num.

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

\begin{document}
\si{12.5\milli\gram}

\si{\num{12.5}\milli\gram}
\end{document}

enter image description here

Is this expected behavior?

1
  • 10
    You are using the wrong command: \SI{12.5}{\milli\gram} is what you want. The \si command is for units and treats . as a separator (inherited from older packages in the area).
    – Joseph Wright
    Commented Dec 2, 2016 at 15:52

2 Answers 2

8

The command \si{units} is for units only. You have to use the \SI{number}{units} for what you want to do.

3

I guess i am replying really late for your query, but you should use \num directly and not nest it in \si.

For a number

\num{12.5}

and \SI (in upper case) for a number with a unit

\SI{12.5}{\milli\gram}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .