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 currently writing my thesis using TeXworks and MiKTeX.

I'm using the report document class. My problem is that I need to increase line spacing but some of my chapter and section headings are very long (sometimes spanning 5 lines which is half a page for a chapter heading). Headings such as this one I cannot change to be shorter (the work is already published) but I'd rather not have an entire page taken up with a heading.

I've tried \doublespacing in setspace as well as \linespread.

Any and all suggestions would be great.

\documentclass[12pt,a4paper,oneside,draft]{report}
\usepackage[lmargin=4.0cm, rmargin=2.5cm,tmargin=3cm,bmargin=2.5cm]{geometry}
\usepackage{mathpazo}
\usepackage{sectsty}
\usepackage{setspace}
\allsectionsfont{\scshape}
\doublespacing
\begin{document}

\tableofcontents
\listoffigures
\listoftables

\include{chapters/Chapter1}
\include{chapters/Chapter2}
\include{chapters/Chapter3}
\include{chapters/Chapter4}
\include{chapters/Chapter5}

\end{document} 
share|improve this question
2  
Welcome to TeX.SE. It is always best to compose a fully compilable MWE that illustrates the problem including the \documentclass and the appropriate packages so that those trying to help don't have to recreate it. –  yo' Feb 8 '12 at 23:59

2 Answers 2

You could use the optional ToC argument of \chapter and modify the mandatory argument using \setstretch from setspace. Here's a minimal example showing the difference in output:

enter image description here

\documentclass{report}
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\usepackage{setspace}% http://ctan.org/pkg/setspace
\begin{document}
\tableofcontents
\chapter[Here is a long title that spans a number of lines and 
    takes up a large amount of space on a single page]%
  {\setstretch{0.5}Here is a long title that spans a number of lines and 
    takes up a large amount of space on a single page}
\lipsum
\chapter{Here is a long title that spans a number of lines and 
    takes up a large amount of space on a single page}
\lipsum
\end{document}​

You can't just use the mandatory argument to manage the line spread since it makes its way into the ToC without an optional argument.

share|improve this answer
    
I've added in the basics of my tex file that I think are relevant to your post. How can I make your solution work when I'm using \include to add multiple chapters? I've tried adding \setstretch{0.5} to various places and it fails to compile each time. Any further suggestions? –  Will Feb 9 '12 at 8:02
    
@Will: Each of your chapter files (/chapter/Chapter?.tex) should contain a command \chapter{..}. You need to insert \setstretch{0.5} within that command and add an optional equivalent so they look like \chapter[..]{\setstretch{0.5}..}. Does this not work? –  Werner Feb 9 '12 at 15:13
    
Unfortunately your suggestion did not work. However, by starting each chapter file with: \setstretch{0.75} \chapter{Chapter title} \label{Chapter1} \markboth{Chapter title}{Chapter 1} \setstretch{2} It worked fine. The heading was still double spaced in the table of contents but the heading spacing is good in the pdf and the rest of the text was double spaced. Because of the formatting of my chapter headings I had to put \setstretch{0.75} because \setstretch{0.5} made everything too compressed and ugly. –  Will Feb 18 '12 at 10:59
    
@Will: Since it worked in my minimal example, you must have a different setup. Note that you have to supply an optional argument to \chapter containing the unformatted text version. If you want the spacing to be different in the ToC, you'll have to be more specific, or perhaps post a follow-up questions. –  Werner Feb 18 '12 at 15:25

Instead of using \chapter' s optional argument for "normal" line spacing in the ToC, you may patch the internal macro \@makechapterhead so that it a) will apply \setstretch{0.5} if the new tightnextchapter boolean switch is set to true and b) sets the switch to false (again) afterwards. In the document body, you simply issue \tightnextchaptertrue immediately before the respective chapter(s).

\documentclass{report}

\newif\iftightnextchapter
\tightnextchapterfalse

\usepackage{etoolbox}

\makeatletter
\patchcmd{\@makechapterhead}{\huge}{\iftightnextchapter\setstretch{0.5}\fi\huge}{}{}
\apptocmd{\@makechapterhead}{\tightnextchapterfalse}{}{}
\makeatother

\usepackage{setspace}

\usepackage{lipsum}

\newcommand*{\longchaptertitle}{Here is a long title that spans a number
    of lines and takes up a large amount of space on a single page}

\begin{document}

\tableofcontents

\tightnextchaptertrue
\chapter{\longchaptertitle}

\lipsum

\chapter{\longchaptertitle}

\lipsum

\end{document}​
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.