The setspace package
Sets the line spacing of the text with \onehalfspacing, \doublespacing and \setstretch.
Loading the package
\usepackage{setspace}\linespread{1.5} and a redefined \baselinestretch stretch every line of the document, including footnotes and captions. setspace changes the spacing of the running text and keeps footnotes, figures and tables single-spaced.
\onehalfspacing does not use the factor 1.5. It sets 1.25 for a 10pt document, 1.213 for 11pt and 1.241 for 12pt, which gives a line distance of one and a half times the font size. For another value use \setstretch.
Main commands
\onehalfspacing | One-and-a-half line spacing from this point on. |
\doublespacing | Double line spacing from this point on. |
\singlespacing | Back to single spacing. |
\setstretch{1.15} | Any factor, relative to single spacing. |
\begin{spacing}{1.8} ... \end{spacing} | A factor for one part of the text only. |
\begin{singlespace} ... \end{singlespace} | A single-spaced part, for example a long quotation; onehalfspace and doublespace work the same way. |
Complete example
\documentclass[12pt]{article}
\usepackage{setspace}
\onehalfspacing
\begin{document}
This paragraph is set with one-and-a-half line spacing. It needs a few
more words so that it fills at least two lines and the distance between
them is visible.\footnote{The footnote stays single-spaced.}
\begin{singlespace}
This paragraph is single-spaced. It also runs over more than one line,
which shows the difference to the paragraph above.
\end{singlespace}
\end{document}Compiled with pdfLaTeX from TeX Live 2023.
Pitfalls
- The package options
onehalfspacinganddoublespacingset the spacing for the whole document:\usepackage[onehalfspacing]{setspace}. - A requirement such as "line spacing 1.5" from a word processor usually means
\onehalfspacing.\setstretch{1.5}gives a wider result.
Related pages
- How-to Line spacing in LaTeX
- How-to Space between paragraphs in LaTeX
- Package
parskip - How-to Set up a thesis in LaTeX