[Tex/LaTex] Logo Top Right Latex Beamer Warsaw Presentation

beamergraphicslogos

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}

Best Answer

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

Related Question