# Forcing mathematical symbols in beamer frame headers to be bold

I am using a beamer theme with bold headers (namely, metropolis). It looks great... except when I have a formula in frame header, because mathematical symbols don't get bolded. I can force them using \bm:

\documentclass[12pt]{beamer}
\usepackage{bm}
\usetheme{metropolis}

\begin{document}
\begin{frame}[fragile]{A $A$} % bad result
\end{frame}

\begin{frame}[fragile]{A $\bm{A}$} % better
\end{frame}
\end{document}


Remembering always to do this is inconvenient. Is there a way to always get bold symbols there? Maybe not with bm but some other package, or by changing the theme in some way?

The metropolis theme uses \bfseries for frametitle font, so you can redefine \bfseries to work in both text-mode and math-mode as below:

\documentclass[12pt]{beamer}
\usepackage{bm}
\usetheme{metropolis}

\makeatletter
\DeclareRobustCommand*{\bfseries}{%
\not@math@alphabet\bfseries\mathbf
\fontseries\bfdefault\selectfont
\boldmath
}
\makeatother

\begin{document}
\begin{frame}[fragile]{A $A$} % bad result
\end{frame}

\begin{frame}[fragile]{A $\bm{A}$} % better
\end{frame}
\end{document}


You might (ab-?)use \setbeamerfont to issue \boldmath in addition to \bfseries

\documentclass[12pt]{beamer}
\usetheme{metropolis}
\setbeamerfont{frametitle}{series=\bfseries\boldmath}

\begin{document}

\begin{frame}{A $\mathsf{A}$ $A$}
x
\end{frame}

\end{document}