Change margins of a single page

Once in a while I write a document with a lot of large figures in it. It then may occur that you want to change the margins of a single page in order to fit a number of figures in one page. This can be done with the geometry package (from version 5 and later) and the \newgeometry command. A lot of alternatives are available, but this one I find simplest and universal.

The geometry package

If you haven’t already, call the geometry package in the preamble:

\usepackage{geometry}

By the way: I suggest you always call this package as it is one of the LaTeX essential packages in my opinion.

Example

I’ll give an example of the \newgeometry command. First, let’s say you have an initial page layout defined in you preamble:

\usepackage[a4paper]{geometry}

Note that this is purely illustrative, you do not have to chose for a4paper.

Then you stumble upon a page of which you want to adjust the margins. In you LaTeX code, go to a line that is one that page and add the following:

\newgeometry{left=3cm,bottom=0.1cm}

Hence, the page will have a left margin of 3cm and a bottom margin of 0.1cm. The right and top margins remain unchanged.

In order to go back to the original (a4paper) layout, type:

\restoregeometry

Done! Easy!

Alternatives

A lot of alternative ways exist for adjust margins of a single page. Just to name a few of them:

  • The adjustwidth macro that comes with the memoir class
  • The chngpage package
  • The geometry package together with the geometric package
  • The \enlargethispage command if you only want to add one or two extra lines to your page

However, upper mentioned alternatives require either a certain documentclass (memoir) or additional packages. I find the one described in this post perfect.

11 Comments

  1. Leanne says:

    Every time that I use \newgeometry it seems to work, but it starts on a newpage. Is there a way to work around that? Thanks!

  2. Karen says:

    Thanks! This works well except one problem:

    I used \newgeometry {left=1cm,bottom=0.1cm} to fit a large table in one page. In the pdf,a line appears on the top of my table printing “left=1cm,bottom=0″. How can I tell latex not to print this?

    Karen

    • Frits says:

      Hi Karen,

      There shouldn’t be a space between \newgeometry and {left=1cm,bottom=0.1cm}. So, just add \newgeometry{left=1cm,bottom=0.1cm}. Does that help?

  3. [...] Then you stumble upon a page of which you want to adjust the margins. In you LaTeX code, go to a line that is one that page and add the following: newgeometry … A lot of alternative ways exist for adjust margins of a single page. Just to name a few of them: – read more [...]

  4. siddu says:

    how can i write the chapter name at centre of page.pls any one give me corresponding commands.

  5. Fabian says:

    Thanks for the simple suggestion. It works nicely, except for one thing: Typing \restoregeometry appears to spoil the side margins on my bibliography page (made using bibtex/natbib), which are not as they should be. In contrast, the other pages (after \restoregeometry) seem okay.

    Any ideas?

    Thanks,
    Fabian

    I’m using pdf latex, miktex 2.8, and my header is as follows:

    \documentclass[a4paper, oneside, 12pt]{article}
    \usepackage[latin1]{inputenc}
    \usepackage[T1]{fontenc}
    \usepackage{pst-all}
    \usepackage[longnamesfirst, authoryear]{natbib}
    \usepackage{booktabs}
    \usepackage[left=2cm,right=2cm,top=1.5cm,bottom=2cm,includeheadfoot,a4paper]{geometry}
    \usepackage{amsmath}
    \usepackage{amssymb}
    \usepackage{graphicx}
    \usepackage{setspace}
    \usepackage{pdflscape}
    \usepackage{multirow}

  6. Thomas says:

    Thank you so much, this was very helpful.

  7. Bram Vandekerckhove says:

    Wow, some things can actually be done in a simple way in LaTeX :-). Finally got my table to fit on one page. Thanks!

  8. Derek Powell says:

    This is an elegant solution to a problem I was having.

    I scoured the internet for hours trying to figure out how to reduce the amount of whitespace that appears at the top of the default table of contents page.

    By inserting these two lines to slightly change the top and bottom margins, it changed the geometry of the TOC so I was able to make it fit on a single page.

    Thank you.

Leave a Reply




XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>