I observe a difference in the dashes typesetting when using SIrange
in text or math modes. Any idea of why this happens?
Here's the MWE:
\documentclass{article}
\usepackage{siunitx}
\sisetup{
range-phrase= -}
\begin{document}
\SIrange{e-12}{e-10}{\second}
$\SIrange{e-12}{e-10}{\second}$
\end{document}
This is how it looks:
Best Answer
As written in my comment, you can tell
LaTeX
to behave differently if you are inside or outside the math mode using theTeX
command\if<>\else<>\fi
; specifically using the conditional form:So if this code is applied to your MWE:
The result is:
Update
There is another way of having the correct dash, as egreg suggested, by considering the inclusion of text inside the math mode, replacing
\mathbin{-}
with:Obtaining: