# Align unnumbered chapters and reduce spacing in ToC (memoir)

Consider this MWE.

\documentclass{memoir}
\begin{document}
\frontmatter
\tableofcontents
\chapter{Preface}
\mainmatter
\chapter{First Chapter}
\chapter{Second Chapter}
\chapter{Third Chapter}
\backmatter
\chapter{Index}
\end{document}


My book doesn't have sections, only chapters. I want to reduce the spacing between chapters in ToC and align the unnumbered chapter with the numbered one. How can I do this for memoir class? I have found several solution for KOMA-script, report, article, book, but none for memoir.

The memoir manual has a whole chapter on layout of the ToC (and otehr contents lists). In your case, changing the value of the length \cftbeforechapterskip can be used to set the vertical spacing. And playing with \cftsetindents and \cftchapterpresnum allows you to align the titles of numbered and unnumbered chapters. Complete example:

\documentclass{memoir}

% added to modify ToC layout
\setlength{\cftbeforechapterskip}{0pt} %reduces spacing between titles
\cftsetindents{chapter}{1.em}{0em}     %indent titles 1em, allow 0em for numbers
\renewcommand{\cftchapterpresnum}{\hspace{-1.em}}%so move the numbers to the left

\begin{document}
\frontmatter
\tableofcontents

\chapter{Preface}
\mainmatter
\chapter{First Chapter}
\chapter{Second Chapter}
\chapter{Third Chapter}
\backmatter
\chapter{Index}
\end{document}

• Tip: use -\cftchapterindent in the presnum line, then you don't have to write the value twice May 7, 2018 at 12:43