# specify a range value in \SI?

I like to print something like 10-20 cm using \SI option. I have tried \SI{10-20}{\cm} which is giving error. How to write it properly?

• IIRC, the correct way of typesetting ranges according to the guidelines of the SI is to include the unit for both numbers, so instead of 10-20 cm you should use 10cm - 20cm. Oct 20 at 18:39

The correct command in recent versions of siunitx is \qtyrange:

\documentclass[border=3.14]{standalone}

\usepackage{siunitx}

\begin{document}
\qtyrange{10}{20}{\centi\metre}
\end{document}


This will result in

Just like in @Bernard's answer you can change the used phrase to an en-dash using range-phrase (for which I'd add non-breaking spaces using ~):

\documentclass[border=3.14]{standalone}

\usepackage{siunitx}

\begin{document}
\qtyrange[range-phrase=~--~]{10}{20}{\cm}
\end{document}


Problem: This looks like a minus and I'd say the result is -10 cm.

• OK, \qtyrange{10}{20}{\centi\metre} is looking decent. Thank you. Oct 20 at 18:49
• @Bukaida of course you don't have to type \centi\metre everytime, \cm will work just as fine (and siunitx is smart enough to also parse \qtyrange{10}{20}{cm} correctly, but I'd prefer using \cm if you have to be short). Oct 20 at 18:51
• @Skillmon On the 'to do' list is to parse cm to \centi\metre to allow manipulation ;) Oct 20 at 19:00

Use \numrange[range-phrase=--]{10}{20}\,\unit{\cm}͵.

• @Skillmon: You're right. I'll add it instantly. Thanks! Oct 20 at 18:40