1

I am trying to make a custom slide to use as an inter-sectional slide in order to replace the more typical code:

\AtBeginSection{
    \begin{frame}[c,plain,noframenumbering]
        \frametitle{Agenda}
        \tableofcontents[currentsection,hideothersubsections]
    \end{frame}
}

I have created a frame and labeled it Overview. Then, I want to do the following:

\AtBeginSection{
    \againframe<2|handout:2>{Overview}
}

Before each \section, I redefine some variables in order to modify my overview slide as appropriate for the current section. All of this works great.

The problem I am running into, however, is I need for the overlay number (in this case, 2) to auto-increment each time \AtBeginSection is invoked so as to prevent Beamer from giving me an error about a multiply defined overlay.

In short: How do I get \againframe<#>{SlideLabel} to automatically increment to the last overlay state, plus one (i.e., # = end + 1).

Edit: Here is an MWE of what I am trying to do. Compiling this results in the error, "LaTeX Warning: Label `Overview<2>' multiply defined.

\documentclass[11pt,t]{beamer}
\usepackage{lmodern}
\begin{document}

\begin{frame}[label=Overview]
    \frametitle{Overview Slide}
    \begin{itemize}
        \item Section 1
        \item Section 2
    \end{itemize}
\end{frame}

\AtBeginSection{
    \againframe<2|handout:2>{Overview}
}

\section{Section 1}
\begin{frame}
    \frametitle{Body slide 1}
    \begin{itemize}
        \item Some body text
    \end{itemize}
\end{frame}

\section{section 2}
\begin{frame}
    \frametitle{Body slide 2}
    \begin{itemize}
        \item Some body text
    \end{itemize}
\end{frame}

\end{document}
3

If I understood your intent correctly, you could use a user defined counter and increase it at every section to avoid the label duplication:

\documentclass[11pt,t]{beamer}
\usepackage{lmodern}

\newcounter{mycount}

\AtBeginSection{\stepcounter{mycount}%
    \againframe<\themycount|handout:\themycount>{Overview}
}

\begin{document}

\begin{frame}<\themycount>[label=Overview]
    \frametitle{Overview Slide}
    \begin{itemize}
        \item Section 1
        \item Section 2
    \end{itemize}
\end{frame}

\section{Section 1}
\begin{frame}
    \frametitle{Body slide 1}
    \begin{itemize}
        \item Some body text
    \end{itemize}
\end{frame}

\section{section 2}
\begin{frame}
    \frametitle{Body slide 2}
    \begin{itemize}
        \item Some body text
    \end{itemize}
\end{frame}

\end{document}
  • Thank you! This worked perfectly! I used your above solution with one minor modification: I added \setcounter{mycount}{7} after \newcount to allow the counter to start at the last overlay of my overview slide. One quick question, after reading about \setcounter, I am wondering if there is a difference between doing \themycount versus \usecounter? – Karan Mistry May 5 '13 at 3:41

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.