[Tex/LaTex] \tableofcontents[ISSUES]

beamertable of contents

Hello TeX/LaTeX/Beamer colleagues,

There is a prob I could not solve. I'm preparing a 2 hours class, so my toc is really heavy.
5 Sections, some of them with several subsections.

I already have the following outline at the beginning:

OUTLINE

1 Section One

2 Section Two
.
.
.
5 Section Five.

However, running the presentation, at the beginning of each section and subsection appears the dense toc. All sections + all subsections…. frightful!

What I want is, starting either a section or a subsection, to project a clean viewgraph containing ONLY the current section, highlighting the current subsection and shading the others (subsections of the current section…)

Is possible to do that?

In advance I thank you very much!

Best

Physics is love!

Best Answer

beamer offers you this possibility out of the box, using the sectionstyle, subsectionstyle keys for the \tableofcontents.

If you want, at the beginning of each each section, to have a table of contents showing only the current section with its subsections, all you need is

  currentsection,
  sectionstyle=show/hide,
  subsectionstyle=show/show/hide

so, the following lines

\AtBeginSection[]
{
\begin{frame}<beamer>
\frametitle{Outline}
\tableofcontents[
  currentsection,
  sectionstyle=show/hide,
  subsectionstyle=show/show/hide
]
\end{frame}
}

will do exactly what you need. A complete example:

\documentclass{beamer}

\AtBeginSection[]
{
\begin{frame}<beamer>
\frametitle{Outline}
\tableofcontents[
  currentsection,
  sectionstyle=show/hide,
  subsectionstyle=show/show/hide
]
\end{frame}
}

\begin{document}

\section{Test Section One}
\begin{frame} test\end{frame}
\subsection{Test Subsection One One}
\begin{frame} test\end{frame}
\subsection{Test Subsection One Two}
\begin{frame} test\end{frame}
\subsection{Test Subsection One Three}
\begin{frame} test\end{frame}

\section{Test Section Two}
\begin{frame} test\end{frame}
\subsection{Test Subsection Two One}
\begin{frame} test\end{frame}
\subsection{Test Subsection Two Two}
\begin{frame} test\end{frame}
\subsection{Test Subsection Two Three}
\begin{frame} test\end{frame}

\section{Test Section Three}
\begin{frame} test\end{frame}
\subsection{Test Subsection Three One}
\begin{frame} test\end{frame}
\subsection{Test Subsection Three Two}
\begin{frame} test\end{frame}
\subsection{Test Subsection Three Three}
\begin{frame} test\end{frame}

\end{document}

The ToC for the first section:

enter image description here

The ToC for the second section:

enter image description here

The ToC for the third section:

enter image description here

If what you want is to have, at the beginning of each subsection, a ToC showing the current section and subsection and all other subsections for the current section shaded, then the specification would change to

currentsection,
sectionstyle=show/hide,
subsectionstyle=show/shaded/hide

And the ToC will be produced using

\AtBeginSubsection[]
{
\begin{frame}<beamer>
\frametitle{Outline}
\tableofcontents[
  currentsection,
  sectionstyle=show/hide,
  subsectionstyle=show/shaded/hide
]
\end{frame}
}

A complete example:

\documentclass{beamer}

\AtBeginSubsection[]
{
\begin{frame}<beamer>
\frametitle{Outline}
\tableofcontents[
  currentsection,
  sectionstyle=show/hide,
  subsectionstyle=show/shaded/hide
]
\end{frame}
}

\begin{document}

\section{Test Section One}
\begin{frame} test\end{frame}
\subsection{Test Subsection One One}
\begin{frame} test\end{frame}
\subsection{Test Subsection One Two}
\begin{frame} test\end{frame}
\subsection{Test Subsection One Three}
\begin{frame} test\end{frame}

\section{Test Section Two}
\begin{frame} test\end{frame}
\subsection{Test Subsection Two One}
\begin{frame} test\end{frame}
\subsection{Test Subsection Two Two}
\begin{frame} test\end{frame}
\subsection{Test Subsection Two Three}
\begin{frame} test\end{frame}

\section{Test Section Three}
\begin{frame} test\end{frame}
\subsection{Test Subsection Three One}
\begin{frame} test\end{frame}
\subsection{Test Subsection Three Two}
\begin{frame} test\end{frame}
\subsection{Test Subsection Three Three}
\begin{frame} test\end{frame}

\end{document}

An image of the ToC for the second subsection of the first section:

enter image description here

An image of the ToC for the third subsection of the third section:

enter image description here