Line spacing in LaTeX (setspace, onehalfspacing, linespread)

Load the setspace package and put \onehalfspacing or \doublespacing in the preamble. \setstretch{1.2} sets any other factor, and the spacing environment changes a part of the document.

Preamble

The snippets on this page need these lines before \begin{document}:

\usepackage{setspace}

One-and-a-half or double spacing for the document

\onehalfspacing sets the distance between two baselines to 1.5 times the font size, \doublespacing to twice the font size. \singlespacing switches back.

This goes into the preamble.

\onehalfspacing

Open in the editor

Any other factor

\setstretch{factor} multiplies the normal line spacing of the font. The factor 1 is single spacing.

This goes into the preamble.

\setstretch{1.15}

Open in the editor

Change the spacing for a part of the text

The spacing environment takes the factor as its argument. singlespace, onehalfspace and doublespace are environments with a fixed factor, for example for a quotation with single spacing inside a thesis with wider spacing.

\begin{spacing}{1.5}
These lines are set with a factor of 1.5. The paragraph has to run over
more than one line, otherwise there is no line spacing to see.
\end{spacing}
Result
The compiled example

Open in the editor

Without a package

\linespread{factor} in the preamble multiplies the line spacing of the whole document, including footnotes and tables. After \begin{document} it takes effect only at the next font change, so add \selectfont.

This goes into the preamble.

\linespread{1.25}

Open in the editor

Pitfalls

Compiled with pdfLaTeX from TeX Live 2023.

Related pages