Page Size and Margins in LaTeX
Controlling page layout is essential for academic papers, theses, dissertations, books, and any professionally typeset document. LaTeX gives you precise control over page dimensions, margins, headers, footers, and more — primarily through the powerfulgeometry package.
Default Page Layout
Before you change anything, it helps to understand what LaTeX does out of the box. The default page size depends on the document class and your TeX distribution:
- US Letter (8.5 × 11 in) – default for most US-based TeX distributions and classes such as
article,report, andbook. - A4 (210 × 297 mm) – common default when the distribution is configured for European or international use, and used by many journal templates.
LaTeX's built-in margin defaults are intentionally wide — roughly 1.5 inches on each side for a letter-sized document — because they are optimised for readability with a line length of about 66 characters. While this produces pleasant body text, most authors need tighter control for submission requirements, institutional guidelines, or personal preference.
The geometry Package
The geometry package is the standard tool for setting page size and margins in LaTeX. It provides a clean, declarative interface that replaces the manual adjustment of internal length parameters such as \textwidth, \textheight,\oddsidemargin, and others.
Basic usage is straightforward:
\usepackage[a4paper, margin=1in]{geometry}You can also pass options on a separate line for better readability:
\usepackage{geometry}
\geometry{
a4paper,
left=25mm,
right=25mm,
top=30mm,
bottom=30mm
}Both approaches are equivalent. Use whichever style you find easier to maintain.
Setting Page Size
The geometry package supports every standard paper size as well as fully custom dimensions. Pass the paper size as a package option:
% Standard sizes
\usepackage[a4paper]{geometry}
\usepackage[letterpaper]{geometry}
\usepackage[a5paper]{geometry}
\usepackage[b5paper]{geometry}
\usepackage[legalpaper]{geometry}
\usepackage[executivepaper]{geometry}
% Custom size
\usepackage[paperwidth=6in, paperheight=9in]{geometry}Common Paper Sizes
| Option | Width | Height | Typical Use |
|---|---|---|---|
a4paper | 210 mm | 297 mm | International standard, journals |
letterpaper | 8.5 in | 11 in | US standard |
a5paper | 148 mm | 210 mm | Small booklets, pocket guides |
b5paper | 176 mm | 250 mm | Books, textbooks |
legalpaper | 8.5 in | 14 in | US legal documents |
executivepaper | 7.25 in | 10.5 in | Business correspondence |
Setting Margins
Margins can be set individually or all at once. The geometry package accepts both metric and imperial units (mm, cm,in, pt).
Individual Margins
\usepackage{geometry}
\geometry{
a4paper,
left=30mm,
right=25mm,
top=25mm,
bottom=25mm
}Uniform Margins
Use the margin key to set all four margins to the same value:
\usepackage[a4paper, margin=1in]{geometry}Horizontal and Vertical Shortcuts
\usepackage{geometry}
\geometry{
a4paper,
hmargin=25mm, % sets left and right
vmargin=30mm % sets top and bottom
}Two-sided Documents (inner/outer)
For documents printed on both sides (books, theses), use inner andouter instead of left and right. The inner margin is the one closest to the binding:
\documentclass[twoside]{book}
\usepackage{geometry}
\geometry{
a4paper,
inner=30mm, % binding side
outer=20mm, % outside edge
top=25mm,
bottom=25mm
}Common Margin Presets
Here are ready-to-use configurations for the most frequent scenarios:
1-inch Margins All Around
The most commonly requested layout for US academic submissions:
\usepackage[letterpaper, margin=1in]{geometry}Narrow Margins
Useful for drafts, internal reports, or maximising content area:
\usepackage[a4paper, margin=15mm]{geometry}Wide Margins
Good for documents with margin notes or for improved readability:
\usepackage{geometry}
\geometry{
a4paper,
left=40mm,
right=40mm,
top=35mm,
bottom=35mm
}Thesis-style Layout
Many universities require a wider binding margin. Here is a typical thesis configuration:
\documentclass[12pt, twoside]{report}
\usepackage{geometry}
\geometry{
a4paper,
inner=35mm, % extra space for binding
outer=25mm,
top=25mm,
bottom=30mm,
headheight=14pt,
headsep=12mm
}Landscape Mode
There are several ways to use landscape orientation in LaTeX, depending on whether you want the entire document or just selected pages in landscape.
Entire Document in Landscape
Pass the landscape option to geometry:
\usepackage[a4paper, landscape, margin=1in]{geometry}Individual Landscape Pages
Use the lscape package (or pdflscape for PDF output that rotates the view in PDF readers) to insert landscape pages within a portrait document:
\usepackage{pdflscape}
% ... portrait content ...
\begin{landscape}
% This content appears on a landscape page
\begin{table}[ht]
\centering
\caption{A wide table that needs landscape orientation}
\begin{tabular}{lcccccccc}
\toprule
Item & Jan & Feb & Mar & Apr & May & Jun & Jul & Aug \\
\midrule
Sales & 120 & 135 & 150 & 142 & 160 & 175 & 180 & 190 \\
\bottomrule
\end{tabular}
\end{table}
\end{landscape}
% ... portrait content continues ...Landscape with Adjusted Margins
If you need different margins on landscape pages, combine pdflscape with\newgeometry:
\usepackage{pdflscape}
\usepackage{geometry}
\geometry{a4paper, margin=1in}
\begin{landscape}
\newgeometry{margin=15mm}
% wide content here
\restoregeometry
\end{landscape}Header and Footer Spacing
When using packages like fancyhdr for custom headers and footers, you often need to adjust spacing to prevent overlaps. The geometry package provides dedicated options for this:
\usepackage{geometry}
\geometry{
a4paper,
margin=1in,
headheight=14pt, % height of the header area
headsep=10mm, % space between header and body text
footskip=12mm % space between body text and footer
}If you see the fancyhdr warning "Make it at least 14.49998pt", increase headheight accordingly:
\geometry{headheight=15pt}Including Header and Footer in Margins
By default, geometry places headers and footers inside the margin area. You can change this behaviour with the includeheadfoot option, which counts the header and footer as part of the text body:
\usepackage{geometry}
\geometry{
a4paper,
margin=1in,
includeheadfoot,
headheight=14pt,
headsep=10mm,
footskip=12mm
}Changing Layout Mid-Document
Sometimes you need different margins for different sections of your document — for example, wider margins for an appendix with large figures, or narrower margins for a title page. The geometry package provides two commands for this:
\documentclass{article}
\usepackage{geometry}
\geometry{a4paper, margin=1in}
\begin{document}
\section{Normal Section}
This text uses the default 1-inch margins.
% Switch to new margins
\newgeometry{left=15mm, right=15mm, top=20mm, bottom=20mm}
\section{Wide Section}
This section has narrower margins for more content space.
Perfect for wide tables or figures.
% Restore original margins
\restoregeometry
\section{Back to Normal}
Margins are back to the original 1-inch setting.
\end{document}Important notes about \newgeometry:
- It always triggers a page break, so place it at natural section boundaries.
\restoregeometryreturns to whatever was set in the preamble\geometry{...}call.- You can call
\newgeometrymultiple times with different settings throughout the document.
Quick Reference
Here is a summary of the most useful geometry package options:
| Option | Description | Example |
|---|---|---|
margin | Set all four margins equally | margin=1in |
left / right | Individual horizontal margins | left=30mm |
top / bottom | Individual vertical margins | top=25mm |
inner / outer | Margins for two-sided documents | inner=35mm |
hmargin | Set left and right margins together | hmargin=25mm |
vmargin | Set top and bottom margins together | vmargin=30mm |
headheight | Height of the header area | headheight=14pt |
headsep | Space between header and body | headsep=10mm |
footskip | Space between body and footer | footskip=12mm |
landscape | Switch to landscape orientation | landscape |
includeheadfoot | Include header/footer in body area | includeheadfoot |
paperwidth / paperheight | Custom paper dimensions | paperwidth=6in |
textwidth / textheight | Set body text area directly | textwidth=16cm |
Common Paper Sizes
A complete reference of ISO and North American paper sizes you may encounter:
| Size | Width (mm) | Height (mm) | Width (in) | Height (in) |
|---|---|---|---|---|
| A3 | 297 | 420 | 11.69 | 16.54 |
| A4 | 210 | 297 | 8.27 | 11.69 |
| A5 | 148 | 210 | 5.83 | 8.27 |
| A6 | 105 | 148 | 4.13 | 5.83 |
| B5 | 176 | 250 | 6.93 | 9.84 |
| US Letter | 216 | 279 | 8.5 | 11 |
| US Legal | 216 | 356 | 8.5 | 14 |
| US Executive | 184 | 267 | 7.25 | 10.5 |
Next Steps
Now that you can control page layout, explore more LaTeX topics:
- Learn LaTeX – Complete beginner tutorial
- Learn TikZ – Create diagrams and graphics
- Learn PGFPlots – Generate publication-quality plots
Free LaTeX Tools
- LaTeX Preview – Test your LaTeX code with live PDF preview
- Math to LaTeX – Convert handwritten equations to LaTeX
- Excel to LaTeX – Convert spreadsheets to LaTeX tables
- Citation Generator – Generate BibTeX citations from DOIs
- AI LaTeX Generator – Generate LaTeX from text descriptions
- LaTeX Symbols Reference – Browse math operators and Greek letters
Ready to start writing?
Try Octree – the AI-powered LaTeX editor that makes writing faster and easier.
Try Octree Free →