Community, this question does not hold up to my standard research
quality. Please excuse if there is an obvious answer. It's a bit of a
deadline situation with a late change in requirements.
I have a beamer
document that is compiled with LuaTeX
. I have to use a system font (ttf). In the MWE below I use Consolas
font as a replacement for my actual font (it is commercial).
I want to use a "normal" sans serif math font (via \usepackage{}
) together with the ttf font. I use \usepackage{isomath}
in my MWE.
The document compiles but the math is not all sans serif (numbers, sin, alpha, \infty are serif). I want everything to be sans serif.
\documentclass{beamer}
\usepackage{fontspec}
\usepackage{mathtools}
%\setsansfont{PorscheNextTT}
\setsansfont{Consolas} % Should be available on a Windows system
\usepackage{isomath}
\begin{document}
\begin{frame}
Testtext. Testtext. \textbf{Testtext.} Testtext. \textcolor{red}{Testtext.}
\begin{align}
1 + 2 &= x\\
y(t) &= \int_0^\infty \sin(\alpha) d\text{t}
\end{align}
Testtext. Testtext. \textbf{Testtext.} Testtext. \textcolor{red}{Testtext.}
\end{frame}
\end{document}
MWE with #Consolas# font
MWE with my #actual# font
Final Solution After Reading the Answers
\documentclass{beamer} \usefonttheme{professionalfonts} % Nice sans serif font % Loads arevtext and arevmath which is not necessary in this case (arevmath would be enough) \usepackage{arev} % Here the magic happens \usepackage[no-math]{fontspec} % Never without... \usepackage{mathtools} % My system font for the main text %\setsansfont{PorscheNextTT} \setsansfont{Consolas} % Should be the Last Font package % Uses letters and numbers from the main font for math --> very useful \usepackage[italic]{mathastext} \begin{document} \begin{frame} Testtext. Testtext. \textbf{Testtext.} Testtext. \textcolor{red}{Testtext.} \begin{align} 1 + 2 &= x\\ y(t) &= \int_0^\infty \sin(\alpha) \mathrm{d}t \end{align} Testtext. Testtext. \textbf{Testtext.} Testtext. \textcolor{red}{Testtext.} \end{frame} \end{document}
Best Answer
I think your best bet is
mathastext
.