Creating the table of contents in Beamer can be done with the same manner as in standard LaTeX. The first thing that we should do is to structure our presentation using the commands \section<> and \subsection<> ( \section*<> and \subsection*<> , to hide it from table of contents). It should be noted that with beamer class these commands will not create a heading at the position where we use them.
Let’s assume we have the following structure:
Here is the corresponding LaTeX code to this structure:
% Presentation structure \section \section \subsection \subsection \subsection \section \section*You are already familiar with frame environment which has been used in this lesson to create the title page. With the same manner, we will create a frame and add a title to it, let’s say “Outline” or “Presentation plan”. Then we will add \tableofcontents command inside it to print all sections and subsections of the presentation. Here is a complete code:
% Create a Table of Contents in Beamer \documentclass % Theme choice: \usetheme \usecolortheme % Title page details: \title \author \date \begin % Title page frame \begin \titlepage \end % Outline frame \begin \tableofcontents \end % Presentation structure \section \section \subsection \subsection \subsection \section \section* \begin % to enforce entries in the table of contents \end \endCompiling this code yields:
Make outline frame in Beamer 1" width="1024" height="768" />
Comments:
Sometimes, it’s convenient to remove all subsections from the table of contents. This can be done easily using the following line code:
% Hide subsections from table of contents \begin \tableofcontents[hideallsubsections] \endUsing this in the previous code, we get the following presentation outline:
If you wish to show table of contents with highlighted current section before starting every section you can use the following code:
% Outline frame \begin \tableofcontents \end % Current section \AtBeginSection[ ] < \begin \tableofcontents[currentsection] \end >
and here how we get before every section:
If we would like to show the table of contents in an incremental way, we can add the option pausesections to the \tableofcontents command. Here is the corresponding LaTeX code:
% Outline frame \begin \tableofcontents[pausesections] \endThis yields the following effect triggered by mouse click or keyboard next slide key.
LaTeX-Beamer.com is a personal website about creating stylish and modern presentations in LaTeX, through step-by-step lessons.