I am using the solution from this question: Positioning logo in the front page as well as slides to add a logo on the top right of the title frame.
My problem is a bit more complicated:
- I have a set of 4 logos (pdf and png)
- some slides should not have any logo
- some should have 1 logo
- some should have more than 1 logo (aligned horizontally on the top right of the title bar)
I am using:
\usetheme[height=9mm]{Rochester}
and I am using many time the subtitles.
I have copied-and-pasted the MWE from the linked answer:
\documentclass{beamer}
\usetheme[height=9mm]{Rochester}
\usecolortheme{beaver}
\usepackage{tikz}
\title{The title}
\institute[Inst.]{The Institute}
\date{\today}
\begin{document}
\addtobeamertemplate{frametitle}{}{%
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north east,yshift=2pt] at (current page.north east) {\includegraphics[height=0.8cm]{cat}};
\end{tikzpicture}}
\begin{frame}{Motivation}
Now the logo is visible
\end{frame}
\begin{frame}{Motivation}
\framesubtitle{A}
Now the logo is visible
\end{frame}
\end{document}
Best Answer
You could define the
frametitle
template so it puts the logos by fetching which ones from a macro that you redefine at the right points.The
\thisframelogos
macro stores the list of images you would like to put in the title of the next frames. The\framelogo
macro just sets\thisframelogos
.When
\thisframelogos
is changed every frame created after the change will use its contents as the list of images to put. The images are put using a\foreach
command which is defined intikz
.To remove any logo just use
\framelogo{}
before your frame.As a key for
frame
To make the trick non "stateful" but applicable per-frame we can define a custom key and reset the
\thisframelogos
with the help ofetoolbox
(see this)