LaTeX Guide

LaTeX Margins

Use the geometry package. One line, all margins set. Forget the old \setlength approach.

The one-line answer

\usepackage[margin=1in]{geometry}    % all sides 1 inch

Common margin presets

% Journal manuscript (US letter)
\usepackage[margin=1in]{geometry}

% Journal manuscript (A4)
\usepackage[a4paper, margin=2.5cm]{geometry}

% Thesis (extra space on left for binding)
\usepackage[left=1.5in, right=1in, top=1in, bottom=1in]{geometry}

% Two-sided thesis (binding alternates)
\usepackage[twoside, inner=1.5in, outer=1in, top=1in, bottom=1in]{geometry}

% Tight margins (more text per page)
\usepackage[margin=0.75in]{geometry}

% NSF grant (specific 1in requirement)
\usepackage[margin=1in, includehead]{geometry}

Asymmetric margins explained

OptionEffect
margin=1inAll four sides 1in
left=1.5in, right=1inLeft wider for binding
top=1in, bottom=1inTop/bottom independently
inner=1.5in, outer=1inTwo-sided: inner = binding edge
hmargin=1inLeft + right (horizontal) both 1in
vmargin=1inTop + bottom both 1in

Per-page overrides

% In document body, change margins for one section
\newgeometry{margin=0.5in}
\begin{landscape}
  % wide table or figure here
\end{landscape}
\restoregeometry

Common mistakes

  • Using \setlength{\textwidth}{6in} instead of geometry. Old approach, error-prone. Use geometry.
  • Setting paper size in two places. Pick either \documentclass[a4paper]{...} or \usepackage[a4paper]{geometry} — not both.
  • Margins too small. Below 0.5in your text touches the page edge in print. Most journals require minimum 1in.
  • Forgetting \restoregeometry. Without it, the new geometry stays for the rest of the document.
  • Loading geometry after hyperref. geometry must come before hyperref in the preamble.
Typst margins via #set page
#set page(
  paper: "us-letter",
  margin: 1in,
)

// Asymmetric:
#set page(margin: (left: 1.5in, right: 1in, y: 1in))

No package import. Margins are first-class on the page object. Try TypeTeX free.

Try TypeTeX free

Frequently Asked Questions

How do I set margins in LaTeX?

Use the geometry package: \usepackage[margin=1in]{geometry} for 1-inch margins on all sides. For asymmetric margins: \usepackage[left=1.5in, right=1in, top=1in, bottom=1in]{geometry}. The geometry package is the modern, recommended way — much simpler than the old \setlength approach.

What's the default margin in LaTeX?

Standard article class on US letter paper: roughly 1.875 inches (~4.8cm) on left and right, 1 inch top, 1 inch bottom. These wide defaults date from typewriter-era conventions. Most modern documents override with \usepackage[margin=1in]{geometry} for tighter, more space-efficient margins.

How do I set 1-inch margins on all sides?

\usepackage[margin=1in]{geometry} — that's it. One line in the preamble. For 1in/2.54cm/25.4mm — geometry accepts any of these units interchangeably.

How do I set asymmetric margins for thesis (1.5in left, 1in right)?

\usepackage[left=1.5in, right=1in, top=1in, bottom=1in]{geometry}. The left margin is wider to allow for binding. For two-sided printing where odd/even pages have different binding, use [inner=1.5in, outer=1in, twoside].

How do I change paper size in LaTeX?

Document class option: \documentclass[a4paper]{article} or [letterpaper] (default in US). Other options: a5paper, b5paper, executivepaper, legalpaper. Or pass to geometry: \usepackage[a4paper, margin=1in]{geometry}. Set paper size first, then margins.

How do I change margins for one page only?

Use geometry's \newgeometry inside the document body: \newgeometry{margin=0.5in} ... your page ... \restoregeometry. The \restoregeometry resets to the original. Useful for landscape pages with a figure or for a wide-format table.

What's the difference between geometry and \setlength?

geometry is a high-level package that handles all margin-related lengths together (textwidth, textheight, marginnotes, etc.) consistently. \setlength{\textwidth}{6in} \setlength{\oddsidemargin}{1in} ... requires manually setting ~10 different lengths and is error-prone. Always use geometry.

How do I see what margins I'm using?

Add \usepackage{layout} and call \layout in the document body — produces a diagram of all the margin/text dimensions on the next page. For just dimensions, use \printinunitsof{in}\prntlen{\textwidth} (after \usepackage{layouts}).

Can I use centimeters or millimeters for margins?

Yes — geometry accepts any LaTeX length: in, cm, mm, pt (points), bp (big points), em (em-width), ex (x-height). \usepackage[margin=2.5cm]{geometry} works the same as 1in. Mixing units is fine: [left=3cm, right=1in, top=25mm].

More LaTeX guides