# Change math font to sans-serif default in Beamer metropolis theme

I am using the Beamer metropolis theme, and I would like to change the math font to the default sans-serif font in Beamer presentations, while keeping the text font to be Fira Sans. Is there a simple way to do so (preferably in PDFLaTeX over XeLaTeX)?

I have tried similar approaches as here and here, but neither seems to work for me...

• Maybe you could also try this one : here. – IdoDaisuke Mar 27 '18 at 6:41
• Welcome to TeX.SE! It would be helpful if you provided some code to show explicitly what you've tried so far. – Mico Mar 27 '18 at 6:46

For the use with pdflatex:

\documentclass{beamer}

\usetheme{metropolis}

\usepackage[sfdefault,light]{FiraSans}
\def\mathfamilydefault{cmss}

\begin{document}

\begin{frame}
text

$x^2 abc$

\end{frame}

\end{document}


(I don't recommend mixing font families like this)

• Thanks! It seems that the bold-face Fira fonts (e.g., in the frame titles) are not rendered correctly in pdfLaTeX (seems double-thick...)? Is there a way around this? – p-value Mar 28 '18 at 3:27
• @Hilbert Please ask a question including a minimal working example (MWE) that demonstrates your problem – samcarter_is_at_topanswers.xyz Mar 28 '18 at 8:20