Related question: Is there any way to produce List of frames with beamer?
Consider the following MWE:
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage[brazil]{babel}
\newif\ifframeinlbf
\frameinlbftrue
\makeatletter
\newcommand\listofframes{\@starttoc{lbf}}
\makeatother
\addtobeamertemplate{frametitle}{}{%
\ifframeinlbf
\addcontentsline{lbf}{section}{\protect\makebox[2em][1]{%
\protect\usebeamercolor[fg]{structure}\insertframenumber\hfill}%
\insertframetitle\par}%
\else\fi
}
\begin{document}
\frameinlbffalse
\begin{frame}
\frametitle{List of frames}
\listofframes
\end{frame}
\frameinlbftrue
\begin{frame}
\frametitle{First frame}
\only<1-2>{Água mole em pedra dura \ldots}
\only<2>{\ldots tanto bate até que fura.}
\end{frame}
\begin{frame}
\frametitle{Second frame}
Água mole em pedra dura tanto bate até que fura.
\end{frame}
\end{document}
In the "List of frames" frame the "First frame" appears twice. What could I do to make it appear just once?
\only<2>because of the\only<1>, do I? – Larara Nov 10 '14 at 07:37\begin{frame}<2->because that would tell beamer to skip the first frame altogether. (I think.) – Ulrich Schwarz Nov 10 '14 at 07:52