Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Aug 18 '11 at 13:47

This question came from our site for professional and enthusiast programmers.

1 Answer 1

up vote 4 down vote accepted

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.

share|improve this answer
    
Works beautifully, thanks for the quick answer! –  Adam Aug 18 '11 at 14:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.