21

I want to include a logo in my slides. I am using this:

\logo{\includegraphics[scale=0.05]{../../Logos/CMS_logo_black.png}}

but, due to some graphics are big, in some slides the main graphic overlays the logo.

How can I remove the logo from some slides but keep it in others?

Thanks,

29

There are two simple ways to do this:

With a conditional

You can create a conditional to insert the logo only if the condition is true, and then turn the logo on and off as needed.

\documentclass{beamer}
\newif\ifplacelogo % create a new conditional
\placelogotrue % set it to true
\logo{\ifplacelogo\color{red}\rule{.5cm}{.5cm}\fi} % replace with your own command
\begin{document}
\begin{frame}
   \frametitle{Test frame}
\end{frame}
\placelogofalse % turn the logo off (needs to be outside the {frame} environment)
\begin{frame}
   \frametitle{Test frame no logo}
\end{frame}
\placelogotrue % turn the logo back on for subsequent slides
\begin{frame}
   \frametitle{Test frame with logo again}
\end{frame}
\end{document}

With grouping and local redefinition

Another alternative, which doesn't require a conditional, would be to enclose the frame (or set of frames) in a group and redefine the logo template within the group.

\documentclass{beamer}

\logo{\color{red}\rule{.5cm}{.5cm}}
\newcommand{\nologo}{\setbeamertemplate{logo}{}} % command to set the logo to nothing
\title{A title}
\author{An author}

\begin{document}

\maketitle

\begin{frame}[t]\frametitle{Test frame}
\end{frame}

% must enclose the frame(s) without the logo in braces
% any number of frames can be within the group (here 2).

{\nologo
\begin{frame}\frametitle{Test frame no logo}
\end{frame}
\begin{frame}\frametitle{Another Test frame no logo}
\end{frame}
}

\begin{frame}\frametitle{Test frame with logo again}
\end{frame}
\end{document}
4

I was fighting to do the same on specific slides belonging to the same frame. My problem was that image was overlapping with the logo and navigation bars after zooming.

I figured it out extending the above solution by Alan and decided to share in case someone has the same problem:

\documentclass{beamer}

\usepackage{graphicx}

\title{A title}
\author{An author}
\logo{\includegraphics[height=0.8cm]{logo.pdf}}

\newcommand{\nologo}{\setbeamertemplate{logo}{}} % command to set the logo to nothing
\newcommand{\nonavi}{\setbeamertemplate{navigation symbols}{}} % command to set the navigation symbols to nothing

\begin{document}

\frame{\titlepage}

% show only the first slide of the frame with logo and navigation symbols present, give a label
\frame<1>[label=myframe]
{
  \frametitle{My frame}
  \framezoom<1><2>(0cm,0cm)(8cm,4cm)
  \includegraphics[width=\textwidth]{some_picture.pdf}
}

% bring back the frame using \againframe enclosed in braces with \nologo\nonavi
{\nologo\nonavi
\againframe<2>{myframe}
}

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.