[Tex/LaTex] Prefix with no unit with siunitx

siunitx

How can I typeset a number with a prefix but without a unit with siunitx? The following code

\SI{1.0}{\mega}

gives this error: "Prefix with no unit."

Best Answer

You can of course do it:

\documentclass{article}
\usepackage{siunitx}

\DeclareSIUnit{\nothing}{\relax}

\begin{document}
\SI{1.0}{\mega\nothing} is a wrong way to typeset data.
\end{document}

enter image description here

However, you should think at least twice whether this is a good way to express yourself and your readers will understand what you mean. With

\num{1e6}

the printout would be much clearer and not so wider.

Related Question