# Two sidebars in Beamer for two presentations in one tex file [duplicate]

I am trying to combine two presentations into one tex file. After the title of the second one, I still get the sidebar components of the first presentation. Do you know any way to 'restart' the sidebar to reflect only the second table of contents?

## marked as duplicate by user36296 beamer StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Mar 22 '18 at 9:25

• Place your two presentation into separate \parts. If this does not solve your problem, please add a minimal working example (MWE). – user36296 Mar 21 '18 at 22:54
• While you wait for an answer to this question, can you go back to your previous ones and look if the answers solve your problems and accept them, if they do? – user36296 Mar 21 '18 at 22:55
• You can also split the slides into separate \lectures, which may also work quite well. – cfr Mar 22 '18 at 2:19

I believe that another question and answer to a similar, but broader, question may contain a solution to your current (and perhaps similar) problem(s).

In particular, as noted in another answer, \tableofcontents lists only sections within the current part. So you can simply do as suggested in @samcarter's comment, as follows:

\documentclass{beamer}

\title{Title}
\subtitle{Subtitle}
\author{Author}

\begin{document}
\begin{frame}
\titlepage
\end{frame}

\part{I}

\begin{frame}
Part I:
\tableofcontents
\end{frame}

\section{First part of I}

\begin{frame}
<slide I.1>
\end{frame}

…

\section{Second part of I}

\begin{frame}
<slide I.2>
\end{frame}

\section{Final part of I}

\begin{frame}
<slide I.M>
\end{frame}

\part{II}

\begin{frame}
Part II:
\tableofcontents
\end{frame}

\section{First part of II}

\begin{frame}
<slide II.1>
\end{frame}

…

\section{Final part of II}

\begin{frame}
<slide II.M>
\end{frame}
\end{document}


I have created a demo of the above code on Overleaf.