Graphics, Figures & TablesChanging page margins on one page to fit a table.

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
mcclairy
Posts: 2
Joined: Sat Jan 15, 2011 4:45 pm

Changing page margins on one page to fit a table.

Post by mcclairy »

Dear all,

I am writing a term paper which requires a left hand margin of 4cm, unfortunately this means my table no longer fits on the page. Whilst it is off the page on the right hand side there is a large white space to the left of the table. Is it possible to change the margins for just one page? i.e. the page with my table and not the other pages.

Any help would be appreciated.
Last edited by mcclairy on Sat Jan 15, 2011 6:52 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Changing page margins on one page to fit a table.

Post by frabjous »

Try the \newgeometry and \restoregeometry commands from the geometry package. See its documentation for more info.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Changing page margins on one page to fit a table.

Post by localghost »

Extend the table into the page margins by using the \makebox command. (Of course it would be better to tweak the table so that it fits the page geometry.)

Code: Select all

\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage[%
  font=small,
  labelfont=bf,
  tableposition=top
]{caption}
\usepackage{blindtext}

\begin{document}
  \blindtext

  \begin{table}[!ht]
    \caption{Wide dummy table}\label{tab:wide}
    \makebox[\textwidth]{%
      \rule{1.2\textwidth}{5cm}
    }
  \end{table}

  \blindtext
\end{document}
The blindtext package is only for creating dummy text thus not part of the solution.


Best regards and welcome to the board
Thorsten
mcclairy
Posts: 2
Joined: Sat Jan 15, 2011 4:45 pm

Re: Changing page margins on one page to fit a table.

Post by mcclairy »

Thank you very much for your help.
I used the geometry package and it worked perfectly. Code below for anyone else who has the same problem:

In the preamble:
\usepackage[width=12cm, left=4cm]{geometry}

Either side of my table:
\newgeometry{width=12cm, left=2cm}

\restoregeometry
Post Reply