# How to add a TOC for each section and subsection before of each section in beamer? [duplicate]

At the beginning of each section I want to add a table of content without the subsections and a table of content with the subsections. What can I do?

## marked as duplicate by Ruben, Svend Tveskæg, user31729, user13907, ThorstenDec 21 '14 at 13:59

• Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. You are probably looking for minitoc or etoc package – user31729 Dec 21 '14 at 10:49
• – Ruben Dec 21 '14 at 11:36
• Is this a beamer question actually? – user31729 Dec 21 '14 at 11:51
• – Ruben Dec 21 '14 at 12:33
• You do not need any packages, you can achieve this with the build in optional arguments for \tableofcontents in beamer – MaxNoe Dec 21 '14 at 12:51

You can achieve this with the optional arguments for \tableofcontents and the \AtBeginSection-command.

You can define the style for the sections and subsections like this:

sectionstyle=<current section>/<other sections>

subsectionstyle=<current subsection>/<other subsections in current secton>/<other subsections>

Valid keywords are show, shaded and hide

This places a Toc without subsections and one with the subsections of the current section at each section:

\AtBeginSection[]
{
\begin{frame}{title}
\tableofcontents[
sectionstyle=show/show,
subsectionstyle=hide/hide/hide
]
\end{frame}
\begin{frame}{title}
\tableofcontents[
currentsection,
sectionstyle=show/hide,
subsectionstyle=show/show/hide
]
\end{frame}
}


See page 99–­100 of the beamer user guide for explanation