[Tex/LaTex] Beamer and Serif fonts

beamerfonts

How does one specify a particular letter to be serif in the beamer class? I want to keep the notation as similar in the presentation as the article as I can, and most of it turns out well, except for the capital Greek letter phi. I found this question to achieve my goal (the letter looks like I want it to look, but the feel of the presentation has altered due to the serif font in math mode). As a result, I'm just trying to change the single letter.

If necessary, I can add a MWE, but it doesn't seem necessary to me at the moment.

Best Answer

If you are using the default settings and want serif font for just a symbol, you can define a command for it using \mathrm

\documentclass{beamer}
\newcommand\SPi{\mathrm{\Pi}}

\begin{document}
\begin{frame}
 $\SPi\quad\Pi$
\end{frame}
\end{document}

enter image description here

On the other hand, if you are using the serif math fonts, you can use \mathsf to define your sans-serif symbol:

\documentclass{beamer}
\usefonttheme[onlymath]{serif}
\newcommand\SPi{\mathsf{\Pi}}

\begin{document}
\begin{frame}
 $\SPi\quad\Pi$
\end{frame}
\end{document}

enter image description here

Of course, you can also redefine the symbols (having previously made a copy):

\documentclass{beamer}

\let\oldPi\Pi
\renewcommand\Pi{\mathrm{\oldPi}}

\begin{document}
\begin{frame}
 $\Pi\quad\oldPi$
\end{frame}
\end{document}