6

I have used \setbeamercolor{math text}{fg=blue} to turn all my text in mathmode in blue. However I have also math in titles (and subtitles) and I would prefer the formulas to have the same color as the titles instead of blue.

2
  • 1
    Welcome to TeX.SX!. Do you need both inline math and display math in blue color? Mar 26, 2014 at 15:19
  • Yes, I need inline and display math in blue color. But not in the titles... Thanks for the welcom.
    – sylviel
    Mar 26, 2014 at 19:51

1 Answer 1

5

beamer has a command \donotcoloroutermaths to remove math coloring. You can insert this into the template for titles as in the example below. I use red as the maths color for better clarity in the demonstration.

Sample output

\documentclass{beamer}

\setbeamercolor{math text}{fg=red} 

\addtobeamertemplate{frametitle}{\donotcoloroutermaths}

\begin{document}

\begin{frame}
  \frametitle{A title with $x=y$ maths}
  Text and maths \( y=z \).
\end{frame}

\end{document}

You must log in to answer this question.

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