1

I am working on a presentation with beamer.

I have the following code to splits the table of contents (several sections) on more slides, and it works very fine.

Issue is that a section includes a large number of subsections, and I am not able to split that portion of the table of contents over two or more pages. Instead, the list of titles gets written past below the botton of the slide (see Section C in the code below)

EDIT If I use allowframebreaks as suggested in a comment, entries for subsections are not rendered, but the extra ones for section C (those which go into the second Index II page)

\documentclass{beamer}
\mode<presentation>
\usepackage[italian]{babel} 
\setbeamertemplate{navigation symbols}{}

\usetheme{Antibes} \usecolortheme{seahorse} \useoutertheme{tree} \setbeamertemplate{footline}[frame number] \usefonttheme{serif}

\begin{document}

\section{A} \subsection{1} \subsection{2} \subsection{3} \subsection{4} \section{B} \subsection{1} \subsection{2} \subsection{3} \subsection{4} \section{C} \subsection{1} \subsection{2} \subsection{3} \subsection{4} \subsection{5} \subsection{6} \subsection{7} \subsection{8} \subsection{9} \subsection{10} \subsection{11} \subsection{12} \subsection{13} \subsection{14} \subsection{15} \subsection{16} \section{D} \subsection{1} \subsection{2} \subsection{3} \subsection{4} \section{E}

\begin{frame}[t,allowframebreaks]
\frametitle{Index} 
\tableofcontents[pausesections, pausesubsections,sections={-1}]

\end{frame} \begin{frame}[t,noframenumbering,allowframebreaks] \frametitle{Index} \tableofcontents[pausesections, pausesubsections,sections={2-2}] \end{frame} \begin{frame}[t,noframenumbering,allowframebreaks] \frametitle{Index} \tableofcontents[pausesections, pausesubsections,sections={3-3}] \end{frame} \begin{frame}[t,noframenumbering,allowframebreaks]
\frametitle{Index} \tableofcontents[pausesections, pausesubsections,sections={4-}] \end{frame} \end{document}

Note, .toc has entries from \beamer@subsectionintoc {3}{1} to \beamer@subsectionintoc {3}{16}, and I would like somethig like

\tableofcontents[pausesections, pausesubsections,sections={3-3}, **subsections={-7}**]
mario
  • 761
  • Please extend your code fragment to an MWE, which reproduce your problem, From fragment is not visible what is your problem. If your bibliography is longer than one slide, than frame option allowframebreaks should help to spread it over several slides .... – Zarko Aug 20 '23 at 23:23
  • 4
    You really, really shouldn't be doing this in a presentation. Taking your audience through the table of contents should not be a multi-slide event. Once or twice I've come close to running off a single slide and used workarounds, but the idea of using 3 or 4 slides to the purpose - never mind 2 for a single section - is just nuts. What exactly do you hope your audience will get out of it? – cfr Aug 20 '23 at 23:37
  • 2
    A better strategy would be to hide the lower levels of sectioning in your main toc and use a per-section toc at the start of each section. (And split the really long case into two sections or simplify the subsectioning.) – cfr Aug 20 '23 at 23:38
  • @Zarko I have tried allowframebreaks, but it does not seem to work with the other options I have. – mario Aug 20 '23 at 23:55
  • @cfr In gneral I agree, but this for a special project, I need a long table of contents. – mario Aug 20 '23 at 23:57
  • 2
    @mario, \begin{frame}[t,allowframebreaks] \frametitle{Index} \tableofcontents%[pausesections, pausesubsections] \end{frame} works fine. It is not entirely clear what you after. However, I would consider @cfr comments ... – Zarko Aug 21 '23 at 00:05
  • I suppose if you're presenting to AI. – cfr Aug 21 '23 at 04:18
  • 1
    @Zarko Actually, it does not work for me. Entries for subsections are not rendered, but the extra ones for section C (those which go into the second Index II page) – mario Aug 21 '23 at 09:38
  • @mario, well, then, regarding me, you depends on yourself ... Sorry, I don't understand what you after, so I can't help you. – Zarko Aug 21 '23 at 10:03
  • Relted: https://tex.stackexchange.com/a/351531/11604 – Fran Aug 21 '23 at 10:50

1 Answers1

1

pausesection etc. uses overlays to uncover the items one by one. They don't mix well with allowframebreaks. If you want to use allowframebreaks, you should remove the pause(sub-)sections to get the whole toc.

For this specific case, one could fake the split with overlays like this:

\documentclass{beamer}
\mode<presentation>
\usepackage[italian]{babel} 
\setbeamertemplate{navigation symbols}{}

\usetheme{Antibes} \usecolortheme{seahorse} \useoutertheme{tree} \setbeamertemplate{footline}[frame number] \usefonttheme{serif}

\makeatletter \setbeamertemplate{subsection in toc}{% \ifnum\inserttocsubsectionnumber<11 \only<1-12>{\leavevmode\leftskip=5ex\llap{% \usebeamercolor[bg]{subsection number projected}% \vrule width1ex height1ex\kern1ex}\inserttocsubsection\par}% \else% \only<12->{\leavevmode\leftskip=5ex\llap{% \usebeamercolor[bg]{subsection number projected}% \vrule width1ex height1ex\kern1ex}\inserttocsubsection\par}%
\fi% } \makeatother

\begin{document}

\section{A} \subsection{1} \subsection{2} \subsection{3} \subsection{4} \section{B} \subsection{1} \subsection{2} \subsection{3} \subsection{4} \section{C} \subsection{1} \subsection{2} \subsection{3} \subsection{4} \subsection{5} \subsection{6} \subsection{7} \subsection{8} \subsection{9} \subsection{10} \subsection{11} \subsection{12} \subsection{13} \subsection{14} \subsection{15} \subsection{16} \section{D} \subsection{1} \subsection{2} \subsection{3} \subsection{4} \section{E}

\begin{frame}<1-5>[t] \frametitle{Index} \tableofcontents[pausesections, pausesubsections,sections={-1}] \end{frame} \begin{frame}<1-5>[t,noframenumbering] \frametitle{Index} \tableofcontents[pausesections, pausesubsections,sections={2-2}] \end{frame} \begin{frame}<1-17>[t,noframenumbering] \frametitle{Index} \tableofcontents[pausesections, pausesubsections,sections={3-3}] \only<12>{\vspace{-2.9cm}}% \end{frame} \begin{frame}<1-6>[t,noframenumbering]
\frametitle{Index} \tableofcontents[pausesections, pausesubsections,sections={4-}] \end{frame} \end{document}

enter image description here