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 \SIrange[tophrase=dash] to specify a range of numbers with units, the range phrase is literally specified as dash.

The following MWE yields 10 mdash20 m as an output.

MWE:

\documentclass{article}

\usepackage{siunitx}
\sisetup{per=slash, load=abbr}

\begin{document}

\SIrange[tophrase=dash]{10}{20}{\metre}

\end{document}

Whats going on here? Where should I be looking?

share|improve this question
add comment

1 Answer 1

up vote 4 down vote accepted

Use it with tophrase={--}. But as the documentation says it can be confused with a subtraction operation so better to use to instead to specify a range:

enter image description here

\documentclass{article}

\usepackage{siunitx}
\sisetup{per=slash, load=abbr}

\begin{document}

\SIrange[tophrase={--}]{10}{20}{\metre}

\SIrange[tophrase={~to~}]{10}{20}{\metre}

\end{document}
share|improve this answer
    
My apologies for taking so long to reply. Your answer works well. Thanks! What I still don't get is why the method suggested in the siunitx documentation fails to work. –  Ricardo Mar 9 '12 at 4:38
1  
@Ricardo: Don't know. Perhaps you have an old version of the documentation? –  Peter Grill Mar 9 '12 at 4:44
    
That was it. I had a very old version of the documentation. Thanks for pointing it out. –  Ricardo Mar 9 '12 at 4:48
add comment

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.