[Tex/LaTex] Unit spacing with siunitx in an equation

equationssiunitxspacingunits

I'm just starting to get to grips with the siunitx package, but I've noticed that there seems to be some issues with regards to unit notation spacing in an equation. With siunitx it is possible to put a space between the numerical value and the unit by leaving a space after the number of before the unit (e.g., \num{3.7d10} \si{\becquerel} or \num{3.7d10}\si{ \becquerel}).

However, when I do this in equation mode there doesn't seem to be a way to create a space between the number and the unit. Am I missing something, or is this an inherent fault/problem?

\documentclass[12pt,a4paper]{report}
% International language package - allows use of special characters
\usepackage[utf8]{inputenc}
% Line spacing package - allows user to set line spacing
\usepackage{amsmath}
% Graphics package - allows document to include various graphics files
\usepackage{chemformula}
% SI Unit package - allows for standard unit notation
\usepackage{siunitx}
\DeclareSIUnit\curie{Ci}

\begin{document}

% no spaces
\num{3.7d10}\si{\becquerel} \\

% space before unit
\num{3.7d10}\si{ \becquerel} \\

% space after number
\num{3.7d10} \si{\becquerel} \\

% no spaces
\begin{equation}
\num{1}\si{\becquerel} = \num{2.703d11}\si{\curie} \\
\end{equation}

% spaces before units
\begin{equation}
\num{1}\si{ \becquerel} = \num{2.703d11}\si{ \curie} \\
\end{equation}

% spaces after number
\begin{equation}
\num{1} \si{\becquerel} = \num{2.703d11} \si{\curie} \\
\end{equation}

\end{document}

Best Answer

When you're typesetting a numerical quantity with units, you're supposed to use the \SI macro:

\SI{3.7d10}{\becquerel}

That effectively formats the first argument using \num, the second using \si, and inserts the proper spacing between them, even when typesetting an equation (i.e. when in math mode).

Normally spaces are ignored in math mode, so that you can write e.g. 3\times 10 or 3 \times 10 and the result will be the same.

Related Question