- I puzzled today for an hour to get the unit sans-serif.
- I found that
\usefonttheme[onlymath]{serif}
helps but I am not sure if this is the correct way. - Question: Is it logical that I need
\usefonttheme[onlymath]{serif}
in order to have the units sans-serif?
% Based on https://tex.stackexchange.com/questions/66713/
\documentclass{beamer}
\usepackage{noto}
\usepackage{arevmath}
%\usefonttheme[onlymath]{serif} % <-- Un/Comment to see change
\usepackage{xfrac}
\usepackage{siunitx}
\sisetup{%
per-mode = fraction,
fraction-function = \sfrac,
}
\begin{document}
\begin{frame}
Text appears in \textbf{sans-serif} font
$x,2y,3z$ appears in \textbf{sans-serif} font
$\SI{1}{\metre\per\second}$ units appears in \textbf{serif} font, would like it to be sans-serif
\end{frame}
\end{document}
Edit: I now believe my question is a duplicate of sans serif font with siunitx.
Best Answer
As is discussed in sans serif font with siunitx,
detect-all
insisetup
will make the unit in sans serif font as is the text in the document.Here is the test result.