[Tex/LaTex] units error with siunitx

errorssiunitx

! Undefined control
sequence.

\documentclass[12pt]{article}
\usepackage{siunitx}
\begin{document}
\si{300}{\nanogram\per\millilitre}
\end{document}

Why?

Best Answer

You have to use \SI{<number>}{<unit macros>} if you want to typeset a number with units (instead of the lowercase \si, which typesets just units), and unit prefixes like \milli and \nano have to be separated from the unit macros \liter and \gram:

\documentclass[12pt]{article}
\usepackage{siunitx}
\begin{document}
\SI{300}{\nano\gram\per\milli\litre}
\end{document}
Related Question