I'm typesetting a long text, divided (so far) in three parts.
Consider this MWE:
\documentclass{memoir}
\begin{document}
\maxsecnumdepth{subsection}
\maxtocdepth{subsection}
\part{First part}
\tableofcontents
\chapter{First chapter}
\section{A section}
\section{Another section}
\subsection{With a subsection}
\chapter{Second chapter}
\section{A section}
\section{Another section}
\subsection{With a subsection}
\part{Second part}
\tableofcontents
\chapter{Third chapter}
\section{A section}
\section{Another section}
\subsection{With a subsection}
\chapter{Fourth chapter}
\section{A section}
\section{Another section}
\subsection{With a subsection}
\part{Third part}
\tableofcontents
\chapter{Fifth chapter}
\section{A section}
\section{Another section}
\subsection{With a subsection}
\chapter{Sixth chapter}
\section{A section}
\section{Another section}
\subsection{With a subsection}
\end{document}
I want a table of contents in every part. It should show the chapters, sections and subsections of that part, but I also want it to show the chapters of the other parts.
So, for example, the toc's in the MWE should look like these:
Is something like this possible? I have no idea where to start.