7

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

\AtBeginSubsection[]
{
    \begin{frame}{Outline}
        \tableofcontents[currentsection,currentsubsection]
    \end{frame}
}

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

6

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:

\begingroup
\AtBeginSubsection{}
\subsection{No TOC}
\begin{frame}
...
\end{frame}
\endgroup
\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.

You must log in to answer this question.

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