[Tex/LaTex] Grouped two column table of contents in Beamer

beamerformattingtable of contentstwo-column

I am working on a beamer presentation with a quite large table of contents. Therefore I split the table into two columns with the following code:

\begin{frame}{Overview}
\begin{multicols}{2}
\tableofcontents
\end{multicols}
\end{frame}

However this table is bad formatted. A section that starts on the left column continues on the right column. Are there any ways to avoid this.

Secondly the theme (Berkeley) prints a table of contents on the left, is there a way to make such a table that collapses (when no longer in that section, only show the section and not its subsection)?

Best Answer

my table of contents was also really long, and i considered columns or splitting slides but went with this instead

\begin{frame}{Outline}
    \tableofcontents[hideallsubsections]
\end{frame}

for my outline at the beginning, and

\AtBeginSubsection[]{
    \begin{frame}{Outline}
        \tableofcontents[currentsection,subsectionstyle=show/shaded/hide]
    \end{frame} }

for each subsection change. this shows just my sections for the first table of contents (which makes it a lot shorter) and then for subsequent outlines, hides all the subsections completely, for sections that i am not in. the other sections are covered, just transparent, and the other subsections in the current section are transparent as well. so it highlights my current section and subsection, and keeps it all on one slide.