3

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?

Ruben
  • 13,448
Li Lin
  • 31
  • 3
    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 –  Dec 21 '14 at 10:49
  • Related: http://tex.stackexchange.com/questions/87709/minitoc-of-a-subsection – Ruben Dec 21 '14 at 11:36
  • Is this a beamer question actually? –  Dec 21 '14 at 11:51
  • Also related: http://tex.stackexchange.com/questions/101206/beamer-mini-toc – 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

1 Answers1

5

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

MaxNoe
  • 6,136