2

In my beamer document I am unable to switch to cmr for formulae since they look weird otherwise.

Minimal Working Example:

\documentclass{mybeamer} 
\usepackage{amsmath}
\newcommand*{\myfont}{\fontfamily{cmr}\selectfont}
\begin{document}
\begin{frame}
  Normal Text.
  {\myfont
    \begin{equation*}
      f(x) = \sin(x)
    \end{equation*}
  }
\end{frame}
\end{document}

mybeamer class:

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{mybeamer}[2010/12/30 v0.5]

\DeclareOption*{\PassOptionsToClass{\CurrentOption}{beamer}}

\ProcessOptions
\LoadClass{beamer}

\renewcommand{\familydefault}{phv}
\renewcommand{\sfdefault}{phv}
\renewcommand{\normalsize}{\fontsize{10.5pt}{12.5pt}\xiiiv}

\DeclareFixedFont{\x}{T1}{phv}{m}{n}{10}
\DeclareFixedFont{\xb}{T1}{phv}{b}{n}{10}
\newfont{\xiiiv}{phvr8t at 30pt}
\newfont{\xiiivb}{phvb8t at 8.5pt}

How can I make this font change happen?

gncs
  • 552
  • 4
  • 10

1 Answers1

2

Thanks to Johannes_B I had a closer look at the beamer documentation and found out that the command

\LoadClass[mathserif]{beamer}

will make the math-mode look like the one in an article.

gncs
  • 552
  • 4
  • 10
  • Well, to be honest, you are more flexible when using \documentclass[mathserif]{mybeamer}. But as @egreg said in the aforementioned thread: The result of serif maths and sans serif text is just ugly. – Johannes_B Dec 09 '13 at 16:02
  • Why is your solution more flexible? – gncs Dec 09 '13 at 16:04
  • 1
    You can choose to give the option to mybeamer. If you load beamer out of mybeamer, the mathserif is hardwired. – Johannes_B Dec 09 '13 at 16:05