How to Change Line Spacing for a Single Paragraph in LaTeX
Sometimes you need different line spacing for a specific paragraph — a long quotation that should be single-spaced in a double-spaced document, or a disclaimer that needs extra breathing room. The setspace package provides environments for local spacing changes without affecting the rest of your document. Bibby AI lets you select text and adjust its spacing from a context menu, which is more intuitive than wrapping content in environments manually in Overleaf.
Using setspace Environments
The setspace package provides singlespace, onehalfspace, and doublespace environments that you can wrap around individual paragraphs:
\documentclass{article}
\usepackage{setspace}
\doublespacing % Global double spacing
\begin{document}
This paragraph is double-spaced because of the global setting.
It has normal document-wide line spacing.
\begin{singlespace}
This paragraph is single-spaced. Useful for long block quotes,
code listings, or footnote-style text that shouldn't have the
same generous spacing as the main body text.
\end{singlespace}
This paragraph returns to double spacing automatically.
\end{document}Custom Spacing with \setstretch
For precise control, use the spacing environment with a custom multiplier, or \setstretch for a group:
\usepackage{setspace}
% Custom spacing with the spacing environment
\begin{spacing}{1.25}
This paragraph has 1.25x line spacing.
You can use any decimal value here.
\end{spacing}
% Using \setstretch in a group
{\setstretch{0.9}
This paragraph has slightly tighter spacing (0.9x).
Useful for captions or sidebar text that should be compact.
}
% Another common pattern: tight spacing for a quote
\begin{spacing}{1.0}
\begin{quote}
``To be, or not to be, that is the question...''
\end{quote}
\end{spacing}💡 Tips
- •Always use setspace instead of \linespread — setspace handles footnotes, floats, and captions correctly.
- •The spacing multiplier is relative to normal: 1.0 = single, 1.3 ≈ one-and-a-half, 1.6 ≈ double.
- •Block quotes in double-spaced theses are typically single-spaced — wrap them in \begin{singlespace}.
- •Bibby AI's formatting toolbar lets you change spacing for selected text directly, no environment wrapping needed.
Try This in Bibby AI
Write LaTeX faster with AI auto-complete and instant compilation.
Start Writing Free