[Tex/LaTex] Beamer presentation: List of frames within a section / part

beamertable of contents

With reference to Is there any way to produce List of frames with beamer?

how can this be done so as to only list the frames contained within a section in the title slide for that section, assuming a multi section/part presentation.

Best Answer

Here's ome possible solution generating a list of all frames used in a section, on a per section basis; here I used a simple modification of the answer you linked to; the boolean \ifframeinlbf allows to include (if true) or to exclude (if false) specific frames in the corresponding list:

\documentclass{beamer}
\usetheme{Berkeley}

\newif\ifframeinlbf
\frameinlbftrue

\makeatletter
\newcommand\listofframes{\vfill\@starttoc{lbf\thesection}}
\makeatother

\addtobeamertemplate{frametitle}{}{%
  \ifframeinlbf
  \addcontentsline{lbf\thesection}{section}{\protect\makebox[2em][l]{%
    \protect\usebeamercolor[fg]{structure}\insertframenumber\hfill}%
  \insertframetitle\vfill}%
  \else\fi%
}

\begin{document}

\section{Test Section One}

\frameinlbffalse
\begin{frame}
\frametitle{List of Frames for Section One}
\listofframes
\end{frame}

\frameinlbftrue
\begin{frame}
\frametitle{Test Frame One One}
test
\end{frame}

\begin{frame}
\frametitle{Test Frame One Two}
test
\end{frame}

\section{Test Section Two}

\frameinlbffalse
\begin{frame}
\frametitle{List of Frames for Section Two}
\listofframes
\end{frame}

\frameinlbftrue
\begin{frame}
\frametitle{Test Frame Two One}
test
\end{frame}

\begin{frame}
\frametitle{Test Frame Two Two}
test
\end{frame}

\begin{frame}
\frametitle{Test Frame Two Three}
test
\end{frame}

\end{document}

And the frames showing the lists of frames for each section:

enter image description here

enter image description here

One thing that can be improved is that this solution uses an auxiliary file for each section.

Related Question