LaTeX Guide

LaTeX Spacing

Vertical: \vspace, \smallskip/\medskip/\bigskip. Horizontal: \hspace, \quad/\qquad. Line spacing: setspace package.

Vertical spacing

% Arbitrary
\vspace{1em}             % 1 em-height
\vspace{12pt}            % 12 points
\vspace{2cm}             % 2 cm

% Semantic (scales with font)
\smallskip               % ~3pt
\medskip                 % ~6pt
\bigskip                 % ~12pt

% Force the space (don't remove at page breaks)
\vspace*{1em}

% Stretch / fill
\vfill                   % fill remaining vertical space
\vspace{\fill}           % alias

Horizontal spacing

% Arbitrary
\hspace{1em}             % 1 em
\hspace{12pt}            % 12 pt
\hspace*{1em}            % non-removable

% Stretch
\hfill                   % fill remaining horizontal space

% Math-mode spacing
\,                       % thin space (3/18 em)
\:                       % medium space (4/18 em)
\;                       % thick space (5/18 em)
\!                       % negative thin space
\quad                    % 1 em
\qquad                   % 2 em

Line spacing (single, 1.5x, double)

\usepackage{setspace}

% Document-wide
\singlespacing           % default
\onehalfspacing
\doublespacing
\setstretch{1.25}        % arbitrary

% Apply to one block
\begin{spacing}{2.0}
  This text is double-spaced.
\end{spacing}

% In document setup for thesis
\doublespacing            % most theses are double-spaced

Paragraph spacing

% Default LaTeX: indent paragraphs, no vertical gap
% Modern look: no indent, vertical gap between paragraphs

\setlength{\parindent}{0pt}
\setlength{\parskip}{0.6em plus 0.1em minus 0.1em}

% The 'plus 0.1em minus 0.1em' lets LaTeX stretch/shrink
% the gap slightly to balance pages.

Common reference table

WantUse
Small vertical gap\smallskip
Medium vertical gap\medskip
Big vertical gap\bigskip
Custom vertical gap\vspace{1em}
Push to right margin\hfill
Push to bottom of page\vfill
1em horizontal in math\quad
Double-spacing\doublespacing
Custom line spacing\setstretch{1.25}
Typst spacing: #v(), #h(), and named arguments
#v(1em)                            // vertical
#h(1em)                            // horizontal
#h(1fr)                            // stretch (fill width)
#set par(leading: 1em)             // line spacing
#set block(spacing: 1em)           // paragraph spacing
Try TypeTeX free

Frequently Asked Questions

How do I add vertical space in LaTeX?

\vspace{1em} adds 1em (one font-size unit) of vertical space. \vspace{12pt} for 12 points. Inside a paragraph, use \\[12pt] for line break + extra space. For semantic sizes: \smallskip (3pt), \medskip (6pt), \bigskip (12pt) — these scale with font size.

How do I add horizontal space in LaTeX?

\hspace{1em} adds 1em horizontal space. \hfill stretches to fill remaining width (like flexbox justify-end). In math mode: \quad (1em), \qquad (2em), \, (thin space), \: (medium), \; (thick), \! (negative thin).

How do I set line spacing (single, 1.5x, double)?

Use the setspace package: \usepackage{setspace}. Then \singlespacing, \onehalfspacing, or \doublespacing in the preamble or document body. For arbitrary: \setstretch{1.25}. Apply to a section only: \begin{spacing}{2.0} ... \end{spacing}.

How do I add space between paragraphs?

\setlength{\parskip}{1em} adds 1em between paragraphs. Default is 0pt (paragraphs only differ by first-line indent). Combined with \setlength{\parindent}{0pt} you get block-style paragraphs (no indent, with vertical separation) — the modern web look.

What's the difference between \vspace and \vspace*?

\vspace creates removable vertical space — LaTeX may discard it at page breaks to keep layout consistent. \vspace* creates non-removable space that persists even at page breaks. Use the starred form when you specifically need the gap to appear (rare).

How do I remove the default first-line indent?

\setlength{\parindent}{0pt} removes paragraph indentation globally. For one paragraph only, use \noindent at the start. Note: removing indent without adding \parskip makes paragraphs blur together visually — usually do both.

What's the right way to space math equations?

Use math-mode spacing commands: \, (thin), \: (medium), \; (thick), \! (negative thin), \quad (1em), \qquad (2em). Don't use ~ or non-breaking space in math. For aligning around equations: \\[12pt] adds extra vertical space between aligned equation lines.

How do I get a blank line in LaTeX?

Leave a blank line in your source — that creates a paragraph break. To add visible vertical space, use \vspace{1em} or one of \smallskip/\medskip/\bigskip. \\ is line break, NOT blank line — it stays in the same paragraph.

Why are LaTeX paragraphs running together?

Default LaTeX uses only first-line indent (no vertical gap) to mark paragraphs. If your editor/template removed the indent without adding \parskip, paragraphs lose their separator. Fix: \setlength{\parskip}{0.5em plus 0.1em minus 0.1em} for some flexible spacing, or just set \parindent back to 1em.

More LaTeX guides