# How to change the frametitle / footline height in metropolis theme?

Using beamer when I change a font size in a frame title line and/or footline to the preferred height, the height of these lines is not automatically adjusted to the font height. How to achieve that effect?

I started to use the metropolis theme.

As I was asked, I created a MWE now. BTW, what is the name of a standard color of a frametitle?

\documentclass{beamer}

\usetheme[numbering=none]{metropolis}

\setbeamerfont{frametitle}{size=\normalsize,series=\bfseries}
\setbeamerfont{frametitle}{size=\small,series=\normalfont}

\setbeamercolor{footline}{bg=black!80,fg=white}
\setbeamertemplate{frame footer}{A footline}

\begin{document}

\begin{frame}{A frame title in a small size}
\begin{block}{Some itemize}
\begin{itemize}
\item Item 1
\item Item 2
\end{itemize}
\end{block}
\begin{block}{Some maths}
$\sum_{n=1}^{\infty}\frac{1}{n^2}=\frac{\pi^2}{6}=\zeta(2)$
\end{block}
\end{frame}

\end{document}

• can you make a minimal working example (MWE)? – samcarter_is_at_topanswers.xyz Aug 6 '18 at 20:28
• In a moment. :-) – szw1710 Aug 6 '18 at 20:31
• The easy question first: the default colours for the frametitle in the metropolis theme are fg=black!2, bg=mDarkTeal – samcarter_is_at_topanswers.xyz Aug 6 '18 at 21:03
• Of course, it works. You are right, my question is not so easy. I was not able to solve a problem by myself. I have spend at least 2 hours to try and look for a solution in the earlier posts. – szw1710 Aug 6 '18 at 21:07

Taking the font size into account will only marginally influence the height of the frametitle. Most of height is determined by the padding around the font and is hard coded in the metropolis theme. However you can adjust the numbers as in the following example.

\documentclass{beamer}

\usetheme[numbering=none]{metropolis}

\setbeamerfont{frametitle}{size=\small,series=\normalfont}
\setbeamercolor{footline}{bg=black!80,fg=white}
\setbeamertemplate{frame footer}{A footline}

\makeatletter

\setbeamertemplate{footline}{%
\begin{beamercolorbox}[wd=\textwidth, sep=1.5ex]{footline}% <- default 3ex
\usebeamertemplate*{frame footer}
\hfill%
\usebeamertemplate*{frame numbering}
\end{beamercolorbox}%
}
\makeatother

\begin{document}

\begin{frame}{A frame title in a small size}
\begin{block}{Some itemize}
\begin{itemize}
\item Item 1
\item Item 2
\end{itemize}
\end{block}
\begin{block}{Some maths}
$\sum_{n=1}^{\infty}\frac{1}{n^2}=\frac{\pi^2}{6}=\zeta(2)$
\end{block}
\end{frame}

\end{document}


• Thank you very much for a nice solution with an explanation. Of course this works excellently. – szw1710 Aug 6 '18 at 21:31