# Memoir: Part contents in TOC in two lines

I need something similar to this post, that is the second line of the part should start directly at the left margin.

This is what I have tried:

\documentclass{memoir}

\setlength{\cftpartindent}{0em}
\setlength{\cftpartnumwidth}{0em}
\renewcommand{\cftpartaftersnumb}{\\}
\renewcommand*{\cftpartname}{Part\space}

\begin{document}
\tableofcontents*

\part{Test}

\end{document}


But for some reason the title on the second line is indented:

In your code change the redefinition of \cftaftersnumb according to the following, to be placed after your \cftpartname redefinition:
\newlength{\mylength}

This puts some negative space, corresponding to that used by the Part text, in front of the first line of the title to make it align with the left margin. To do so for all lines of a multi-line title would require significant work on the internals of memoir, which I am no longer up to.
• Cool. Thanks. But why not assign \mylength to \cftpartnumwidth? This has the same effect here. (Well, actually I am getting a much more overfull hbox, but visually both solutions seem to be identical.) – Denis Mar 9 at 22:56