1

I use the Metroplis as the theme of my beamer. Now I want to change the frame title height but I want to remain other styles of the frame title unchanged. How to do this>

1 Answer 1

3

The spacing within the frametitle is controlled by the \metropolis@frametitle@padding

\documentclass{beamer}

\usetheme{metropolis}

\makeatletter
\setlength{\metropolis@frametitle@padding}{1.2ex}
\makeatother

\begin{document}

\begin{frame}
\frametitle{content...}
\end{frame}

\end{document}

enter image description here

For moloch, the updated fork of the metropolis theme, one can adjust the frametitle like this:

\documentclass{beamer}

\usetheme{moloch}% modern fork of the metropolis theme

\makeatletter
\setbeamertemplate{frametitle}{%
  \nointerlineskip%
  \begin{beamercolorbox}[%
      wd=\paperwidth,%
      sep=0.1ex,% <- Change value here
      leftskip=0.5ex,%
      rightskip=\the\glueexpr 0.5ex plus 1fill\relax,%
    ]{frametitle}%
    \usebeamerfont{frametitle}%
    \vbox{}\vskip-0.4ex%
    \strut\insertframetitle\nolinebreak\strut\par%
    {%
      \ifx\insertframesubtitle\@empty%
        \else%
        {\usebeamerfont{framesubtitle}\vspace{-0.8ex}\usebeamercolor[fg]{framesubtitle}\strut\insertframesubtitle\strut\par}%
      \fi
    }%
  \end{beamercolorbox}%
}
\makeatother

\begin{document}

\begin{frame}
\frametitle{content...}
\end{frame}

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .