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 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?

share|improve this question

1 Answer 1

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:

\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.

share|improve this answer

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.