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 inchCommon 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
| Option | Effect |
|---|---|
| margin=1in | All four sides 1in |
| left=1.5in, right=1in | Left wider for binding |
| top=1in, bottom=1in | Top/bottom independently |
| inner=1.5in, outer=1in | Two-sided: inner = binding edge |
| hmargin=1in | Left + right (horizontal) both 1in |
| vmargin=1in | Top + 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}
\restoregeometryCommon 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.
#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 freeFrequently Asked Questions
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.
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.
\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.
\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].
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.
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.
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.
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}).
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].