Consider the following MWE
\documentclass{beamer}
\usepackage{lmodern}
\usetheme{Madrid}
\begin{document}
\begin{frame}
\frametitle{A frame title}
\framesubtitle{A frame subtitle}
\end{frame}
\end{document}
How do I reduce the height of the frametitle (which may or may not include a subtitle) in order to occupy the minimum possible space (i.e enough space so the font height fits)? I guess I need to redefine \setbeamertemplate{frametitle}
. Can the height in that definition be patched with the etoolbox
package?
Best Answer
I would design the frametitle from scratch, because in the Madrid theme the template is very simple. So:
The very tiny space before the title and after the subtitle comes from the
sep=.1ex
key. You can reduce that to zero if you like. You can also reduce the space between the title and the subtitle via a\\[-5pt]
or something similar.Recover more space when subtitle is not present
In this "enhanced" version the subtitle space is hidden when no subtitle is present, thanks to a
ifx
construct.