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.