4

Beamer's table of contents starts with bullet 1. How can I change that to bullet 0? The command \setcounter{section}{-1} in the preamble does not help.

  • Please post a Minimal Working Example i.e. the code for a small document demonstrating your problem. This will help people to understand and address your issue quickly and (hopefully) effectively. Note that by default there are no numbers or bullets at all. – cfr Apr 07 '14 at 23:45

1 Answers1

10

One would expect that setting \beamer@tocsectionnumber=-1 would be enough (since \beamer@tocsectionnumber is the TeX counter controlling the section number typset in the ToC); however, this is not the case, since \beamer@sectionintoc (defined in beamerbasetoc.sty) has a conditional test using \ifnum\beamer@tempcount>0 which won't allow typesetting non positive numbers in the ToC. The solution is to patch \beamer@sectionintoc and use as conditional test \ifnum\beamer@tempcount>-1:

\documentclass{beamer}
\usetheme{CambridgeUS}
\usepackage{etoolbox}

\makeatletter
\patchcmd{\beamer@sectionintoc}
  {\ifnum\beamer@tempcount>0}
  {\ifnum\beamer@tempcount>-1}
  {}
  {}
\beamer@tocsectionnumber=-1
\makeatother

\begin{document}

\begin{frame}
\tableofcontents
\end{frame}

\section{First test section}
\begin{frame}
test
\end{frame}
\section{Second test section}
\begin{frame}
test
\end{frame}
\section{Third test section}
\begin{frame}
test
\end{frame}

\end{document}

enter image description here

Gonzalo Medina
  • 505,128