When using siunitx, by default, \SIrange{0}{10}{\celsius} will render 0 °C to 10 °C.
Is there any general way to change the default rendering of ranges to 0--10 °C (i.e., using an en dash instead of "to").
When using siunitx, by default, \SIrange{0}{10}{\celsius} will render 0 °C to 10 °C.
Is there any general way to change the default rendering of ranges to 0--10 °C (i.e., using an en dash instead of "to").
The relevant option is range-phrase. This is explained in section 4.6 Lists, products and ranges of the documentation.
\documentclass{article}
\usepackage{siunitx}
\begin{document}
\sisetup{range-phrase=,--,}
\SIrange{0}{10}{\celsius}
\end{document}
°C after generating the 0 °C--10 °C in order to render 0--10 °C? Thanks for your answer!
– user2473
Feb 07 '12 at 06:01
\SIrange, you can also use \SIrange[range-phrase=--]{0}{10}{\celsius} instead of \sisetup, which applies globally.
– hertzsprung
May 22 '19 at 11:00
range-units=single will return (2 to 4) °C as of 2024
– tanGIS
Jan 21 '24 at 13:53