Related to this question, I am trying to put a logo on the top right side of each slide in a beamer document.
This is my code:
\documentclass[10pt]{beamer}
% This is the file main.tex
\usetheme{Warsaw}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{tikz}
\setbeamertemplate{navigation symbols}{}%remove navigation symbols
\setbeamercovered{transparent}
\makeatother
%\pgfdeclareimage[height=0.45cm]{logo}{figures/ubuntu-logo32}
%\logo{\pgfuseimage{logo}}
\title{title}
\author{Name Surname}
\institute{Institute\\[\medskipamount]\includegraphics[scale=0.2]{figures/ubuntu-logo32.png}}
%\email{alpha@beta.com}
\date{date\\ place}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\addtobeamertemplate{frametitle}{}{%
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north east,yshift=-6pt] at (current page.north east) {\includegraphics[scale=0.07]{figures/ubuntu-logo32.png}};
\end{tikzpicture}
}
\frame{
\transsplitverticalin
\frametitle{Summary}\tableofcontents
}
\section{Section}
\frame{\sectionpage}
\subsection{subsection}
\frame{
\frametitle{title}
\begin{block}{title}
title
\begin{itemize}
\item {title};
\item {title};
\item {title};
\item {title};
\end{itemize}
\end{block}
\begin{alertblock}{title}
title
\begin{itemize}
\item {title};
\end{itemize}
\end{alertblock}
\begin{exampleblock}{title}
title
\begin{itemize}
\item {title};
\item {title};
\item {title};
\item {title};
\end{itemize}
\end{exampleblock}
}
\end{document}
However, I noticed the following issues:
1) I have to manually select the position of the logo, which is a bit annoying. Is there any automatic way to position the logo?
2) It seems that my code "steal" some space before the first block. This is a particularly undesired effect, since it reduces the overall space for content. This is the difference between the slide with the logo:
and the slide without the logo:
How could I reduce the space above the first block without removing the logo on the top right of the slide?
Best Answer
Instead of using this
tikz
approach and dealing with the additional vertical space, you could add your logo to the definition of the frametitle