7

Beamer uses a sans-serif font to typeset math. While I like the aesthetics of it, in a math context I find capital I and capital Pi significantly harder to read without the serifs. Without T1 encoding, I can write \mathrm{\Pi} to cheat my way out. With T1 encoding, however, Pi is typeset as ´´ instead.

I am aware that this problem is identical to this question, but I am looking for a different answer. Specifically, I do not wish to replace all math with a serif font, only that one character. Can this be achieved somehow?

\documentclass{beamer}
\usepackage[T1]{fontenc}

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

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

1 Answer 1

6

Here, I declare a math alphabet \oldmathrm to use OT1 encoding. Then I can access it for \Pi redefinition.

\documentclass{beamer}
\DeclareMathAlphabet{\oldmathrm}{OT1}{cmr}{m}{n}
\usepackage[T1]{fontenc}
\let\oldPi\Pi
\renewcommand{\Pi}{\oldmathrm{\oldPi}}
\begin{document}
\begin{frame}
$\Gamma\Pi$
\end{frame}
\end{document}

enter image description here

If you wanted access to both the sans \Pi as well as the rm version, then don't \renewcommand\Pi, but instead just use \Pi and \oldmathrm{\Pi} in your document.

Another way, and I am not sure which way is preferred (i.e., uses less resources) is just to declare a symbol font, and use slot 5 from that font for \Pi:

\documentclass{beamer}
\DeclareSymbolFont{oldrm}{OT1}{cmr}{m}{n}
\DeclareMathSymbol{\Pi}{\mathord}{oldrm}{"5}
\usepackage[T1]{fontenc}
\begin{document}
\begin{frame}
$\Sigma\Pi$
\end{frame}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .