TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I used the following standard beamer code to create a table of contents at the beginning of each subsection:


However, I want to customize the ToC of some subsections; something like:

IF \subsectionname != "..." Then it's OK to show the standard ToC.

How can I do this?

share|improve this question
up vote 3 down vote accepted

For specific subsections you may modify the behavior before they start: you could change \AtBeginSubsection locally. This means you could change that, for a subsection, but keep this change local by enclosing it within a group. For example, disabling \AtBeginSubsection and thus the subsection TOC:

\subsection{No TOC}
\subsection{Here's a TOC}

After the group ended, the globally by \AtBeginSubsection defined macro returns being active. The following subsections will show the TOC - I tested it.

This works because \AtBeginSubsection uses \def to redefine internal macros, which works local, thus visible only inside a group, in contrary to \gdef.

share|improve this answer

Your Answer


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.