I use the packages titlesec and titletoc to format the TOC in a book class document. For the Parts formatting this is the code in the preamble:
\titlecontents{part} [3pc]
{\addvspace{1.5pt}\filcenter}
{}
{\large\bfseries\partname\hspace{1ex}\thepart\\\large}
{}
[\begin{center}\addvspace{-.8pc}\rule{0.2\linewidth}{1pt}\end{center}]
That's looks nice, except for a problem in the second line that's must contain only the title and where appears \thepart before the part title.
For the secion formatting, this is the code I use:
\titlecontents*{section}[1.5em]
{\makebox{\small}}
{\thecontentslabel. }
{}
{, \itshape\thecontentspage}
[.---][.]
But the book have some large section titles, and these titles produce text overflow at the right margin in the TOC. I need a box with non indented and justified text in like the TOC of the document titlesec.pdf and I don't deal with that.
Thank you for your help.
Document Classes ⇒ titletoc problem
NEW: TikZ book now 40% off at Amazon.com for a short time.
