[Tex/LaTex] Assembling multiple beamer slide decks into “book” with “chapters” and TOC

beamerchapterspage-numberingsectioningtable of contents

I have a number of related beamer slide decks that I'd like to print as a bound handout "book".

My file layout is as follows:

A general include file (include.tex) used by most other files:

\documentclass[12pt,table,english,t,compress]{beamer}
\author{...}
% \usepackage defintions

\title{...}

\usetheme{Warsaw}
\usecolortheme{seahorse}

% Various color and command definitions

Then, for each of my slide decks, I have a pair of files (deck_1.tex, deck_1_slides.tex) structured as follows:

% deck_1.tex

\input{include.tex}

\begin{document}

\input{deck_1_slides.tex}

\end{document}

And:

% deck_1_slides.tex

\subtitle{Deck 1 subtitle}

\begin{frame}
    \titlepage
\end{frame}

\begin{frame}
    \frametitle{Outline}

    %\tableofcontents[pausesections]
    \tableofcontents
\end{frame}


\section{Section A}

\begin{frame} \frametitle{XXX} ... \end{frame}
\begin{frame} \frametitle{YYY} ... \end{frame}
\begin{frame} \frametitle{ZZZ} ... \end{frame}

\section{Section B}

\begin{frame} \frametitle{AAA} ... \end{frame}
\begin{frame} \frametitle{BBB} ... \end{frame}
\begin{frame} \frametitle{CCC} ... \end{frame}

...

The above set up works fine for producing the individual slide decks. I get the conventional numbering "Page-N/Total-pages" on each slide, and I have Section TOCs that appear at the start of each section. All well and good.

However, I am stuck when it comes to producing the "book" version of the slides.
What I would like to do is this:

  1. Treat each slide deck as a numbered chapter. When producing the handout version, make the running number at the bottom of each slide "Chapter-number / slide-number" (i.e., drop the "Total slides").

  2. Change the Section TOC's in each slide deck to be just the "Section Title" or, perhaps the "Chapter Title" (i.e., the \subtitle in the decks above) plus the "Section Title".

  3. Produce a "Grand TOC" at the start of the "book", which consists of just the "Chapter" titles and "Section" titles. I'd like the Grand TOC to include the "Chapter-number / slide-number" page numbering used in the individual decks.

  4. Update: I realize that there is another point that I had in mind that I did not make explicit in my original formulation. In the grand TOC I'd like to see numbering of the form Chapter.Section.

For example, the Chapter.Section numbering in the Grant TOC might look like this:

1    Deck 1 title                   1-nn
1.1  Deck 1 Section 1 title         1-nn
1.2  Deck 1 Section 2 title         1-nn
1.3  Deck 1 Section 3 title         1-nn
2    Deck 2 title                   2-nn
2.1  Deck 2 Section 1 title         2-nn
2.2  Deck 2 Section 2 title         2-nn

("nn" are frame numbers)

Analogously, in the Deck TOCs I'd like to have something like this (here, for Deck 2)

2    Deck 2 title                   2-nn
2.1  Deck 2 Section 1 title         2-nn
2.2  Deck 2 Section 2 title         2-nn

I'm assuming all of the above is possible, since LaTeX is fairly flexible (I'm a relative newbie), but I'm a little lost trying to achieve the book version with the features described above (especially 1 and 3). Any tips would be greatly appreciated.

Best Answer

As proposed by the question-opener in the comments to my first answer, here a different approach: Change section to subsection and include the different decks a sections.

  • No changes in deck_n.tex.
  • Replace \section by \subsection in deck_n_slides.tex.
  • To specify the appearance of the "Deck TOC" use the options for for \tableofcontents. (e.g. use \tableofcontents[sectionstyle=hide,subsection=show] in deck_n_slides.tex).

Replace include.tex with

\documentclass[12pt,table,english,t,compress]{beamer}
\author{Author}
\institute{Institute}

\title{Title}

\usetheme{Warsaw}
\useoutertheme{infolines}
\usecolortheme{seahorse}

\makeatletter
    \let\origSubsection\subsection
    \def\subsection#1{\stepcounter{framenumber} \origSubsection[#1]{#1 \hfill \ \arabic{section} -- \arabic{framenumber}} \addtocounter{framenumber}{-1}}
    \let\origSection\section
    \def\section#1{\setcounter{framenumber}{1} \origSection[#1]{#1 \hfill \ \arabic{section} -- \arabic{framenumber}} \addtocounter{framenumber}{-1}}
\makeatother

\newcommand{\sectionnumber}[1]{\setcounter{section}{#1} \addtocounter{section}{-1}}

\setbeamertemplate{section in toc}{\inserttocsectionnumber~\inserttocsection}
\setbeamertemplate{subsection in toc}{\inserttocsectionnumber.\inserttocsubsectionnumber~\inserttocsubsection\\}

\makeatletter
\setbeamertemplate{footline}
{
    \leavevmode%
    \hbox
    {%
        \begin{beamercolorbox}[wd=.333333\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=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
            \usebeamerfont{title in head/foot}\insertshorttitle
        \end{beamercolorbox}%
        \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
            \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
            \insertsectionnumber{} -- \insertframenumber\hspace*{2ex} 
        \end{beamercolorbox}
    }%
    \vskip0pt%
}
\makeatother

For the collection of all slides you can use then handout.tex given as follows

% handout.tex

\input{include.tex}
\date{yyyy-mm-dd}

\begin{document}

\begin{frame}
    \titlepage
\end{frame}

\begin{frame}
    \frametitle{Grand TOC}
    \tableofcontents
\end{frame}

\input{deck_1_slides.tex}
\input{deck_2_slides.tex}

\end{document}