1

How do I place a logo in the center (center height, and center width) of the top right purple box which appears on every slide of the Warsaw theme?

Here is the code for the talk so far:

%% Help logo top right code
\documentclass{beamer}

%% Use warsaw theme
\usetheme{Warsaw}

%% Stuff for the title page
\title[]{Example slides}
\subtitle[]{Logo Top Right} 
\author[]{Christopher Meaney} 

%% Content of talk begins here
\begin{document}

%% Insert title
\begin{frame} 
\titlepage 
\end{frame}

%% Insert toc
\begin{frame} 
\tableofcontents 
\end{frame}

%% Section 1
\section{Section 1}
%% Section 1 slide 1
\begin{frame}
\frametitle{Section 1}
Test section 1
\end{frame}

%% Section 2
\section{Section 2}
%% Section 2 slide 2
\begin{frame}
\frametitle{Section 2}
Test section 2
\end{frame}

%% Section 3
\section{Section 3}
%% Section 3 slide 3
\begin{frame}
\frametitle{Section 3}
Test section 3
\end{frame}

\end{document}
  • You forgot the color theme, I suppose – user31729 Apr 7 '15 at 23:18
1

Very raw, but should serve as starting point. Only thing remaining is to calculate the vertical length of the box accurately (now bit large). You can play with \@tempdimb=5mm% , if you have only one section.

%% Help logo top right code
\documentclass{beamer}

%% Use warsaw theme
\usetheme{Warsaw}

\makeatletter
\ifbeamer@compress

\defbeamertemplate*{headline}{my split theme}
{%
  \leavevmode%
  \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex]{section in head/foot}%
    \insertsectionnavigationhorizontal{.5\paperwidth}{\hskip0pt plus1filll}{}%
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex]{subsection in head/foot}%
    \centering\includegraphics[width=5mm]{logo}%
  \end{beamercolorbox}%
}%

\else

\defbeamertemplate*{headline}{my split theme}
{%
  \leavevmode%
  \@tempdimb=2.5mm%
  \ifnum\beamer@subsectionmax<\beamer@sectionmax%
    \multiply \@tempdimb by \beamer@sectionmax%
  \else%
    \multiply\@tempdimb by\beamer@subsectionmax%
  \fi%
  \ifdim\@tempdimb>0pt%
    \advance\@tempdimb by 0.1ex%
    \begin{beamercolorbox}[wd=.5\paperwidth,ht=\@tempdimb]{section in head/foot}%
      \vbox to\@tempdimb{\vfil\insertsectionnavigation{.5\paperwidth}\vfil}%
    \end{beamercolorbox}%
    \begin{beamercolorbox}[wd=.5\paperwidth,ht=\@tempdimb]{subsection in head/foot}%
      \vbox to\@tempdimb{\vfil\centering\includegraphics[height=5mm]{logo}\vfil}%
    \end{beamercolorbox}%
  \fi%
}%

\fi
\makeatother

%% Stuff for the title page
\title[]{Example slides}
\subtitle[]{Logo Top Right}
\author[]{Christopher Meaney}
%\logo{\includegraphics[width=5mm]{logo}}

%% Content of talk begins here
\begin{document}

%% Insert title
\begin{frame}
\titlepage
\end{frame}

%% Insert toc
\begin{frame}
\tableofcontents
\end{frame}

%% Section 1
\section{Section 1}
%% Section 1 slide 1
\begin{frame}
\frametitle{Section 1}
Test section 1
\end{frame}

%% Section 2
\section{Section 2}
%% Section 2 slide 2
\begin{frame}
\frametitle{Section 2}
Test section 2
\end{frame}

%% Section 3
\section{Section 3}
%% Section 3 slide 3
\begin{frame}
\frametitle{Section 3}
Test section 3
\end{frame}

\end{document}

enter image description here

| improve this answer | |
1

Here is a TikZ simpler solution using the command \addtobeamertemplate{headline}{}{}.

\addtobeamertemplate{headline}{}{%
\begin{tikzpicture}[remember picture,overlay]
\node at([shift={(.25\paperwidth,-.42)}]current page.north) {\includegraphics[height=.5cm,width=.7cm]{logo}};
\end{tikzpicture}}

Only the vertical position should be manually adjusted for your need shift = {(.25\paperwidth,-.42)}. You can change -.42 as you wish. Here is a complete implementation.

%% Help logo top right code
\documentclass{beamer}
%% Use warsaw theme
\usetheme{Warsaw}
\usepackage{tikz}
%% Use warsaw theme
\usetheme{Warsaw}
%% Stuff for the title page
\title[]{Example slides}
\subtitle[]{Logo Top Right}
\author[]{Christopher Meaney}
\begin{document}

\addtobeamertemplate{headline}{}{%
\begin{tikzpicture}[remember picture,overlay]
\node at([shift={(.25\paperwidth,-.42)}]current page.north) {\includegraphics[height=.5cm,width=.7cm]{logo}};
\end{tikzpicture}}

%% Insert title
\begin{frame}
\titlepage
\end{frame}

%% Insert toc
\begin{frame}
\tableofcontents
\end{frame}

%% Section 1
\section{Section 1}
%% Section 1 slide 1
\begin{frame}
\frametitle{Section 1}
Test section 1
\end{frame}

%% Section 2
\section{Section 2}
%% Section 2 slide 2
\begin{frame}
\frametitle{Section 2}
Test section 2
\end{frame}

%% Section 3
\section{Section 3}
%% Section 3 slide 3
\begin{frame}
\frametitle{Section 3}
Test section 3
\end{frame}
\end{document}

enter image description here

| improve this answer | |

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.