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 have some long titles for Parts in a {book} file.

In TOC I receive the following:

I Paaaaaaaaaaaaaaa

aaaaaaaaaaaaaaaaaaart    pagenum

And I would like to have it like the following:

I Paaaaaaaaaaaaaaa

     aaaaaaaaaaaaaaaaaaart    pagenum

(so, I want to have some space in the second line before the text)

Do you have any ideas how to do it? I tried to add \hspace{} in title, but it does not help.

LaTeX makes it in such format for chapters and sections, but not for Parts.

Another small question: I use tocloft package for design. I wanted to add the word Part before the numbers of parts in TOC (f.e. using \cftpartpresnum), but I want to add it only for numbered parts. For example I want to have:

Intro ..... 1
Part I Lalala ...2
Part II Lalalala...4
Conclusion ....6

Is it possible? \cftpartpresnum adds to all parts.

share|improve this question
Welcome to TeX.sx! Please only ask one question per post (unless they're really closely related, which is not the case here). I recommend moving your second question from this one to a new question (after making sure it hasn't been asked yet). – doncherry Oct 13 '11 at 13:05
Sure, I will copy it to another question. For me it was like one subject, as I want to implement either the first, or the second solution for my file. – Natalia Oct 13 '11 at 13:30
@Natalia: so, finally how should the entries look like? Do you want lines 2,3,... indented by some given amount and the word "Part" or you just want the indentation? – Gonzalo Medina Oct 13 '11 at 16:01
up vote 3 down vote accepted

You can achieve what you want, without using tocloft, by redefining the \@part and \l@part commands (the latter actually typesets the part entries in the ToC); here's an example of such redefinition (I wasn't sure of the desired alignment and indentation, but you can easily change these settings):


    \ifnum \c@secnumdepth >-2\relax
     \interlinepenalty \@M
     \ifnum \c@secnumdepth >-2\relax
       \huge\bfseries \partname\nobreakspace\thepart
       \vskip 20\p@
     \Huge \bfseries #2\par}%
  \ifnum \c@tocdepth >\m@ne
    \vskip 1.0em \@plus\p@
    \setlength\@tempdima{3.3em}%NEW: indentation for lines 2,3,... change according to your needs
      \parindent \z@ \rightskip \@pnumwidth
      \parfillskip -\@pnumwidth
      \advance\leftskip\@tempdima% NEW: comment out if no indentation required for lines 2,3,...
      \hskip -\leftskip
      #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par



\part{Test part one with a really really long title spanning two lines}
\part{Test part two with a really really long title spanning two lines}
\part{Test part three with a really really long title spanning two lines}
\part{Test part four with a really really long title spanning two lines}


enter image description here

share|improve this answer
That works, Thank you! What have you added to the code that is responsible for such a margin at the left side? – Natalia Oct 13 '11 at 13:42
I am asking, because it does not provide the same space for different parts (I, II, III). To see my point, please insert into your code instead of one \part three \part-s with the same text. – Natalia Oct 13 '11 at 13:45
@Natalia: see my updated answer. – Gonzalo Medina Oct 13 '11 at 16:16
That is perfect! Thank you very much! – Natalia Oct 13 '11 at 18:01

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.