5

Related to this question »Is there any way to produce List of frames with beamer?«

  1. Is there a way of combining TOC (section / subsection) with this listofframes? (e.g. frametitles just like subsubsection?
  2. Is it possible to combine this also with the beamerarticle Package to create a complete table of contents for a lecture manuscript?

The minimal example linked here does not allow that, I suppose we need something like:

\addcontentsline{toc}{subsubsection}{title}

rgbgr
  • 88
  • 5
  • 1
    Welcome to the site! Do you get what you want if you change \addtobeamertemplate{frametitle}{}{% \addcontentsline{lbf}{section}{\protect\makebox[2em][l]{% to \addtobeamertemplate{frametitle}{}{% \addcontentsline{toc}{section}{\protect\makebox[2em][l]{% ? – cmhughes Jul 26 '13 at 20:15
  • Thank you, this is what I tried, but didn't work for me... – rgbgr Jul 26 '13 at 21:17

1 Answers1

7

I am not sure it is a good ides to do this; the ToC might get really crowded with unnecessary information. Anyway, here' one possibility (but I don't know how robust will it be when changing to article and using beamerarticle):

\documentclass{beamer}

\newif\ifframeintoc

\makeatletter \addtobeamertemplate{frametitle}{}{% \mode<article> { \addcontentsline{toc}{subsubsubsection}{\insertframetitle\hfill} \addtocontents{toc}{\par} } \mode<presentation> {\ifframeintoc \addcontentsline{toc}{subsubsubsection}{% \protect\hspace{2em}\footnotesize% \protect\hyperlink{page. \insertframenumber}{\insertframetitle}\par}% \fi } } \makeatother

\begin{document}

\begin{frame} \frametitle{General outline} \tableofcontents \end{frame}

\frameintoctrue% activate frame titles in ToC \section{Test section one} \subsection{Test subsection one} \begin{frame} \frametitle{Test Frame One} test \end{frame}

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

\subsection{Test subsection two} \begin{frame} \frametitle{Test Frame Three} test \end{frame}

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

\section{Test section two} \subsection{Test subsection one} \begin{frame} \frametitle{Test Frame Five} test \end{frame}

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

\subsection{Test subsection two} \begin{frame} \frametitle{Test Frame Seven} test \end{frame}

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

\end{document}

An image of the ToC in presentation mode (frame titles are hyperlinked to their corresponding frame):

enter image description here

And now, with the same settings but replacing

\documentclass{beamer}

with

\documentclass{article}
\usepackage{beamerarticle}

the ToC looks like

enter image description here

Ingmar
  • 6,690
  • 5
  • 26
  • 47
Gonzalo Medina
  • 505,128