You can set the headline
template:
\documentclass{beamer}
\usetheme{CambridgeUS}
\setbeamertemplate{headline}
{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,right,rightskip=1em]{section in head/foot}%
\usebeamerfont{subsection in head/foot}\hspace*{2ex}\insertshorttitle
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,left,leftskip=1em]{subsection in head/foot}%
\usebeamerfont{section in head/foot}\insertsectionhead\hspace*{2ex}
\end{beamercolorbox}}%
\vskip0pt%
}
\title{The Title}
\author{The Author}
\begin{document}
\section{Test Section One}
\begin{frame}
test
\end{frame}
\section{Test Section Two}
\begin{frame}
test
\end{frame}
\end{document}
Notice that infolines
by default inserts the title of the presentation in the footline
template, so you'll also need to redefine this template to avoid duplicate information; here's one possible redefinition:
\documentclass{beamer}
\usetheme{CambridgeUS}
\setbeamertemplate{headline}
{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,right,rightskip=1em]{section in head/foot}%
\usebeamerfont{subsection in head/foot}\hspace*{2ex}\insertshorttitle
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,left,leftskip=1em]{subsection in head/foot}%
\usebeamerfont{section in head/foot}\insertsectionhead\hspace*{2ex}
\end{beamercolorbox}}%
\vskip0pt%
}
\makeatletter
\setbeamertemplate{footline}
{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
\usebeamerfont{author in head/foot}\insertshortauthor~~\beamer@ifempty{\insertshortinstitute}{}{(\insertshortinstitute)}
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
\usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
\insertframenumber{} / \inserttotalframenumber\hspace*{2ex}
\end{beamercolorbox}}%
\vskip0pt%
}
\makeatother
\title{The Title}
\author{The Author}
\begin{document}
\section{Test Section One}
\begin{frame}
test
\end{frame}
\section{Test Section Two}
\begin{frame}
test
\end{frame}
\end{document}
And the result:
Here is a possible solution for this particular case. It completely redefines the headline to achieve the wanted effect. The headline is taken from the split
outer theme. Note that subsections are not included, as your image shows, although they can be added with little effort.
Redefined header (to be inserted in the preamble):
\makeatletter
\setbeamertemplate{headline}
{%
\leavevmode%
\@tempdimb=2.4375ex%
\multiply\@tempdimb by\beamer@sectionmax%
\ifdim\@tempdimb>0pt%
\advance\@tempdimb by 1.125ex%
\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\hfill \includegraphics[height=0.8\@tempdimb]{logo.jpeg} \hspace{1mm}~\vfil}%
\end{beamercolorbox}%
\fi%
}
\makeatother
The height of the header is calculated from the total number of sections and stored in \@tempdimb
. This height is used throughout the definition of the headline. In the code above the logo is included taking 80% of the height of the headline, so it will be automatically resized according to the total number of sections.
Example renderings
Two sections:
Five sections:
Best Answer