I want siunitx
to use the math font when it's used inside math mode (eg $$
). However, I can't find any combination of settings that works. MWE:
\documentclass{article}
\usepackage{amsmath,amsfonts,mathtools}
\usepackage{fontspec}
\usepackage{unicode-math}
\usepackage{siunitx}
\sisetup{detect-all}
\setmainfont[Mapping=tex-text]{DejaVu Sans}
\setmathfont[%
Extension = .otf,
BoldFont = *bold,
StylisticSet=1]{xits-math}
\usepackage{polyglossia}
\setmainlanguage{greek}
\setotherlanguages{english}
\begin{document}
τέστ: \SI{200}{\micro\ohm} vs $\SI{200}{\micro\ohm}$ vs $200μΩ$
\begin{equation}
5^{x} - \frac{45}{x} = \SI{200}{\micro\ohm} = 200\mu\Omega
\end{equation}
\end{document}
As you can see, using \SI{}{}
and $\SI{}{}$
has no difference. The font that is being used though is not the math font but the normal text font.
How can I make siunitx
use the correct (math) font when inside math mode?
detect-all
?