Commits

Joseph Wright committed 406bcaf

Do not use \bfseries in math mode! (fixes issue #101)

This is not ideal, but in math mode you simply can't flip the
'bold switch', so a warning is the best approach.

Comments (0)

Files changed (2)

base/themes/color/beamercolorthemedove.sty

 \setbeamercolor*{example text}{fg=black}
 \setbeamercolor*{structure}{fg=black}
 
-\setbeamerfont{alerted text}{series=\bfseries}
+\providecommand*{\beamer@bftext@only}{%
+  \relax
+  \ifmmode
+    \expandafter\beamer@bftext@warning
+  \else
+    \expandafter\bfseries
+  \fi
+}
+\providecommand*{\beamer@bftext@warning}{%
+  \ClassWarning{beamer}
+    {Cannot use bold for alerted text in math mode}%
+}
+
+\setbeamerfont{alerted text}{series=\beamer@bftext@only}
 
 \setbeamercolor{palette primary}{fg=black,bg=white}
 \setbeamercolor{palette secondary}{fg=black,bg=white}

base/themes/color/beamercolorthemeseagull.sty

 \setbeamercolor*{example text}{fg=black}
 \setbeamercolor*{structure}{fg=black}
 
-\setbeamerfont{alerted text}{series=\bfseries}
+\providecommand*{\beamer@bftext@only}{%
+  \relax
+  \ifmmode
+    \expandafter\beamer@bftext@warning
+  \else
+    \expandafter\bfseries
+  \fi
+}
+\providecommand*{\beamer@bftext@warning}{%
+  \ClassWarning{beamer}
+    {Cannot use bold for alerted text in math mode}%
+}
+
+\setbeamerfont{alerted text}{series=\beamer@bftext@only}
 
 \setbeamercolor*{palette primary}{fg=black,bg=black!20}
 \setbeamercolor*{palette secondary}{fg=black,bg=black!25}