3

Using this answer I have added my university logo to the frame title of my beamer slides I made using the Metropolis theme. MWE:

\documentclass[9pt,aspectratio=169,]{beamer}
\usetheme[progressbar=frametitle,
subsectionpage=progressbar,
block=fill]{Metropolis}
\usepackage[export]{adjustbox}

\makeatletter
\setlength{\metropolis@frametitle@padding}{1.8ex}% <- default 2.2 ex
\setbeamertemplate{frametitle}{%
    \nointerlineskip%
    \begin{beamercolorbox}[%
        wd=\paperwidth,%
        sep=0pt,%
        leftskip=\metropolis@frametitle@padding,%
        rightskip=\metropolis@frametitle@padding,%
        ]{frametitle}%
        \metropolis@frametitlestrut@start%
        \insertframetitle%
        \nolinebreak%
        \metropolis@frametitlestrut@end%
        \hfill
        \includegraphics[height=3ex,keepaspectratio,valign=c]{example-image}
    \end{beamercolorbox}
}

\begin{document}

\begin{frame}
\frametitle{Frame title}
Contents...
\end{frame}

\end{document}

But now I have no progress bar below the frame title anymore. I tried to add it back in with code from the Metropolis manual, but was unsuccessful. Any help is appreciated. Thanks!

Output

1

1 Answer 1

2

You can add \usebeamertemplate*{progress bar in head/foot} at the end of your custom frametitle definition:

\documentclass[9pt,aspectratio=169,]{beamer}
\usetheme[progressbar=frametitle,
subsectionpage=progressbar,
]{moloch}% modern fork of the metropolis theme
\usepackage[export]{adjustbox}

\makeatletter
\setlength{\moloch@frametitle@padding}{1.8ex}% <- default 2.2 ex
\setbeamertemplate{frametitle}{%
    \nointerlineskip%
    \begin{beamercolorbox}[%
        wd=\paperwidth,%
        sep=0pt,%
        leftskip=\moloch@frametitle@padding,%
        rightskip=\moloch@frametitle@padding,%
        ]{frametitle}%
        \moloch@frametitlestrut@start%
        \insertframetitle%
        \nolinebreak%
        \moloch@frametitlestrut@end%
        \hfill
        \includegraphics[height=3ex,keepaspectratio,valign=c]{example-image}
    \end{beamercolorbox}
    \usebeamertemplate*{progress bar in head/foot}
}

\setlength{\moloch@progressinheadfoot@linewidth}{3pt}% just to better see that it's working


\begin{document}

\begin{frame}
\frametitle{Frame title}
Contents...
\end{frame}

\begin{frame}
\frametitle{Frame title}
Contents...
\end{frame}

\begin{frame}
\frametitle{Frame title}
Contents...
\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 .