Search code examples
latexbeamer

LaTeX tableofcontents not rendering a new page?


So im making a presentation and for some reason, i can't create a new page for my tableofcontents.

The list of the tableofcontents is longer and i need to split it up to two pages to be able to display all informations, but it doesn't work (i tried \clearpage and \newpage without success)

\documentclass{beamer}
\usepackage[utf8]{inputenc}

\usepackage{biblatex}
\addbibresource{sample.bib}

%%%% graphics
\usepackage{graphicx}

%%%START THEME SETTINGS
\usetheme{Dresden}
\usecolortheme{beaver}

\title{stuff}


\begin{document}

\begin{frame}
\titlepage % Print the title page as the first slide
\end{frame}

\begin{frame}{Outline}
    \tableofcontents

\end{frame}


\section{x}
\subsection{Introduction}
\subsection{Use Cases}

%------------------------------------------------
\section{xyz}
\subsection{Introduction}
\subsection{Use cases}
\subsection{Hyypervisors}
\subsection{Hypervisors Types}
\subsection{Memory Management}
\subsection{Memory Overcommitment}
\subsection{Memory Compression}
\subsection{Memory Transparent Page Sharing}
\newpage %<- this doesn't work!


%--------------------------------------------
\section{xy}
\subsection{Motivation}
\subsection{Virtualization}
\subsection{Emulation}

\section{xx}
\subsection{CPU}
\subsection{Registers}
\subsection{Memory}

any ideas why this doesn't work?

As mentioned above..


Solution

  • You can add the allowframebreaks option to your outline frame and beamer will automatically break the frame into multiple slides:

    \documentclass{beamer}
    %\usepackage[utf8]{inputenc}
    
    \usepackage{biblatex}
    \addbibresource{sample.bib}
    
    %%%% graphics
    %\usepackage{graphicx}
    
    %%%START THEME SETTINGS
    \usetheme{Dresden}
    \usecolortheme{beaver}
    
    \title{stuff}
    
    
    \begin{document}
    
    \begin{frame}
    \titlepage % Print the title page as the first slide
    \end{frame}
    
    \begin{frame}[allowframebreaks]{Outline}
        \tableofcontents
    \end{frame}
    
    
    \section{x}\begin{frame}\end{frame}
    \subsection{Introduction}\begin{frame}\end{frame}
    \subsection{Use Cases}\begin{frame}\end{frame}
    
    %------------------------------------------------
    \section{xyz}\begin{frame}\end{frame}
    \subsection{Introduction}\begin{frame}\end{frame}
    \subsection{Use cases}\begin{frame}\end{frame}
    \subsection{Hyypervisors}\begin{frame}\end{frame}
    \subsection{Hypervisors Types}\begin{frame}\end{frame}
    \subsection{Memory Management}\begin{frame}\end{frame}
    \subsection{Memory Overcommitment}\begin{frame}\end{frame}
    \subsection{Memory Compression}\begin{frame}\end{frame}
    \subsection{Memory Transparent Page Sharing}\begin{frame}\end{frame}
    %\newpage %<- this doesn't work!
    
    
    %--------------------------------------------
    \section{xy}\begin{frame}\end{frame}
    \subsection{Motivation}\begin{frame}\end{frame}
    \subsection{Virtualization}\begin{frame}\end{frame}
    \subsection{Emulation}\begin{frame}\end{frame}
    
    \section{xx}\begin{frame}\end{frame}
    \subsection{CPU}\begin{frame}\end{frame}
    \subsection{Registers}\begin{frame}\end{frame}
    \subsection{Memory}\begin{frame}\end{frame}
    
    \end{document}
    

    enter image description here

    Or you can manually split your table of contents to get more fine control of the break point:

    \documentclass{beamer}
    %\usepackage[utf8]{inputenc}
    
    \usepackage{biblatex}
    \addbibresource{sample.bib}
    
    %%%% graphics
    %\usepackage{graphicx}
    
    %%%START THEME SETTINGS
    \usetheme{Dresden}
    \usecolortheme{beaver}
    
    \title{stuff}
    
    
    \begin{document}
    
    \begin{frame}
    \titlepage % Print the title page as the first slide
    \end{frame}
    
    \begin{frame}{Outline}
        \only<1>{\tableofcontents[sections={1-2}]}
        \only<2>{\tableofcontents[sections={3-4}]}
    \end{frame}
    
    
    \section{x}\begin{frame}\end{frame}
    \subsection{Introduction}\begin{frame}\end{frame}
    \subsection{Use Cases}\begin{frame}\end{frame}
    
    %------------------------------------------------
    \section{xyz}\begin{frame}\end{frame}
    \subsection{Introduction}\begin{frame}\end{frame}
    \subsection{Use cases}\begin{frame}\end{frame}
    \subsection{Hyypervisors}\begin{frame}\end{frame}
    \subsection{Hypervisors Types}\begin{frame}\end{frame}
    \subsection{Memory Management}\begin{frame}\end{frame}
    \subsection{Memory Overcommitment}\begin{frame}\end{frame}
    \subsection{Memory Compression}\begin{frame}\end{frame}
    \subsection{Memory Transparent Page Sharing}\begin{frame}\end{frame}
    %\newpage %<- this doesn't work!
    
    
    %--------------------------------------------
    \section{xy}\begin{frame}\end{frame}
    \subsection{Motivation}\begin{frame}\end{frame}
    \subsection{Virtualization}\begin{frame}\end{frame}
    \subsection{Emulation}\begin{frame}\end{frame}
    
    \section{xx}\begin{frame}\end{frame}
    \subsection{CPU}\begin{frame}\end{frame}
    \subsection{Registers}\begin{frame}\end{frame}
    \subsection{Memory}\begin{frame}\end{frame}
    
    \end{document}
    

    enter image description here