1

I'm working on a long beamer presentation for a lecture.

I would like to create a table of contents for the whole presentation, listing sections, chapters and also the title of each frame, in a separate pdf file in A4 format.

It would also be useful to add to this separated pdf a print of all the slides with the notes, representing about 3 slides per page.

Do you have any idea on how to do this?

P.S. I'm using as theme "Sapienza Presentation" (https://www.overleaf.com/latex/templates/sapienza-presentation/yyksmrskffhk)

EDIT: The following code could be used as test. The chapter environment declaration and all the images used by the theme template can be found on the overleaf template link. As output I expect a table of contents similar to:

Sapienza Beamer Presentation Theme

  • First Section
    • Chapter A
      • Slide 1
      • Slide 2
      • Slide 3
    • Chapter B
      • Slide 4
      • Slide 5
  • Second Section
    • Chapter C
      • Slide 6
      • Slide 7

and after that a print of all slides with the respective notes.

\documentclass{beamer}
\usepackage{amsfonts,amsmath,oldgerm}
\usetheme{sintef}

\newcommand{\testcolor}[1]{\colorbox{#1}{\textcolor{#1}{test}}~\texttt{#1}}

\usefonttheme[onlymath]{serif}

\titlebackground*{assets/background}

\newcommand{\hrefcol}[2]{\textcolor{cyan}{\href{#1}{#2}}}

\title{Sapienza Beamer Presentation Theme}
\subtitle{Using \LaTeX\ to prepare slides}
\course{Master's Degree in Computer Science}
\author{\href{mailto:[email protected]}{Andrea Gasparini}}
\IDnumber{1234567}
\date{Academic Year 2021/2022}

\setbeameroption{show notes on second screen}
\setbeamertemplate{note page}[default] % See Beamer User Guide pag.197

\begin{document}
\maketitle

\section{First Section}
    \begin{chapter}[assets/background_negative]{}{Chapter A}
    \end{chapter}
        \begin{frame}{Slide 1}
            \note[item]{Note to Slide 1}
        \end{frame}
        \begin{frame}{Slide 2}
            \note[item]{Note to Slide 2}
        \end{frame}
        \begin{frame}{Slide 3}  
            \note[item]{Note to Slide 3}
        \end{frame}

    \begin{chapter}[assets/background_negative]{}{Chapter B}
    \end{chapter}
        \begin{frame}{Slide 4}
        \end{frame}
        \begin{frame}{Slide 5}  
        \end{frame}

\section{Second Section}
    \begin{chapter}[assets/background_negative]{}{Chapter C}
    \end{chapter}
        \begin{frame}{Slide 6}   
        \end{frame}
        \begin{frame}{Slide 7}
        \end{frame}
\end{document}
2
  • 2
    Please add a short test document to your question. Commented Apr 29 at 15:05
  • Just a guess: Sounds like you want to make a handout. See chapter 21 in the beamer manual or maybe also the package handoutwithnotes for handouts with notes.
    – cabohah
    Commented Apr 29 at 15:37

1 Answer 1

1

Adding frametitles to toc

This has already be solved at https://tex.stackexchange.com/a/17233/36296

You just might want to make some adjustments to hide the Chapter A frames which your theme generates. Here some dirty hack:

\documentclass{beamer}
\usepackage{amsfonts,amsmath,oldgerm}
\usetheme{sintef}

\setbeameroption{show notes on second screen}

\newcommand{\testcolor}[1]{\colorbox{#1}{\textcolor{#1}{test}}~\texttt{#1}}

\usefonttheme[onlymath]{serif}

\titlebackground*{assets/background}

\newcommand{\hrefcol}[2]{\textcolor{cyan}{\href{#1}{#2}}}

\title{Sapienza Beamer Presentation Theme}
\subtitle{Using \LaTeX\ to prepare slides}
\course{Master's Degree in Computer Science}
\author{\href{mailto:[email protected]}{Andrea Gasparini}}
\IDnumber{1234567}
\date{Academic Year 2021/2022}

\usepackage{bookmark}
\usepackage{etoolbox}

\newtoggle{hidetitles}
\togglefalse{hidetitles}

\makeatletter
% save the current definition of \beamer@@frametitle
\let\nobookmarkbeamer@@frametitle\beamer@@frametitle
% then patch it to do the bookmarks and/or TOC entries
\apptocmd{\beamer@@frametitle}{%
  % keep this to add the frame title to the TOC at the "subsection level"
  \iftoggle{hidetitles}{}{
  \addtocontents{toc}{\protect\beamer@subsectionintoc{\the\c@section}{0}{~~~~#1}{\the\c@page}{\the\c@part}%
        {\the\beamer@tocsectionnumber}}%
  }
  % keep this line to add a bookmark that shows up in the PDF TOC at the subsection level
  \bookmark[page=\the\c@page,level=3]{#1}%
  }%
  {\message{** patching of \string\beamer@@frametitle succeeded **}}%
  {\errmessage{** patching of \string\beamer@@frametitle failed **}}%

\pretocmd{\beamer@checknoslide}{%
  % ensure the bookmark is not created if the slide is filtered out
  \let\beamer@@frametitle\nobookmarkbeamer@@frametitle
  }%
  {\message{** patching of \string\beamer@checknoslide succeeded **}}%
  {\errmessage{** patching of \string\beamer@checknoslide failed **}}%


\renewenvironment{chapter}[3][]{% Args: image (optional), color, frame title
  \begingroup
  \addtocontents{toc}{\protect\beamer@subsectionintoc{\the\c@section}{0}{#3}{\the\c@page}{\the\c@part}%
          {\the\beamer@tocsectionnumber}}%
  \themecolor{main}
  \setbeamertemplate{footline}{}
  \ifstrempty{#2}{
    \setbeamercolor{frametitle}{fg=white}
    \setbeamercolor{normal text}{fg=white,bg=maincolor}
  }{
    \setbeamercolor{frametitle}{fg=white}
    \setbeamercolor{normal text}{fg=white,bg=#2}
  }
  \ifstrempty{#1}{}{\setbeamertemplate{background}{\TikzSplitSlide{#1}}}
  \setbeamertemplate{frametitle}{%
    \vspace*{8ex}
    \begin{beamercolorbox}[wd=0.45\textwidth]{frametitle}
      \usebeamerfont{frametitle}\insertframetitle\\
      \usebeamerfont{framesubtitle}\insertframesubtitle
    \end{beamercolorbox}
  }
  \toggletrue{hidetitles}
  \begin{frame}{#3}
  \hspace*{0.05\textwidth}%
  \minipage{0.35\textwidth}%
  \usebeamercolor[fg]{normal text}%
}{%
  \endminipage
  \end{frame}
  \endgroup
}

% Define sectioning and table of contents
\AtBeginSection[]
{
    \begingroup
    \toggletrue{hidetitles}
    \themecolor{main}
    \begin{frame}{Table of Contents}
        \tableofcontents[currentsection]
    \end{frame}
    \endgroup
}

\makeatother


\begin{document}
\maketitle

\begin{frame}
\tableofcontents
\end{frame}

\section{First Section}
    \begin{chapter}[assets/background_negative]{}{Chapter A}
    \end{chapter}
        \begin{frame}{Slide 1}
        \end{frame}
        \begin{frame}{Slide 2} 
        \end{frame}
        \begin{frame}{Slide 3}  
        \end{frame}

    \begin{chapter}[assets/background_negative]{}{Chapter B}
    \end{chapter}
        \begin{frame}{Slide 4}
        \end{frame}
        \begin{frame}{Slide 5}  
        \end{frame}

\section{Second Section}
    \begin{chapter}[assets/background_negative]{}{Chapter C}
    \end{chapter}
        \begin{frame}{Slide 6}   
        \end{frame}
        \begin{frame}{Slide 7}
        \end{frame}
\end{document}

Generating an A4 document with doc and slide overview

Use a new .tex document and replace in the code below document with the name of the presentation and 14 with how many slides you have.

\documentclass[t]{beamer}

\geometry{a4paper}

\usepackage{pgffor}
\usepackage{pdfpages}

\makeatletter
\newcommand{\mytoc}{%
  \def\beamer@toc@cs{show}%
  \def\beamer@toc@os{show}%
  \def\beamer@toc@css{show}%
  \def\beamer@toc@oss{show}%
  \def\beamer@toc@ooss{show}%
  \def\beamer@toc@csss{show}%
  \def\beamer@toc@osss{show}%
  \def\beamer@toc@oosss{show}%
  \def\beamer@toc@ooosss{show}%
  \beamer@showpartnumber=\c@part%
  \beamer@pausesectionsfalse%
  \beamer@pausesubsectionsfalse%
  \def\beamer@tocsections{<*>}%
  \setkeys{beamertoc}{firstsection=1}%
  {\makeatletter%
    \pause[0]%
    \@input{document.toc}%
    }%
  \vfill
}
\makeatother

\begin{document}

\begin{frame}
\mytoc
\end{frame}

\includepdf[page=1-,nup=1x3]{document}

\end{document}

enter image description here enter image description here

You must log in to answer this question.

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