Octree LogoOctree

How to Add Blank Spaces and Line Breaks in LaTeX (Complete Guide)

Date Published

How to Add Blank Spaces and Line Breaks in LaTeX (Complete Guide)

Understanding Blank Spaces in LaTeX

LaTeX handles whitespace differently than word processors. Multiple spaces collapse into one, and line breaks in your source don't create line breaks in output. Let's master spacing.

Horizontal Blank Spaces

Basic Horizontal Spacing Commands

\quad — space equal to current font size \qquad — double \quad \, — thin space (3/18 of a quad) \: — medium space (4/18 of a quad) \; — thick space (5/18 of a quad) \ — normal interword space \! — negative thin space

Fixed-Width Spaces

\hspace{1cm} — exactly 1cm horizontal space \hspace*{2em} — 2em space (won't disappear at line start) \hfill — fills available horizontal space

Example: Creating Aligned Text

Vertical Blank Spaces

Line Breaks

\\ — new line \\[1cm] — new line with 1cm extra space \newline — new line (no optional spacing)

Vertical Spacing Commands

\vspace{1cm} — add 1cm vertical space \vspace*{2cm} — 2cm space (won't disappear at page top) \smallskip — small vertical space \medskip — medium vertical space \bigskip — large vertical space \vfill — fills available vertical space

Blank Lines and Paragraphs

A blank line in your source creates a new paragraph:

To add extra space between paragraphs:

The \phantom Command

Create invisible space matching specific text:

Common Spacing Mistakes

Problem: Spaces at paragraph start disappear Solution: Use \hspace*{} or \indent

Problem: Vertical space at page top vanishes Solution: Use \vspace*{} instead of \vspace{}

Problem: Too much space after periods Solution: Use \ after abbreviations like "Dr.\ Smith"

Smart Spacing with Octree

Octree's AI understands LaTeX spacing semantics. It can:

  • Suggest appropriate spacing commands

  • Fix common whitespace errors

  • Maintain consistent spacing throughout your document

  • Convert manual spacing to proper LaTeX commands

Try it at https://useoctree.com

Octree vs Overleaf
News

Discover how Octree compares to Overleaf — from AI-assisted LaTeX writing and TikZ/BibTeX automation to open-source flexibility and offline editing for researchers.