I'm assembling my master's thesis in latex, using my university's provided latex style file. They mandate that if you have a long entry in the table of contents / list of figures et cetera, that the resulting multi-line entry be single spaced (vertically) rather than double spaced. Here is the definition for table of contents and the list of figures from their provided style file:

\def\tableofcontents{
\@restonecolfalse
\if@twocolumn\@restonecoltrue\onecolumn\fi
\def\@chapapp{CONTENTS}
\renewcommand{\@chapapp}{CHAPTER}
\@starttoc{toc}\if@restonecol\twocolumn\fi}

\renewcommand*{\l@chapter}     {\@dottedtocline{0}{0em}{1.5em}}


And the list of figures:

\def\listoffigures{
\@restonecolfalse
\if@twocolumn\@restonecoltrue\onecolumn\fi
\chapter*{LIST OF FIGURES\@mkboth{LIST of FIGURES}{LIST OF FIGURES}}
\@starttoc{lof}
\if@restonecol\twocolumn\fi

\def\l@figure{\@dottedtocline{1}{1em}{2.3em}}


I have looked into the tocloft package, but I'm not sure its capabilities address this particular issue. If anyone has any suggestions, they would be very helpful.

• Are you using setspace for the line spacing? If so, could you just put \singlespacing before the tableofcontents etc. part of your thesis? Can you post a link to the thesis class/package? Jul 18, 2011 at 22:33
• Here is the link to the full package. Using \singespacing is forcing the whole table of contents to be single spaced. That has to be double spaced, only single spaced when there is an entry that needs more than one line (don't ask me why...) Jul 18, 2011 at 22:45
• Looking at the example doc source, it seems that the author has put an very ugly hack to achieve what you want: they have repeated the long heading in the optional argument of \subsection and added \protect\vspace{-2ex} and \\. It works, but it's certainly not the best way. So you are right: your problem isn't solved by the package Jul 18, 2011 at 23:37

Use a short ToC entry, eg \subsection[Discussion and Analysis]{Discussion of the survey results and analysis of the questions}

• Depending on the requirements, this may not be permitted. (And it's a good way to avoid the problem, but not to solve it.) Jul 18, 2011 at 22:59
• Thanks for the suggestion, but paraphrasing isn't permitted as far as I know. Jul 19, 2011 at 0:28
• I found their recommended solution buried in a manual of style. They suggest you use a combination of this, and the hack that Alan pointed out above: \subsection[\protect \vspace {-2ex}{Influence of Nanotube Length and\Diameter on the Conductivity}]{Influence of Nanotube Length and Diameter on the Conductivity} Jul 20, 2011 at 19:20
• This seems to work for two lines, at least for me... but what about when you have more than 2 lines in your caption? Feb 3, 2020 at 7:09
• You need to make the short caption shorter. Feb 4, 2020 at 20:56

if you're using setspace you could add two lines to the toc file. before the subsection with the long title, add this line to the main file:

\addtocontents{toc}{\singlespacing}


and then, after that subsection heading is safely out of the way (probably best at the next paragraph break) add a similar \addtocontents{toc}{...} that restores the previous spacing.