I've read this question regarding a "possible conflict" of the siunitx
and the sansmath
packages, but that didn't really solve my issue.
I have a document where the text is written in roman font while the math uses sans serif fonts (thanks to the libertine
and sansmath
packages). Here's the preamble:
\documentclass[a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage[detect-all]{siunitx}
\sisetup{text-rm=\sffamily,math-rm=\mathsf}
\usepackage{sansmath}
\sansmath
I've noticed that whenever I put any of the siunitx
commands inside the math "environment" ($ ... $
), the output seems to "ignore" that it's supposed to use sans. Here's my MWE, without using the libertine
packages.
\begin{document}
Let \ang{30} be an acute angle. Also, \num{30} is a number and
\SI{30}{\metre} is not that far!
Let $\ang{30}$ be an acute angle. Also, $\num{30}$ is a number and
$\SI{30}{\metre}$ is not that far!
\end{document}
Produces:
What am I doing wrong? It's not mandatory, but all the other numbers inside the math spaces are "sans", so I'd like the bottom line to also show up as sans.