[Tex/LaTex] How to make the line spacing of different sections in one chapter

line-spacingsectioning

I have a chapter in my report that has many sections. For some reason, I would like to make the line spacing for some section equal 1 and 1.5 for some others.

So for example I have a chapter called Welcome and it has three sections Start, Steps, and End. I would like to make the line spacing of section Start equals 1 and the line spacing of section Steps equals 1.5 and the line spacing of section End equals 2.

I did this but it is not working:

\chapter{Welcome}
    \section{Start}\linespread{1}
        blabla
    \section{Steps}\linespread{1.5}
        blabla
    \section{End}\linespread{2}
        blabla

It could be very easy to do it. I do not know. Is this even possible? Thanks for your help.

Best Answer

You should use the setspace package (cf. l2tabu, ยง 1.4). There are several reasons for that:

  • \linespread modifies the value of \baselinestretch indiscriminately. Quite often, one does not want to modify the spacing in footnotes or in list or floating environments.
  • Unlike one may naively think, typographic rules make onehalf spacing, for instance not the equivalent of \linespread{1.5}, but of \linespread{1.25}, if you're using 10pt (this varies with the font size). Similarly, double spacing is \linespread{1.667} for 10 pt.

setspace takes care of all this. It defines environments singlespace, doublespaceand one halfspace and the corresponding commands \singlespacing, \doublespacing and \onehalfspacing. The value used by singlespace (of course, 1 by default) may be changed with the \SetSinglespace command.

If you want a custom spacing, you have the spacing environment and the \setstretch command, which both take one argument.

Related Question