27

I wanted to show a plan before every section in my presentation, so I have added the following code before \begin{document}

\AtBeginSection[]
{
 \begin{frame}<beamer>
 \frametitle{Plan}
 \tableofcontents[currentsection]
 \end{frame}
}

Now I would like to always do that except the first section, does anyone know how to deal with this exception?

25

Put the code you've mentioned after the \section to which you want it to apply from, rather than in the preamble

...
\section{Not in the list}
...
\AtBeginSection[]
  {
     \begin{frame}<beamer>
     \frametitle{Plan}
     \tableofcontents[currentsection]
     \end{frame}
  }
\section{First in the list}
  • 1
    It worked for me only when applying it BEFORE the \section – M.C. Mar 1 '16 at 13:14
  • Did not work for me but \AtBeginSection[] { \begin{frame}{Lecture Overview} \tableofcontents[currentsection] \end{frame} } did – Julian Karls Sep 26 '17 at 13:50
10

I'm late to the party, but the solution by Joseph Wright does not help if you want to add that part to a beamer style.

A hack that I came up with:

\AtBeginSection[]
  {
    \ifnum \value{framenumber}>1
      \begin{frame}<beamer>
      \frametitle{Plan}
      \tableofcontents[currentsection]
      \end{frame}
    \else
    \fi
  }

This just checks if the framenumber is larger than 1 before printing the frame at the begin of each section. If the appearance of the first section is later than that, just switch the number to the appropriate one.

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.