I'd like to use a certain font (Frutiger) in text and in math. However, in math mode I'd like to use the light series not medium. I tried the code below (using DeclareMathAlphabet
and SetMathAlphabet
) but it doesn't work. See screenshot below where the "e" and the digits "0", "1", "2", "3" are typeset in medium, not light Frutiger. ("lim" is in a different font but that's another problem I suspect.) One observation is that the same approach does work when I prepare an article instead of Beamer slides.
\documentclass[14pt]{beamer}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\newcommand{\e}{\mathsf e}
\usepackage[]{frutiger}
\DeclareMathAlphabet{\mathsf}{T1}{pfr}{l}{n}
\SetMathAlphabet{\mathsf}{bold}{T1}{pfr}{l}{n}
\begin{document}
\begin{frame}{This is a test}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
$$
\lim_{\varepsilon\rightarrow 0}\frac{\e^{3\varepsilon}-\e^\varepsilon}{\varepsilon} = \lim_{\varepsilon\rightarrow 0}\frac{\e^\varepsilon (\e^{2\varepsilon}-1)}{\varepsilon}
$$
\end{frame}
\end{document}
beamer
does a lot of font setting at\begin{document}
. Try putting the two lines re-declaring\mathsf
in\AtBeginDocument{...}
.\AtBeginDocument
solves the "e" but not the digits which are perhaps not inmathsf
. I tried\DeclareMathAlphabet{\mathrm}{T1}{pfr}{l}{n}
but that produces an error:Command mathrm already defined
.\renewcommand{\mddefault}{l}
but it changes to light series everywhere not just in math mode.professionalfonts
font theme turns off somebeamer
font trickery, and might be what you need in order to specify the exact fonts yourself. However, I do not have the package to test.\usepackage[utf8x]{inputenc}
anymore.