# \SIrange[tophrase=dash] fails to render an en-dash

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}

\begin{document}

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

\end{document}


Whats going on here? Where should I be looking?

-

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:

\documentclass{article}

\usepackage{siunitx}

\begin{document}

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

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

\end{document}

-
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
@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
With the version 2 of siunit package, the code will turn something like into \SIrange[range-phrase=--]{10}{20}{\metre} – Ali Oct 24 '14 at 1:11