1

I am using the Metropolis theme, when I attempt to use logo{} or tikz or even manually place the image, it appears underneath the "banner" that contains frame titles.

I cannot figure out how to bring the image to front (overlay it) on top of the frame title.

M(N)WE:

\documentclass{beamer}

\usetheme{metropolis} \logo{\includegraphics[height=1cm]{example-image-duck}}

\begin{document}

\begin{frame} \frametitle{frame title} abc \end{frame}

\end{document}

  • 2
    Please provide us with a minimal working example. –  Feb 12 '19 at 15:41
  • I woud like to but can't figure out what you might want, since its a large theme. – Alexis Drakopoulos Feb 12 '19 at 15:43
  • 1
    Please provide us with a minimal compilable example that illustrates the problem. I do not see why the size of the theme prevents you doing that. –  Feb 12 '19 at 15:54

1 Answers1

3

Based on https://tex.stackexchange.com/a/444958/36296 you could redefine the frametitle like in the following example:

\documentclass{beamer}

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

\makeatletter \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 \raisebox{-0.6ex}{\includegraphics[height=3ex,keepaspectratio]{example-image-duck}} \end{beamercolorbox}% } \makeatother

\begin{document}

\begin{frame}{My frame title} \begin{block}{Some itemize} \begin{itemize} \item \alert{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}

enter image description here

  • Hi @samcarter, I've found your answer useful. Just one more question: How could I even control the horizontal position of the logo in the header? I mean, \raisebox allows to control the vertical position, so which command should I use to achieve horizontal control? – Catarella Jun 22 '21 at 11:52