5

Is there a way to generate a table of contents only listing the sections of the appendix in Beamer?

Essentially I want to do exactly this, but for a Beamer presentation. For some reason, the proposed solutions don't work for me. Even just including etoc in my beamer document gives loads of error messages (while the sample code provided in the answer of the above question works just fine).

Code example:

\documentclass{beamer}
\usepackage[utf8]{inputenc}
% \usepackage{etoc}  % causes errors

\title{Separate TOC for Appendix}
\author{Anonymous}

\begin{document}

\frame{\titlepage}
\begin{frame}{TOC}
    \tableofcontents
\end{frame}

\section{Section A}
\section{Section B}
\section{Section C}

\appendix

\begin{frame}{Appendix TOC}
    \tableofcontents
\end{frame}

\section{Appendix A}
\section{Appendix B}

\end{document}

I'd like the second table of contents to list Appendix A and Appendix B.

mattu
  • 153
  • 2
    Welcome! As soon as I add a frame after \section{Appendix B} I get precisely what you are asking for. That is, replace \section{Appendix B} by `\section{Appendix B} \begin{frame} \frametitle{Some content}

    \end{frame}`.

    –  Nov 15 '19 at 04:31
  • true, I did not think that would be the default behavior, but seems like exactly what I needed. @Schrödinger'scat if you add this comment as an answer I will accept it – mattu Nov 15 '19 at 09:13

1 Answers1

5

beamer does that automatically. You only need to add some (frame) content after the \section commands in the appendix.

\documentclass{beamer}
\usepackage[utf8]{inputenc}
% \usepackage{etoc}  % causes errors

\title{Separate TOC for Appendix}
\author{Anonymous}

\begin{document}

\frame{\titlepage}
\begin{frame}{TOC}
    \tableofcontents
\end{frame}

\section{Section A}
\section{Section B}
\section{Section C}

\appendix

\begin{frame}{Appendix TOC}
    \tableofcontents
\end{frame}

\section{Appendix A}
\section{Appendix B}
\begin{frame}[t]
\frametitle{Some appendix slide}

\end{frame}

\end{document}

enter image description here