[Tex/LaTex] Showing the overview of section in beamer

beamersectioning

I am making a presentation in beamer, and I want to display overview of the whole document at the beginning and overview of upcoming section. But I have too many sections and subsections, so the default table of contents gets too much crowded. I want to do either of two things:

1) Have the main table of contents that contains only section titles. (I know, I can use \setbeamertemplate{subsection in toc}{\ }. But it gives unnatural spacing). Also, have an expanded version of table of contents that expands only the current section into subsections. Note that I can gray-out the other subsections, but they still take up space, I don't want to do that.

OR

2) Have the main table of content same as above. Also, a slide that contains only the section title expanded into subsections (without mention of other sections).

Also, I want these things to be automated, and I don't want to add a frame manually by myself when I start a new section, because there are so many sections and I may forget.

Best Answer

If you opt for option 1. (showing only section titles), you could use hideallsubsections option which shows only sections. Maybe it will fix your spacing problem (you should have given a MWE to allow testing).

\begin{frame}
\frametitle{Table of Contents}
\tableofcontents[hideallsubsections]
\end{frame}

This option fits well with a presentation at every new section of its detailed contents. Here is a code for that (to put just after \begin{document} which use hideothersubections:

\AtBeginSection[]{
  \begin{frame}{Outline}
  \small \tableofcontents[currentsection, hideothersubsections]
  \end{frame} 
}

If you opt for option 2. (having a big table of contents on several slides), you could decide to put only one section per slide:

\tableofcontents[sections={1}]

You could also be interested in showing the whole table of contents on two columns. Here is an example:

enter image description here

\begin{frame}{Plan}
  \begin{columns}[t]
  \begin{column}{5cm}
  \tableofcontents[sections={1-4},currentsection, hideothersubsections]
  \end{column}
  \begin{column}{5cm}
  \tableofcontents[sections={5-8},currentsection,hideothersubsections]
  \end{column}
  \end{columns}
\end{frame}

And there is the allowframebreaks option to display a classic talbe of contents on several slides:

\begin{frame}[allowframebreaks]
  \tableofcontents
\end{frame}