How-to

How to Change Page Margins in LaTeX

The fix

To change margins in LaTeX, load the geometry package and set them in one line: \usepackage[margin=1in]{geometry} gives 1-inch margins on all sides. For different sides, \usepackage[left=1.5in,right=1in,top=1in,bottom=1in]{geometry}. Use in for inches or cm for centimetres.

Why it happens

The standard classes ship with wide default margins based on classic line-length rules, which often look too generous. The geometry package overrides them cleanly — do not hand-tweak \hoffset and \textwidth, which is fiddly and error-prone.

Example

% 1-inch margins all around:
\usepackage[margin=1in]{geometry}

% Different per side + paper size:
\usepackage[a4paper,left=3cm,right=2cm,top=2.5cm,bottom=2.5cm]{geometry}

% Change margins for one section (e.g. a wide table):
\newgeometry{margin=1cm}
... wide content ...
\restoregeometry

Frequently asked questions

How do I set 1-inch margins?

Put \usepackage[margin=1in]{geometry} in the preamble. That sets all four margins to one inch — the setting many journals and thesis offices require.

Can I change margins on just one page?

Yes — wrap the region in \newgeometry{...} and \restoregeometry. Handy for a landscape or wide-table page, or an appendix with different margins.

My university wants a wider left binding margin.

Add a binding offset: \usepackage[left=1.5in,right=1in,top=1in,bottom=1in]{geometry}, or use the bindingoffset key together with the twoside option.

Try the fix in LetX

Open the editor, paste your code, and compile in 1 second to see the error clear — free, in your browser.

Open LetX Free