2

The corporate identity of my company defines the table of content in presentations as equally sized shaped boxes so that 5 of them fit in a row even if there are less, and more go into the next line. The section titles should word wrap inside this boxes as sown in the picture: desired output

At most 3 rows limiting to 15 sections need to be supported.

I would be able to create this manually for each presentation using {tikz} but unfortunately I have no clue how to approach a TOC template to get this automatically from \section entries.

It would be acceptable if "unused" boxes would be rendered as empty boxes with gray background limiting the TOC to 15 entries in total.

Any ideas?

1 Answers1

0

This is based on the answer to this question of mine.

In addition to the {multicol} approach I define the beamer template for sections in TOC to use \parbox with fixed height.

The final shape is set using {tikz} nodes with a background image (not shown here).

\documentclass[14pt]{beamer}
\usepackage{multicol}

\setbeamertemplate{section in toc}{% \colorbox{yellow}{ \parbox[t][3.5em]{.2\textwidth}{ \inserttocsectionnumber\ \parbox[c][2.5em]{.2\textwidth}{ \inserttocsection }
}
} } \begin{document}

\section{Section1 gwerrgtw}
\section{Section2 gwerrgtw}
\section{Section3 }
\section{Section4}
\section{Section gwerrgtw5}
\section{Section6}
\section{Section7 gwerrgtw}

\frame{{TOC}
%% first TOC row
            \begin{multicols}{4}  
                \vspace*{-.5em} % first column has a vertical "indent" I could not come around otherwise

                \tableofcontents[sections=1-4]  
            \end{multicols}

%% second TOC row
            \begin{multicols}{4}  
                \vspace*{-.5em} % first column has a vertical "indent" I could not come around otherwise

                \tableofcontents[sections=5-8]  
            \end{multicols}

%% third TOC row, not used in this example due to leck of sections...
            \begin{multicols}{4}  
                \vspace*{-.5em} % first column has a vertical "indent" I could not come around otherwise

                \tableofcontents[sections=9-12]  
            \end{multicols}
}

\end{document}

enter image description here