Change line spacing in Overleaf and LaTeX.
To change line spacing in Overleaf, load the setspace package in your preamble and use commands like \onehalfspacing, \doublespacing or \setstretch{factor}. The package adjusts lines cleanly without altering spacing inside footnotes, tables or captions.
The short answer: add \usepackage{setspace} to your preamble, then write \onehalfspacing or \doublespacing right after \begin{document}.
The best method: using the setspace package
The standard way to manage vertical spacing in LaTeX is the setspace package. Unlike low-level commands that alter global parameters directly, setspace handles font size changes properly and keeps footnotes and captions at their correct single-spaced heights.
Add the package in your preamble, which is the area between \documentclass{...} and \begin{document}.
Four ways to set line spacing
Global and local spacing commands
Single spacing
Use \singlespacing to enforce standard single spacing. It is useful for reverting sections back to default inside a larger document.
\singlespacing
One-and-a-half spacing
Use \onehalfspacing to set the document or section to 1.5 line spacing, which is standard for most academic theses and manuscript submissions.
\onehalfspacing
Double spacing
Use \doublespacing to double the distance between lines, often required for blind peer review drafts or APA style guides.
\doublespacing
Custom stretch factor
Use \setstretch{value} when a publisher or professor requests a specific multiplier like 1.25 or 1.7.
\setstretch{1.25}
Changing spacing for a single block of text
If your entire document uses double spacing but you need an extended block quote or an appendix to be single-spaced, wrap that specific block in the spacing environment.
The environment automatically resets the spacing back to your global document setting once it reaches \end{spacing}, preventing spacing creep across your pages.
Alternative: the \linespread command
You can change line spacing without packages by using \linespread{factor} in your preamble. A factor of 1.0 is standard, 1.3 corresponds roughly to one-and-a-half spacing, and 1.6 scales to double spacing.
If you use \linespread in the document body rather than the preamble, you must follow it with a font-changing switch like \selectfont for the change to take effect immediately. Most users prefer setspace because it avoids these low-level quirks.
よくある質問
How do I change line spacing in Overleaf?
Include \usepackage{setspace} in your preamble and place \onehalfspacing or \doublespacing immediately after \begin{document}.
How do I set 1.5 line spacing in LaTeX?
Add \usepackage{setspace} to your preamble and use \onehalfspacing in your text, or use \setstretch{1.5} for precise custom control.
Why does my \renewcommand{\baselinestretch} command not work?
Redefining \baselinestretch manually only takes effect when a font size changes. Use \setstretch{value} from the setspace package instead, as it applies changes immediately.
あなたの論文を Texeno で試してみましょう。
無料で始めて、プロジェクトを .zip でアップロードし、リコンパイルを押すだけ。コンパイル時間を延ばしたくなったらアップグレードしてください。
書き始める