7

I am using Beamer Warsaw for a presentation. I need to modify the headline and the footline, since the title of the work is very long. Therefore, for the footline the adjustment is:

\setbeamertemplate{footline}
{
  \leavevmode%
  \hbox{%
  \begin{beamercolorbox}[wd=.25\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
    \usebeamerfont{author in head/foot}\insertshortauthor
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.75\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
    \usebeamerfont{title in head/foot}\insertshorttitle\hspace*{3em}
  \end{beamercolorbox}}%
  \vskip0pt%
}

While for the headline I do not know what I have to modify. I tried with:

\setbeamertemplate{headline}
{
  \leavevmode%
  \hbox{%
  \begin{beamercolorbox}[wd=.25\paperwidth]{section in head/foot}%
    \usebeamerfont{subsection in head/foot}\insertsectionhead
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.75\paperwidth]{subsection in head/foot}%
    \usebeamerfont{section in head/foot}\insertsubsectionhead
  \end{beamercolorbox}}%
  \vskip0pt%
}

but obviously it does not work.

1
  • Maybe using short titles for the presentation/section/subsection would be a better practice (if you're not already using them). For example, \title[short title]{Full version of the presentation title}, \section[short title]{Full version of section title}
    – Herr K.
    Commented Jul 9, 2013 at 2:07

1 Answer 1

12

Warsaw internally uses the shadow outer theme which, in its turn, uses the split outer theme which defines the headline (when the compress option is not activated) as

\defbeamertemplate*{headline}{split theme}
{%
  \leavevmode%
  \@tempdimb=2.4375ex%
  \ifnum\beamer@subsectionmax<\beamer@sectionmax%
    \multiply\@tempdimb by\beamer@sectionmax%
  \else%
    \multiply\@tempdimb by\beamer@subsectionmax%
  \fi%
  \ifdim\@tempdimb>0pt%
    \advance\@tempdimb by 1.825ex%
    \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\insertsubsectionnavigation{.5\paperwidth}\vfil}%
    \end{beamercolorbox}%
  \fi%
}

Then you can easily change the width of the stripes:

\documentclass{beamer}
\usetheme{Warsaw}

\setbeamertemplate{footline}
{
  \leavevmode%
  \hbox{%
  \begin{beamercolorbox}[wd=.25\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
    \usebeamerfont{author in head/foot}\insertshortauthor
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.75\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
    \usebeamerfont{title in head/foot}\insertshorttitle\hspace*{3em}
  \end{beamercolorbox}}%
  \vskip0pt%
}

\makeatletter
\setbeamertemplate{headline}
{%
  \leavevmode%
  \@tempdimb=2.4375ex%
  \ifnum\beamer@subsectionmax<\beamer@sectionmax%
    \multiply\@tempdimb by\beamer@sectionmax%
  \else%
    \multiply\@tempdimb by\beamer@subsectionmax%
  \fi%
  \ifdim\@tempdimb>0pt%
    \advance\@tempdimb by 1.825ex%
    \begin{beamercolorbox}[wd=.25\paperwidth,ht=\@tempdimb]{section in head/foot}%
      \vbox to\@tempdimb{\vfil\insertsectionnavigation{.25\paperwidth}\vfil}%
    \end{beamercolorbox}%
    \begin{beamercolorbox}[wd=.75\paperwidth,ht=\@tempdimb]{subsection in head/foot}%
      \vbox to\@tempdimb{\vfil\insertsubsectionnavigation{.75\paperwidth}\vfil}%
    \end{beamercolorbox}%
  \fi%
}
\makeatother
\title{A reallly really really really long title just for the example}
\begin{document}

\section{A test section}
\begin{frame} test\end{frame}
\subsection{Test subsection one one}
\begin{frame} test\end{frame}
\subsection{Test subsection one two}
\begin{frame} test\end{frame}

\section{Another test section}
\begin{frame} test\end{frame}
\subsection{Test subsection two one}
\begin{frame} test\end{frame}
\subsection{Test subsection two two}
\begin{frame} test\end{frame}
\subsection{Test subsection two three}
\begin{frame} test\end{frame}

\end{document}

An image of one of the frames:

enter image description here

However, with the optional argument for \title, you can use a shorter title for the `footlinev to avoid the redefinitions:

\title[Short title]{A reallly really really really long title just for the example}
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .