Generalbeamer | Make other Subsections invisible in ToC

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
markil
Posts: 1
Joined: Thu Jul 07, 2011 5:19 pm

beamer | Make other Subsections invisible in ToC

Post by markil »

Hello all,

I am working on the table of contents of a beamer presentation. I show it in the beginning of each section and subsection highlighting the current ones. By default the whole table of content is shown and the current part is highlighted.

However, I need to remove / make invisible the subsections of other sections and show only the subsections of the current section. For example:

Slide 1:

* Section 1
** Section 1.1
** Section 1.2


* Section 2


Slide 2:
* Section 1

* Section 2
** Section 2.1
** Section 2.2


If the subsections can be removed only with corresponding sections, this is also fine.

Please find the minimal working example below.

Code: Select all

\documentclass[a4,svgnames]{beamer}

\begin{document}

\AtBeginSection[]{
\frame{
\tableofcontents[currentsection]
}
}

\AtBeginSubsection[]{
\frame{
\tableofcontents[currentsection,currentsubsection]
}
}

\section{Section 1}
\subsection{Subsection 1.1}
\subsection{Subsection 1.2}

\section{Section 2}
\subsection{Subsection 2.1}
\subsection{Subsection 2.2}

\end{document}

Thank you all in advance,
markil.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

5gon12eder
Posts: 126
Joined: Sun Feb 13, 2011 8:36 pm

beamer | Make other Subsections invisible in ToC

Post by 5gon12eder »

Use

Code: Select all

\tableofcontents[hideothersubsections]
See also section 10.5 of the beamer user guide.

Best
I'm using pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian).
Post Reply