TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to change how a "Part" title appears in the Table of Contents of a memoir document. In particular, I'd like to have the "Part Title" between two lines. Take the following minimal example:






\chapter{A Chapter}


How can I force the lines in the Table of Contents to be longer and change the distance within the "Part" title?

share|improve this question

This way you can change the distance before the part entry:


And to fill to whole line, make a skip to the left:

\addtocontents{toc}{\hskip -\memRTLleftskip\protect\mbox{}\protect\hrulefill\par}

Here's a definition which does it once for all parts:

\g@addto@macro{\cftpartbreak}{\hskip -\parindent\hrulefill\par}
\renewcommand{\cftpartafterpnum}{\par\vspace{-1.5ex}\hskip -\memRTLleftskip\hrulefill}

parts entries with lines

share|improve this answer
Thanks for your answer. Now I got how to change the length, however the second command does not seem to work. In fact, I would like the horizontal lines to start at same place where "I" appears in the ToC, whereas they start at "Basics" – Daniele Jan 27 '12 at 14:35
@Daniele I updated my answer. – Stefan Kottwitz Jan 27 '12 at 15:02

Working from Stefan's answer, if you want lines before and after the part title, the following would work:

\renewcommand{\cftpartafterpnum}{\par %
\vspace{-2\baselineskip} \hskip -\memRTLleftskip\protect\mbox{}\protect\hrulefill\par%
\vspace{0.5\baselineskip} \hskip -\memRTLleftskip\protect\mbox{}\protect\hrulefill\par}

enter image description here

See section 9.2 of memman.pdf for more information about \cftpartafterpnum and related commands.

share|improve this answer
Works perfectly! Thanks – Daniele Jan 27 '12 at 14:41
I just found that if I also use the \cftpagenumbersoff{part} command (so that the page number where the part starts does not appear in the ToC) the two lines will be shorter! Is it possible to let them go until the end of the line, even when \cftpagenumbersoff{part} is used? – Daniele Jan 27 '12 at 15:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.