# Relative change of page dimensions with geometry

When using the geometry package, how do I change parameters in relative amounts?

For example, I would like to do something like:

\newgeometry{top=top+2cm, bottom=bottom+2cm}


which increases the top and bottom margins by 2cm respectively. Is there a way to do this?

-
If you add the layout package in the preamble, then the \layout macro will draw a picture of the various settings, you could then use these setting to compute the appropriate values (needs the calc package): \newgeometry{top=1.0in+\voffset+2.0cm\relax} –  Peter Grill May 8 '12 at 15:33
The length of bottom is save in the macro \Gm@bmargin so you can use bottom=\dimexpr\Gm@bmargin+2cm\relax. –  Marco Daniel May 8 '12 at 17:12
@MarcoDaniel Will probably wreck havoc to \texheight and get hundrends of underfull boxes:) –  Yiannis Lazarides May 8 '12 at 17:45
@YiannisLazarides: Really. Was untested ;-) –  Marco Daniel May 8 '12 at 17:49
@YiannisLazarides: That works: \documentclass{article} \usepackage{geometry} \geometry{showframe} \usepackage{kantlipsum} \begin{document} \kant[1] \clearpage \makeatletter \edef\tempa{\dimexpr\Gm@bmargin+2cm\relax} \makeatother \newgeometry{bottom=\tempa} \kant[1] \clearpage \restoregeometry \kant[1] \end{document} –  Marco Daniel May 8 '12 at 17:53

The simple answer is that no such facility is provided by geometry. You cannot specify the top using top=top+2cm or the bottom using bottom=bottom+2.

When you want to increase the top by 2cm, presumably without affecting the headheight or the headsep lengths, you can do this by changing the topmargin.

 \addtolength{topmargin}{2cm}


However, in general I would advice against all these, unless you really study how the page geometry is constructed. Normally LaTeX and packages start from the paperheight, subtract values for the head parameters, estimate a textheight that is an exact multiple of \baselineskip and then position the \footskip.

Recommendation use memoir or scrbook and read Chapter 2 of the memoir manual.

-