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.
\onehalfspacingAny 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}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}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}Pitfalls
- A factor of 1.5 is not one-and-a-half spacing. The normal line spacing is already about 1.2 times the font size, so
\onehalfspacinguses the factor 1.25 at 10 pt, 1.213 at 11 pt and 1.241 at 12 pt.\linespread{1.5}at 10 pt gives 18 pt between the baselines, which is 1.8 times the font size. setspacekeeps footnotes, figures and tables at single spacing.\linespreadin the preamble changes them too.
Compiled with pdfLaTeX from TeX Live 2023.
Related pages
- Package
setspace - How-to Space between paragraphs in LaTeX
- How-to Change the font size in LaTeX
- How-to Set page margins in LaTeX
- How-to Paragraph indentation in LaTeX