By help of the answer Is there any way to produce List of frames with beamer? I succesfully created a list of frames. But I'd also like to include the section titles inbetween. This answer unfortunately does not work for me, as I need the original ToC untouched.
So I thought I could create a commamd \sectioninlbf which I call behind every \section (can be automated later...) and create a new content line in the lbf-file. However the \insertsection command seems to be ignored totally.
What am I doing wrong?
MWE
\documentclass{beamer}
\usepackage{hyperref}
\makeatletter
\newcommand\listofframes{\@starttoc{lbf}}
\makeatother
\makeatletter
\addtobeamertemplate{frametitle}{}{%
\mode<presentation>
{
\only<1>{
\hypertarget{\insertframetitle}{}%
\addcontentsline{lbf}{section}{\protect\makebox[2em][l]{%
\protect\usebeamercolor[fg]{structure}\scriptsize\insertframenumber\hfill}%
\ifx\insertframesubtitle\@empty%
\scriptsize\protect\hyperlink{\insertframetitle}{\insertframetitle}%
\else%
\scriptsize\protect\hyperlink{\insertframetitle}{\insertframesubtitle}%
\fi%
\par}%
}
}
}
\makeatother
\newcommand{\sectioninlbf}{
\addcontentsline{lbf}{section}{%
\vspace{0.3\baselineskip}
\protect\footnotesize%
\protect\insertsection Here I want the section title.\par}%
}
\begin{document}
\begin{frame}
\frametitle{General outline}
\tableofcontents[hideallsubsections]
\end{frame}
\begin{frame}
\frametitle{List of Frames}
\listofframes
\end{frame}
\section{Test section one}\sectioninlbf
\begin{frame}
\frametitle{Test Frame One}
test
\end{frame}
\section{Test section two}\sectioninlbf
\begin{frame}
\frametitle{Test Frame Two}
\framesubtitle{Test Frame Two Subtitle}
test
\end{frame}
\begin{frame}
\frametitle{Test Frame Three}
\uncover<1->{test}
\uncover<2->{test}
\uncover<3->{test}
\end{frame}
\end{document}
Update
As Sam Carter's answer changes my initial approach, I needed to extend the MWE to include some more requirements: If a framesubtitle exists, the framesubtitle should subsititute the frametitle in the ToC. Also the frame numbers are required. Also I use different frametitle templates, some of them add the frametitles and framesubtitles to the ToC, some of the don't. So I don't know if patching the base-command of frametitle is a good idea, unless an on/off switch exists.



\tableofcontents[hideallsubsections]will still give you the original toc – samcarter_is_at_topanswers.xyz Sep 13 '16 at 17:52uncoverand so on, with my approach now I can handle it quite easy, that I just get an entry for the first occurence. Your linked solution doesn't seem to provide that functionality easily. – Robert Seifert Sep 13 '16 at 18:45