# List of tcolorboxes in Beamer

For a tutorial presented with LaTeX Beamer slides I want to add a list of all the tasks inside it. The tasks are set as individual tcolorboxes, so I like to use the list inside key, which automatically creates the list of boxes.

Unfortunately, this doesn't seem to work with Beamer, as it wouldn't compile.

MWE

\documentclass{beamer}
\usepackage{tcolorbox}
\newtcolorbox[list inside=tsks]{plainbox}[1]{colback=blue!10, title=#1}
\begin{document}
\section{Slides}
\begin{frame}
\tableofcontents
\begin{plainbox}{One}
First box
\end{plainbox}
\end{frame}
\section{Overview}
\begin{frame}
\end{frame}
\end{document}


The problem appears to be related to what the ToC file of list inside, here .tsks, is filled with. I think it includes macros which are not available in Beamer. When comparing the file with Beamer's .toc file it looks distinctly different (and more like the .toc file of a usual LaTeX document would look like).

Eventually I'd like to have a list of tasks styled like Beamer's ToC, i.e. without any dotted lines or page numbers, but with links to the tasks.

You could redefine \numberline and style the list as you want:

\documentclass{beamer}
\usepackage{tcolorbox}
\newtcolorbox[list inside=tsks]{plainbox}[1]{colback=blue!10, title=#1}

\makeatletter
\renewcommand{\numberline}[2]{%
\usebeamerfont*{section in toc}%
\usebeamercolor[fg]{section in toc}%
#2%
\par\vfill%
}

\renewcommand*\l@tcolorbox{}
\makeatother

\begin{document}

\section{Slides}

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

\begin{frame}
\begin{plainbox}{One}
First box
\end{plainbox}
\begin{plainbox}{Two}
First box
\end{plainbox}
\begin{plainbox}{Three}
First box
\end{plainbox}
\end{frame}

\section{Overview}

\begin{frame}
\vfill

• That looks perfect! Does redefining \numberline have any side-effects? I grepped through Beamer's code base and apparently the macro is not used anywhere – so it seems to be fine! – AndiH Sep 1 '17 at 12:36