Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
  \chapter*{TABLE OF CONTENTS\@mkboth{CONTENTS}{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
  \addtocontents{lof}{\noindent\mbox{Figure}\hfill\mbox{Page}}}

\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.

share|improve this question
3  
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? –  Alan Munn Jul 18 '11 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...) –  Chance Jul 18 '11 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 –  Alan Munn Jul 18 '11 at 23:37

2 Answers 2

up vote 2 down vote accepted

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

share|improve this answer
2  
Depending on the requirements, this may not be permitted. (And it's a good way to avoid the problem, but not to solve it.) –  Alan Munn Jul 18 '11 at 22:59
    
Thanks for the suggestion, but paraphrasing isn't permitted as far as I know. –  Chance Jul 19 '11 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} –  Chance Jul 20 '11 at 19:20

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.

share|improve this answer

Your Answer

 
discard

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.