6

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.

4

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.

  • Thanks for your reply. It works as you have demonstrated. However, if I were to add an [allowframebreaks] tag to any frame that is to be listed in the lbf file (e.g any of the Test Frames), it would result in an error - "Argument of \beamer@usebeamertemplatedosss has an extra }". Assuming the [allowframebreaks] is necessary, can the solution be modified to work with it ? – Shrihari May 25 '12 at 1:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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