[Tex/LaTex] How to use SIrange in math mode

siunitx

I cannot figure out which of the siunitx font options is the correct to typset the rangephrase when using SIrange in math mode the same way as in text mode. See the MWE

\documentclass{book}
\usepackage{siunitx} 
\sisetup{mode=text} % does NOT have an effect here
\begin{document}
\SIrange{1}{2}{\watt}\\
$\alpha=\SIrange{1}{2}{\watt}$
\end{document}

Best Answer

I am not sure why this is not the default behaviour, but if you specify range-phrase = {\text{~to~}} you get the same behavior in and out of math mode:

enter image description here

\documentclass{book}
\usepackage{siunitx} 
\sisetup{mode=text,range-phrase = {\text{~to~}}}
\begin{document}
\SIrange{1}{2}{\watt}\\
$\alpha=\SIrange{1}{2}{\watt}$
\end{document}
Related Question