[Tex/LaTex] How to make “outline” frame in Beamer

beamertable of contents

In a presentation, people show regularly a "outline" frame containing the table of contents where some sections are grey (have been presented) and others are highlighted (will be presented right now).

Could anyone tell me how to realize it? Do we have to copy the same frame (table of contents) every time and change the color of some titles?

Thank you very much

Best Answer

You can do this using \AtBeginSection:

\documentclass{beamer}
\usetheme{Boadilla}

\AtBeginSection[]
{
  \begin{frame}<beamer>
    \frametitle{Outline for section \thesection}
    \tableofcontents[currentsection]
  \end{frame}
}


\begin{document}

\section{Test section one}
\begin{frame} Test \end{frame}
\begin{frame} Test \end{frame}
\section{Test section two}
\begin{frame} Test \end{frame}
\begin{frame} Test \end{frame}

\end{document}

Here's the frame obtained just before the frames for section two:

enter image description here