Anonymous 1641
Hello,

I'm writing my master thesis that uses sty file provided by our faculty. I'm therefore unable to change it.

I use siunitx's sirange for lots of results in the thesis. It occurs to me, that in my country, number ranges have to "stick together" with the separator.

In my case, I've set the siunitx (to be grammatically correct) with what I will use as reference sample of code:


\documentclass[10pt,a4paper]{article}
\usepackage[binary-units]{siunitx}
\sisetup{range-phrase = --}
\sisetup{range-units=single}
\sisetup{output-decimal-marker = {,}}
\begin{document}
$\SIrange{0.01}{0.1}{\second}$

a-b

a--b
\end{document}


The supplied sample, if compiled in a separated .tex file, works without any problems.

It does not, however, work in my thesis file - probably due to tons of workarounds that sty file contains:
- - (dash) and compiling provides single dash,
- -- (em dash) and compiling  provides two em dashes, and after that,
- going to - (dash) and compiling again provides em dash.

I've used my sample of code above, and expanded it with all packages and sty file provided by my faculty and it had no effect until I started writing first chapter. Then, I spotted the situation, described above.

What's really absurd to me is that that even by reverting the code, the pdflatex does not re-render properly after the range-phrase is reverted back to - - it renders em dash.

So, as I am a bit tight on time, I decided to give up on trying to fix the amount of em dashes in the separator, as I have discovered that - at least in my case - it is highly sporadic, and varies even from file to file.
By commenting out the range-phrase, it even started to concatenate numbers and default "to" without any spaces whatsoever, resulting in a mess like 0,01to0,1s for the case, described above.

The problem is, that by using "the broken SIrange" with "the broken 1em" (by using range-phrase=- and getting compiled output look like it used --), I get the spacing between the numbers wider than what is grammatically correct over here. The numbers should be separated with the 1em line the same way that a-b and a--b are, and yet, in my case, they are separated just like by using a -- b.

Should I give up on this and just leave it as it is at the moment, or you guys have any suggestions what to try out next?

Thanks to @marmot and @Skillmon, due to the use in math mode, the right way to specify emdash is \text{--}.