Margins in LaTeX
Use the geometry package to set custom page margins in LaTeX.
Quick Answer
latex
\usepackage[margin=2.5cm]{geometry}Common Margin Presets
latex
% All sides equal:
\usepackage[margin=2.5cm]{geometry}
% Separate horizontal and vertical:
\usepackage[hmargin=3cm, vmargin=2.5cm]{geometry}
% Individual sides:
\usepackage[
top=3cm,
bottom=2.5cm,
left=3cm,
right=2.5cm
]{geometry}
% A4 paper with 2.5 cm margins (common thesis setting):
\usepackage[a4paper, margin=2.5cm]{geometry}Paper Size
latex
% A4 (default in Europe):
\usepackage[a4paper, margin=2.5cm]{geometry}
% US Letter (default in North America):
\usepackage[letterpaper, margin=1in]{geometry}
% A5 booklet:
\usepackage[a5paper, margin=2cm]{geometry}Writing your thesis in LaTeX?
MonsterWriter's LaTeX Workspace gives you real-time PDF preview with no compile limits — at a fraction of Overleaf's price. Works just like Overleaf, costs 11× less.
Try MonsterWriter freeBinding Offset (Thesis)
For printed and bound theses, add extra space on the binding (inner) side with bindingoffset.
latex
\usepackage[
a4paper,
left=3.5cm, % wider for binding
right=2.5cm,
top=2.5cm,
bottom=2.5cm,
bindingoffset=0.5cm
]{geometry}Landscape Orientation
latex
\usepackage[a4paper, landscape, margin=2cm]{geometry}
% Single landscape page in a portrait document:
\usepackage{lscape}
% ...
\begin{landscape}
% wide table or figure here
\end{landscape}Check Layout
Use the layout package to print a diagram of your current page layout.
latex
\usepackage{layout}
\layout % prints a visual diagram of the current marginsRelated Topics
More LaTeX Topics
Bold TextItalic TextUnderline TextStrikethroughFont SizeText ColorText AlignmentHyperlinksSectionsTable of ContentsNew PageNew LineLine SpacingPage NumbersHeaders & FootersMinipageTablesFigures & ImagesListsEquationsFractionsSquare RootSubscript & SuperscriptSummationIntegralMatrixGreek LettersArrowsTilde (~)Delta (δ, Δ)Hash (#)BibliographyCross-ReferencesFootnotes