Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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").

share|improve this question

1 Answer 1

up vote 12 down vote accepted

The relevant option is range-phrase. This is explained in section 5.8 "Lists and ranges of numbers" of the documentation.

\documentclass{article}
\usepackage{siunitx}
\begin{document}

\sisetup{range-phrase=--}
\SIrange{0}{10}{\celsius}
\end{document}
share|improve this answer
1  
Ah, dunno how I skipped over that! While we're on the subject, is there a way to eliminate the first °C after generating the 0 °C--10 °C in order to render 0--10 °C? Thanks for your answer! –  user2473 Feb 7 '12 at 6:01
7  
range-units=single –  Jake Feb 7 '12 at 6:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.