# TOC chapter entry alignment

I am having trouble formatting the TOC for a document. I have long chapter titles which wrap onto two lines of TOC text. The problem is that the second line of a single chapter title is aligned with the chapter number, but I need it to align with the beginning of the title text on the first line:

I am using a style file that floats around my school, and here is the \l@chapter definition:

\def\l@chapter#1#2{%
\pagebreak[3]
\vskip .75em plus 1pt \@tempdima 1.5em
\begingroup
\parindent \z@ \rightskip \@pnumwidth
\parfillskip -\@pnumwidth
\leavevmode {\MakeUppercase{#1}\mydotfill \hbox to\@pnumwidth{\hss #2}}
\par
\endgroup
}


Any ideas for how to get the second line to align with the text on the first??

thanks!

• Also, when adding a chapter, the title is added to the TOC with this: \addcontentsline{toc}{chapter} {\protect\numberline{\thechapter} \normalsize\MakeUppercase{#1}}%
– Eric
Apr 18, 2014 at 22:49
• Do you know that you can use a different title for TOC? Just make use of \chapter[short]{long}. Apr 18, 2014 at 23:10
• I don't have that problem with my thesis class (which also had to have the all-caps chapter titles in the ToC). What's your base document class, so I can see if my method works on yours? Apr 18, 2014 at 23:30
• You could take a look at the titletoc package. It is automaticaly the case that multiline titles have all their lines aligned with the first one. Apr 19, 2014 at 2:34

Here is perhaps an easier way of achieving it:

\documentclass{report}

\makeatletter
\def\l@chapter#1#2{%
\pagebreak[3]
\vskip .75em plus 1pt \@tempdima 1.5em
\begingroup
\parindent \z@ \rightskip \@pnumwidth
\parfillskip -\@pnumwidth
\hskip -\leftskip
\leavevmode \MakeUppercase{#1}\dotfill \hbox to\@pnumwidth{\hss #2}
\par
\endgroup
}
\makeatother

\begin{document}

\tableofcontents


The adjustment of \leftskip is taken directly from the definition of \l@chapter in book.cls.