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.

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.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

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.

share|improve this answer
    
Thanks for your reply. It works as you have demonstrated. However, if I were to take –  Shrihari May 25 '12 at 1:13
    
@Shrihari perhaps you comment got cut. I don't understand the last sentence: "If I were to take"... –  Gonzalo Medina May 25 '12 at 1:17
    
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
    
@Shrihari I don't see an easy solution so perhaps it would be best to accept this answer (in case of doubt, please see How do you accept an answer? and open a fresh question with this issue. Follow-up questions like this are more than welcome! In your new question you can link to this question to provide the background. –  Gonzalo Medina May 25 '12 at 1:31
    
thanks for your help. Will do. –  Shrihari May 25 '12 at 1:40

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.