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?
Specify a range value in \SI
siunitx
siunitx
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?
Best Answer
The correct command in recent versions of
siunitx
is\qtyrange
: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~
):Problem: This looks like a minus and I'd say the result is -10 cm.