Underleaf Logo
Underleaf
BlogPricing
Log InTry Free

Learn LaTeX

Getting Started

  • What is LaTeX?
  • LaTeX for Beginners

How to Change Line Spacing in LaTeX

Use the setspace package. Load it in the preamble and pick one of \singlespacing, \onehalfspacing, or \doublespacing. That is the whole answer for most documents — the rest of this page is why the alternatives you may have seen are worse, and how to handle partial-document and custom-factor cases.

The right answer: setspace

One design decision makes this package the right one: setspace deliberately keeps footnotes and float captions single-spaced while the body text stretches. That is the typographically correct behavior, and it is exactly what thesis offices and journals mean when they ask for "double-spaced manuscript". Roll your own spacing and you lose this for free.

CommandEffect
\singlespacingDefault spacing (useful to switch back mid-document)
\onehalfspacingOne-and-a-half spacing
\doublespacingDouble spacing
\setstretch{1.25}Any custom stretch factor

Why not \baselinestretch?

Older forum answers recommend the raw mechanism:

Two traps. First, the change only takes effect at the next font size change, because that is when TeX recomputes the baseline distance. Put it mid-document and nothing happens until a \section or an explicit \selectfont comes along — which reads as "LaTeX ignored my command". Second, it stretches everything, footnotes and captions included, which is not what any style guide wants. setspace exists precisely to paper over both problems. There is no situation in a normal document where the raw command is the better choice.

Changing spacing for part of a document

The spacing commands work mid-document, and setspace also provides environments for a bounded block:

One subtlety: line spacing is applied when a paragraph ends. If you put \end{spacing} before the blank line that ends the paragraph, the paragraph gets the outer spacing, not the one you asked for. Keep the environment's end after the paragraph break and it behaves.

The manuscript-review use case

The single most common reason anyone needs this: a journal asks for a double-spaced manuscript for review. The recipe is two lines, and it's trivially reversible for the final version:

Because footnotes and captions stay single-spaced, the output matches what editorial offices actually expect — no special handling needed. If the guidelines specify an exact factor ("line spacing of exactly 2"), \setstretch{2} gives you the literal number; \doublespacing uses the slightly different factor that traditional double spacing corresponds to for the current font size. In practice nobody measures, but the knob is there.

One-off vertical gaps are a different problem

Wanting extra room after one particular line is not a line-spacing problem. For that, use a break with an explicit gap, or \vspace between paragraphs:

Frequently asked questions

How do I double space a LaTeX document?

Load the setspace package and put \doublespacing in the preamble: \usepackage{setspace} then \doublespacing. The whole document switches, while footnotes and float captions deliberately stay single-spaced — which is what journals reviewing your manuscript expect.

What is the difference between setspace and \baselinestretch?

\renewcommand{\baselinestretch}{1.5} is the raw mechanism: it only takes effect after a font size change, and it leaks into footnotes and captions. setspace wraps the same mechanism correctly — it applies immediately and keeps footnotes and captions single-spaced. Use setspace.

How do I set 1.5 line spacing in LaTeX?

\usepackage{setspace} with \onehalfspacing in the preamble. Note this sets the baseline distance to what 'one-and-a-half spacing' means typographically, which is not literally 1.5 times the font size — if a style guide demands an exact factor, use \setstretch{1.5} instead.

How do I change line spacing for only part of a document?

Use setspace's environments: wrap the block in \begin{doublespace}...\end{doublespace}, or \begin{spacing}{1.8}...\end{spacing} for a custom factor. Spacing switches take effect at the end of a paragraph, so keep the \end after the paragraph's final blank line.

Try it free

Skip the syntax — let AI write it.

Snap a photo of an equation, a table, or full handwritten notes and Underleaf turns it into clean, compilable LaTeX in seconds. 10 free credits every month, no credit card required.

Convert your page
Handwritten notes converted into a typeset LaTeX document

How to Change Line Spacing in LaTeX

Use the setspace package. Load it in the preamble and pick one of \singlespacing, \onehalfspacing, or \doublespacing. That is the whole answer for most documents — the rest of this page is why the alternatives you may have seen are worse, and how to handle partial-document and custom-factor cases.

The right answer: setspace

One design decision makes this package the right one: setspace deliberately keeps footnotes and float captions single-spaced while the body text stretches. That is the typographically correct behavior, and it is exactly what thesis offices and journals mean when they ask for "double-spaced manuscript". Roll your own spacing and you lose this for free.

CommandEffect
\singlespacingDefault spacing (useful to switch back mid-document)
\onehalfspacingOne-and-a-half spacing
\doublespacingDouble spacing
\setstretch{1.25}Any custom stretch factor

Why not \baselinestretch?

Older forum answers recommend the raw mechanism:

Two traps. First, the change only takes effect at the next font size change, because that is when TeX recomputes the baseline distance. Put it mid-document and nothing happens until a \section or an explicit \selectfont comes along — which reads as "LaTeX ignored my command". Second, it stretches everything, footnotes and captions included, which is not what any style guide wants. setspace exists precisely to paper over both problems. There is no situation in a normal document where the raw command is the better choice.

Changing spacing for part of a document

The spacing commands work mid-document, and setspace also provides environments for a bounded block:

One subtlety: line spacing is applied when a paragraph ends. If you put \end{spacing} before the blank line that ends the paragraph, the paragraph gets the outer spacing, not the one you asked for. Keep the environment's end after the paragraph break and it behaves.

The manuscript-review use case

The single most common reason anyone needs this: a journal asks for a double-spaced manuscript for review. The recipe is two lines, and it's trivially reversible for the final version:

Because footnotes and captions stay single-spaced, the output matches what editorial offices actually expect — no special handling needed. If the guidelines specify an exact factor ("line spacing of exactly 2"), \setstretch{2} gives you the literal number; \doublespacing uses the slightly different factor that traditional double spacing corresponds to for the current font size. In practice nobody measures, but the knob is there.

One-off vertical gaps are a different problem

Wanting extra room after one particular line is not a line-spacing problem. For that, use a break with an explicit gap, or \vspace between paragraphs:

Frequently asked questions

How do I double space a LaTeX document?

Load the setspace package and put \doublespacing in the preamble: \usepackage{setspace} then \doublespacing. The whole document switches, while footnotes and float captions deliberately stay single-spaced — which is what journals reviewing your manuscript expect.

What is the difference between setspace and \baselinestretch?

\renewcommand{\baselinestretch}{1.5} is the raw mechanism: it only takes effect after a font size change, and it leaks into footnotes and captions. setspace wraps the same mechanism correctly — it applies immediately and keeps footnotes and captions single-spaced. Use setspace.

How do I set 1.5 line spacing in LaTeX?

\usepackage{setspace} with \onehalfspacing in the preamble. Note this sets the baseline distance to what 'one-and-a-half spacing' means typographically, which is not literally 1.5 times the font size — if a style guide demands an exact factor, use \setstretch{1.5} instead.

How do I change line spacing for only part of a document?

Use setspace's environments: wrap the block in \begin{doublespace}...\end{doublespace}, or \begin{spacing}{1.8}...\end{spacing} for a custom factor. Spacing switches take effect at the end of a paragraph, so keep the \end after the paragraph's final blank line.

Underleaf Logo
Underleaf

Empowering students and researchers with AI-powered tools for academic writing.

Go to appContact us

Company

PricingBlogTutorialsConference TemplatesConference Deadlines

Free Tools

Image to LaTeXExcel to LaTeXArXiv to LaTeXTikZ GeneratorLaTeX Table GeneratorCitation GeneratorThesis GeneratorChrome ExtensionAll Tools

Ask AI about Underleaf

Ask ChatGPTAsk ClaudeAsk Perplexity

© 2026 Underleaf. All rights reserved.