Octree LogoOctree

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

OptionWidthHeightTypical Use
a4paper210 mm297 mmInternational standard, journals
letterpaper8.5 in11 inUS standard
a5paper148 mm210 mmSmall booklets, pocket guides
b5paper176 mm250 mmBooks, textbooks
legalpaper8.5 in14 inUS legal documents
executivepaper7.25 in10.5 inBusiness 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.
  • \restoregeometry returns to whatever was set in the preamble\geometry{...} call.
  • You can call \newgeometry multiple times with different settings throughout the document.

Quick Reference

Here is a summary of the most useful geometry package options:

OptionDescriptionExample
marginSet all four margins equallymargin=1in
left / rightIndividual horizontal marginsleft=30mm
top / bottomIndividual vertical marginstop=25mm
inner / outerMargins for two-sided documentsinner=35mm
hmarginSet left and right margins togetherhmargin=25mm
vmarginSet top and bottom margins togethervmargin=30mm
headheightHeight of the header areaheadheight=14pt
headsepSpace between header and bodyheadsep=10mm
footskipSpace between body and footerfootskip=12mm
landscapeSwitch to landscape orientationlandscape
includeheadfootInclude header/footer in body areaincludeheadfoot
paperwidth / paperheightCustom paper dimensionspaperwidth=6in
textwidth / textheightSet body text area directlytextwidth=16cm

Common Paper Sizes

A complete reference of ISO and North American paper sizes you may encounter:

SizeWidth (mm)Height (mm)Width (in)Height (in)
A329742011.6916.54
A42102978.2711.69
A51482105.838.27
A61051484.135.83
B51762506.939.84
US Letter2162798.511
US Legal2163568.514
US Executive1842677.2510.5

Next Steps

Now that you can control page layout, explore more LaTeX topics:

Free LaTeX Tools

Ready to start writing?

Try Octree – the AI-powered LaTeX editor that makes writing faster and easier.

Try Octree Free →