42

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?

2 Answers 2

37

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}
2
  • 1
    It worked for me only when applying it BEFORE the \section
    – M.C.
    Commented Mar 1, 2016 at 13:14
  • Did not work for me but \AtBeginSection[] { \begin{frame}{Lecture Overview} \tableofcontents[currentsection] \end{frame} } did Commented Sep 26, 2017 at 13:50
17

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.

1
  • Just use \value{section} then you do not need to manually adapt the number
    – koalo
    Commented Jan 28, 2023 at 21:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .