Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a 2 hour presentation, which contains 3 parts.

I'm using Warsaw theme, which have a top bar of two vertical lists: section list at the left, and the subsection list at the right.

Can I add a vertical part list to the left-most of the top bar (like 1), or, a horizontal part list to the bottom-left of the frame (like 2)? Or anywhere?

screenshot

MWE:

\documentclass{beamer}

\usetheme{Warsaw}
\usecolortheme{spruce}

\title { Example Beamer }
\subtitle { Sub Title }
\author { Ray J. Stomach }

\AtBeginPart{
    \begin{frame}
        \partpage
    \end{frame}
}
\AtBeginSection{
    \begin{frame}
        \tableofcontents[currentsection]
    \end{frame}
}

\newcommand\testsubsection[1]{
    \subsection{#1}
    \begin{frame}
        \begin{itemize}
            \item A black cat
            \item jumps over a big
            \item a blat fox
        \end{itemize}
    \end{frame}
}

\begin{document}

\frame{\maketitle}

\part{Part 1}
    \section{Section 1}
       \testsubsection{Subsection A}
       \testsubsection{Subsection B}
       \testsubsection{Subsection C}

    \section{Section 2}
       \testsubsection{Subsection A}
       \testsubsection{Subsection B}
       \testsubsection{Subsection C}

    \section{Section 3}
       \testsubsection{Subsection A}
       \testsubsection{Subsection B}
       \testsubsection{Subsection C}

\part{Part 2}
    \section{Section 1}
       \testsubsection{Subsection A}
       \testsubsection{Subsection B}
       \testsubsection{Subsection C}

    \section{Section 2}
       \testsubsection{Subsection A}
       \testsubsection{Subsection B}
       \testsubsection{Subsection C}

    \section{Section 3}
       \testsubsection{Subsection A}
       \testsubsection{Subsection B}
       \testsubsection{Subsection C}

\part{Part 3}
    \section{Section 1}
       \testsubsection{Subsection A}
       \testsubsection{Subsection B}
       \testsubsection{Subsection C}

    \section{Section 2}
       \testsubsection{Subsection A}
       \testsubsection{Subsection B}
       \testsubsection{Subsection C}

    \section{Section 3}
       \testsubsection{Subsection A}
       \testsubsection{Subsection B}
       \testsubsection{Subsection C}

\end{document}
share|improve this question
    
Please add a minimal working example (MWE) with the important packages, \use*themes, the part-section setup … –  Qrrbrbirlbel Oct 6 '12 at 2:40
add comment

2 Answers

up vote 3 down vote accepted

Unfortunately, beamer doesn't offer part navigation bars out of the box, however you can create the necessary commands \insertpartnavigation and \insertpartnavigationhorizontal yourself:

\documentclass{beamer}

\usetheme{Warsaw}
\usecolortheme{spruce}

%%% Part navigation (http://tex.stackexchange.com/a/103431) %%%

% The templates "part in head/foot" and "part in head/foot shaded" control the appearance of the part navigation
\defbeamertemplate*{part in head/foot}{default}
{\insertparthead\hfil}
\defbeamertemplate*{part in head/foot shaded}{default}[1][50]
{\color{fg!#1!bg}\usebeamertemplate{part in head/foot}}
\setbeamercolor{part in head/foot}{parent=section in head/foot,fg=red}

\makeatletter
\def\insertpartnavigation#1{%
  \ifnum\c@part>0
  \hbox to #1{%
    \vbox{{\usebeamerfont{section in head/foot}\usebeamercolor[fg]{part in head/foot}%
     \vskip0.5625ex%
     \def\slideentry##1##2##3##4##5##6{}%
     \def\sectionentry##1##2##3##4##5{}%
     \def\partentry##1##2{
       \def\insertparthead{##1}
       \def\insertpartheadnumber{##2}%
       \setbox\beamer@tempbox=\hbox{%
         \hyperlink{Outline##2}{\hbox to #1{%
             \hskip0.3cm%
             \ifnum\c@part=##2%
               {\usebeamertemplate{part in head/foot}}%
             \else%
               {\usebeamertemplate{part in head/foot shaded}}%
             \fi\hskip0.3cm}}}%
       \ht\beamer@tempbox=1.6875ex\dp\beamer@tempbox=0.75ex%
       \box\beamer@tempbox}%
     \dohead\vskip0.5625ex}}\hfil}\fi}

\def\insertpartnavigationhorizontal#1#2#3{%
  \ifnum\c@part>0
  \hbox to #1{{%
     \def\slideentry##1##2##3##4##5##6{}%
     \def\sectionentry##1##2##3##4##5{}%
     \def\partentry##1##2{% part title, part numer
       \hskip1.875ex plus 1fill
       \hbox{\def\insertparthead{##1}%
         \def\insertpartheadnumber{##2}%
         {%
           \usebeamerfont{part in head/foot}\usebeamercolor[fg]{part in head/foot}%
           \ifnum\c@part=##2%
             \hyperlink{Outline##2}{{\usebeamertemplate{part in head/foot}}}%
           \else%
             \hyperlink{Outline##2}{{\usebeamertemplate{part in head/foot shaded}}}%
           \fi}%
       }%
       \ignorespaces}
     #2%
     \usebeamerfont{part in head/foot}\usebeamercolor[fg]{part in head/foot}%
     \hskip-1.875ex plus-1fill\dohead%
     \hfil%
     #3}}\fi}

% Headline with part navigation
\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=.5\paperwidth,ht=\@tempdimb]{section in head/foot}%
      \vbox to\@tempdimb{\vfil\insertpartnavigation{.25\paperwidth}\vfil}%
      \vbox to\@tempdimb{\vfil\insertsectionnavigation{.25\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%
}

% Footline with part navigation
\setbeamertemplate{footline}
{%
  \leavevmode%
  \hbox{%
  \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm]{author in head/foot}%
    \insertpartnavigationhorizontal{.3\paperwidth}{}{\hskip0pt plus1filll}\hfill\usebeamerfont{author in head/foot}\insertshortauthor
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}%
    \usebeamerfont{title in head/foot}\insertshorttitle
  \end{beamercolorbox}}%
  \vskip0pt%
}
\makeatother

%%% End of code for part navigation %%%

\title{Example Beamer}
\subtitle{Sub Title}
\author{Ray J. Stomach}

\AtBeginPart{
    \begin{frame}
        \partpage
    \end{frame}
}
\AtBeginSection{
    \begin{frame}
        \tableofcontents[currentsection]
    \end{frame}
}

\newcommand\testsubsection[1]{
    \subsection{#1}
    \begin{frame}
        \begin{itemize}
            \item A black cat
            \item jumps over a big
            \item a blat fox
        \end{itemize}
    \end{frame}
}

\begin{document}
\frame{\maketitle}
\part{Part 1}
    \section{Section 1}
       \testsubsection{Subsection A}
       \testsubsection{Subsection B}
       \testsubsection{Subsection C}
    \section{Section 2}
       \testsubsection{Subsection A}
       \testsubsection{Subsection B}
       \testsubsection{Subsection C}
    \section{Section 3}
       \testsubsection{Subsection A}
       \testsubsection{Subsection B}
       \testsubsection{Subsection C}
\part{Part 2}
    \section{Section 1}
       \testsubsection{Subsection A}
       \testsubsection{Subsection B}
       \testsubsection{Subsection C}
    \section{Section 2}
       \testsubsection{Subsection A}
       \testsubsection{Subsection B}
       \testsubsection{Subsection C}
    \section{Section 3}
       \testsubsection{Subsection A}
       \testsubsection{Subsection B}
       \testsubsection{Subsection C}
\part{Part 3}
    \section{Section 1}
       \testsubsection{Subsection A}
       \testsubsection{Subsection B}
       \testsubsection{Subsection C}
    \section{Section 2}
       \testsubsection{Subsection A}
       \testsubsection{Subsection B}
       \testsubsection{Subsection C}
    \section{Section 3}
       \testsubsection{Subsection A}
       \testsubsection{Subsection B}
       \testsubsection{Subsection C}
\end{document}

example slide with part navigation in head- and footline

Of course, you don't need a part navigation in both the head- and footline, you can simply delete either the redefinition \setbeamertemplate{headline}{...} or \setbeamertemplate{footline}{...} to remove the superfluous one. Or you can create your own one using the newly introduced macros \insertpartnavigation and \insertpartnavigationhorizontal - they are used exactly like the corresponding commands \insertsectionnavigation(horizontal), cf. the beamer user guide, p. 64.

The appearance of the part navigation is controlled by the templates part in head/foot and part in head/foot shaded, so you can e.g. change its color by issuing something like \setbeamercolor{part in head/foot}{fg=white}.

share|improve this answer
add comment

I had a similar problem and could not find any "elegant" solution on the internet, so I came up with a kind of dirty hack, as following:

\documentclass{beamer}
\usetheme{Warsaw}
\usecolortheme{spruce}

\title { Example Beamer }
\subtitle { Sub Title }
\author [\hyperlink{part1}{Part 1} \hyperlink{part2}{Part 2} \hyperlink{part3}{Part 3} \hspace{.18\textwidth} Ray J. Stomach]{ Ray J. Stomach }

\AtBeginPart{
    \begin{frame}
        \partpage
    \end{frame}
}
\AtBeginSection{
    \begin{frame}
        \tableofcontents[currentsection]
    \end{frame}
}

\newcommand\testsubsection[1]{
    \subsection{#1}
    \begin{frame}
        \begin{itemize}
            \item A black cat
            \item jumps over a big
            \item a blat fox
        \end{itemize}
    \end{frame}
}

\begin{document}

\frame{\maketitle}

\hypertarget{part1}{\part{Part 1}}
    \section{Section 1}
       \testsubsection{Subsection A}
       \testsubsection{Subsection B}
       \testsubsection{Subsection C}

    \section{Section 2}
       \testsubsection{Subsection A}
       \testsubsection{Subsection B}
       \testsubsection{Subsection C}

    \section{Section 3}
       \testsubsection{Subsection A}
       \testsubsection{Subsection B}
       \testsubsection{Subsection C}

\hypertarget{part2}{\part{Part 2}}
    \section{Section 1}
       \testsubsection{Subsection A}
       \testsubsection{Subsection B}
       \testsubsection{Subsection C}

    \section{Section 2}
       \testsubsection{Subsection A}
       \testsubsection{Subsection B}
       \testsubsection{Subsection C}

    \section{Section 3}
       \testsubsection{Subsection A}
       \testsubsection{Subsection B}
       \testsubsection{Subsection C}

\hypertarget{part3}{\part{Part 3}}
    \section{Section 1}
       \testsubsection{Subsection A}
       \testsubsection{Subsection B}
       \testsubsection{Subsection C}

    \section{Section 2}
       \testsubsection{Subsection A}
       \testsubsection{Subsection B}
       \testsubsection{Subsection C}

    \section{Section 3}
       \testsubsection{Subsection A}
       \testsubsection{Subsection B}
       \testsubsection{Subsection C}

\end{document}

What I did was to add three hyperlinks in square brackets in \author so that they show only in the bottom bar. Then I added three hypertargets to the three parts. I'm sure there is a better solution for this, but this at least works.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.