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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 21 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
8  
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.