I have a LaTeX beamer presentation where I use \setbeamercolor{math text} for enhanced readability and it works great. Unfortunately, all \text{} and \intertext{} is colored as well and that doesn't look nice. Is there any remedy?
MWE:
\documentclass{beamer}
\usepackage{xcolor}
\usepackage{amsmath}
\setbeamercolor{math text}{fg=blue}
\begin{document}
\begin{frame}
This is a term in math mode: $a^2 + b^2 = c^2$.
This is color inside of \texttt{align*}, but the text is colored as well:
\begin{align*}
a^2 + b^2 = c^2 && \text{(Pythagoras)}. \\
\intertext{Even worse, the intertext is colored as well:}
a^1 + b^1 = c^1 && \text{(me)}.
\end{align*}
\end{frame}
\end{document}
And it produces this output:
Update: @Mico has provided a nice solution that works well, even for inline-math in \intertext, but it colors tables as well! Can that be avoided?
Plus, \text does switch back to black, but math in \text then stays black. Have a look at the \text with $x$ in \underbrace.
Here is an updated MWE:
\documentclass{beamer}
%\setbeamercolor{math text}{fg=blue}
%\newcommand\blackintertext[1]{\intertext{\textcolor{black}{#1}}}
\everymath=\expandafter{\the\everymath\color{blue}}
\let\origtext\text
\renewcommand\text[1]{\origtext{\textcolor{black}{#1}}}
\begin{document}
\begin{frame}
This is a term in inline-math mode: $1+1=2$.
Displayed equations are colored as well \dots
\begin{align*}
\underbrace{a^2 + b^2}_{\text{magic $x$}} &= c^2 \tag{Pythagoras} \\
\intertext{\dots\ but, happily, intertext material is no longer colored. Even $\pi \approx 3.14$ is colored.}
e^{i\pi} + 1 &= 0 \tag{Euler}
\end{align*}
\begin{tabular}{l|l}
What & about \\
\hline
a & table?
\end{tabular}
\end{frame}
\end{document}



\newcommand\blackintertext[1]{\intertext{\textcolor{black}{#1}}and use that instead of\intertext– David Carlisle Sep 03 '19 at 13:57\intertextis no longer colored! – cxxl Sep 04 '19 at 12:57\everymathsetting to make the nested math blue – David Carlisle Sep 04 '19 at 13:00\blackintertextinstead of the\everymathyou can verify it. Plus, the tags are in blue as well. But the table is OK :) – cxxl Sep 04 '19 at 14:33