I'm trying to change the colors of the table of contents in a Beamer presentation, like Changing color and bullets in Beamer's table of contents except that I would like to make the "bullet" for each section a different color. Perhaps this requires reimplementing the \tableofcontents macro, which I'm willing to do, but does anyone know an easier way? (Is there a package?) I'm interested in the Warsaw theme at the moment, but input on any theme will be appreciated.


You will have to redefine the \sectionintoc command (original definition found in beamerbasetoc.sty) and, depending on the options used, some other template(s); in the example below I redefined the section in toc template for the default circle option (original definition found in beamerbaseauxtemplates.sty); the template is in charge of the special decorations used (the circles in the example) but the command really controls how information will go in the ToC. The color schema could be selected using an \ifcase conditional depending on the section counter. In the example code below I marked the lines used for the redefinitions using %NEW:


\setbeamertemplate{section in toc}
    \usebeamerfont*{section number projected}%
   \usebeamercolor{section number projected}%

          \ifcase\the\beamer@tempcount\or green!30!black\or yellow!60!black\or blue!20!black\or orange!30!black\else magenta!30!black\fi } %NEW
       \advance\beamer@tempcount by\beamer@sectionadjust%
              \beamer@tocact{\ifnum\c@section=#1\beamer@toc@cs\else\beamer@toc@os\fi}{section in toc}}}%






enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.