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?

1 Answer 1


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.

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.