[Tex/LaTex] Skipping outline table of contents of some sections in beamer

beamersectioningtable of contents

I'm trying to make a table of contents for a beamer presentation, and I want to have the outline show up for every section except the first. Right now I'm using:

\AtBeginSection[] {
  \begin{frame}[t]
    \frametitle{Overview}
      \tableofcontents[sectionstyle=show/shaded,hideothersubsections]
  \end{frame}
} 

Normally I can do this using \section*, but that makes it not show up in the table of contents at all. Is there a way to have it do the table of contents after every section, but skip the first one and still have the first section in the table of contents?

Best Answer

Use a conditional based on the section counter to decide whether to include the table of contents frame. Here, I use the \ifnumcomp macro from etoolbox

\usepackage{etoolbox}

\AtBeginSection[] {
\ifnumcomp{\value{section}}{=}{1}{}
  {
  \begin{frame}[t]
    \frametitle{Overview}
      \tableofcontents[sectionstyle=show/shaded,hideothersubsections]
  \end{frame}
  }
} 

If the section number is 1, then the first (empty) set of braces will be used. Otherwise the second set of braces (with the frame in it) will be used.