# Beamer TOC overlay: begin with only sections visible

In my Beamer presentation, I want to use overlays to uncover the TOC in the following manner:

1. Uncover all sections simultaneously

2. Starting with the first element following the first section, uncover them one-by-one, like using [pausesubsections,pausesections],

3. When arriving at an already uncovered section, do not pause on it (on the next slide, uncover the element following the section)

Is there a way I can do this?

Edit: Here is the output I'm looking for that corresponds to the MWE below. This shows how the TOC slide code should be translated into a series of real slides.

Slide 1    Slide 2    Slide 3    Slide 4    Slide 5    Slide 6    Slide 7

TOC title  TOC title  TOC title  TOC title  TOC title  TOC title  TOC title

A          A          A          A          A          A
A1         A1         A1         A1         A1
A2         A2         A2         A2

B          B          B          B          B          B
B1         B1         B1

C          C          C          C          C          C
C1         C1
C2


MWE:

\documentclass{beamer}
\begin{document}

\begin{frame}
\tableofcontents[pausesubsections, pausesections]
\end{frame}

\section{A}

\begin{frame}
some content
\end{frame}

\subsection{A1}

\begin{frame}
some content
\end{frame}

\subsection{A2}

\begin{frame}
some content
\end{frame}

\section{B}

\begin{frame}
some content
\end{frame}

\subsection{B1}

\begin{frame}
some content
\end{frame}

\section{C}

\subsection{C1}

\begin{frame}
some content
\end{frame}

\subsection{C2}

\begin{frame}
some content
\end{frame}

\end{document}

• please include minimal working example (MWE) in your questions. – user36296 Dec 17 '18 at 18:09
• Can you manually create slides that exactly show which sections should be uncovered on which slides? I don't think I understand your description, especially your 3rd point confuses me – user36296 Dec 17 '18 at 18:11
• @samcarter done. – Zubo Dec 17 '18 at 18:28

Based on the code from Manually creating a basic beamer toc you could fake a toc with such a behaviour:

\documentclass{beamer}
\setbeamercovered{transparent}
\usepackage{tikz}

\setbeamercolor{subsection in toc}{fg=black}

% total number of sections %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{totcount}
\newcounter{totalsection}
\regtotcounter{totalsection}
\AtBeginDocument{%
\pretocmd{\section}{\refstepcounter{totalsection}}{}{}%
}%

% number of subsections per section %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{xcntperchap}
\RegisterCounters{section}{subsection}
\newcounter{totalsubsection}
\setcounter{totalsubsection}{0}

% creating automatic label %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% based on https://tex.stackexchange.com/a/386557/36296
\AtBeginSection[]{\label{sec:\thesection}}
\AtBeginSubsection[]{\label{subsec:\thesection:\thesubsection}}
\newcounter{currentsub}
\newcounter{totsection}

% custom toc
\newcommand{\mytoc}{%
\pause%
\only<+>{}%
\begingroup%
\usebeamerfont{section in toc}%
\usebeamercolor[fg]{section in toc}%
\setcounter{totsection}{\number\totvalue{totalsection}}%
\foreach \i in {1,...,\thetotsection}{%
\setcounter{currentsub}{\ObtainTrackedValueExp[\i]{section}{subsection}}%
\par%
\begingroup
\usebeamerfont{subsection in toc}%
\usebeamercolor[fg]{subsection in toc}%
\ifnum\thecurrentsub>0%
\foreach \j in {1,...,\thecurrentsub}{%
\par%
}%
\fi%
\endgroup
\vfill
}% loop over i
\endgroup
}

\begin{document}

\begin{frame}
\mytoc
\end{frame}

\section{A}

\begin{frame}
some content
\end{frame}

\subsection{A1}

\begin{frame}
some content
\end{frame}

\subsection{A2}

\begin{frame}
some content
\end{frame}

\section{B}

\begin{frame}
some content
\end{frame}

\subsection{B1}

\begin{frame}
some content
\end{frame}

\section{C}

\subsection{C1}

\begin{frame}
some content
\end{frame}

\subsection{C2}

\begin{frame}
some content
\end{frame}

\end{document}