Is it possible, using the geometry package, to store (and restore) the original layout specified by the document class (in my case, the class is report)?

Here is some context. I have been editing a long document in the default page layout for the report document class. Now I found out that I need a title page. There is a particular title page layout, and in fact, it works perfectly if I just load the geometry package with its default and change just two settings. But then I want the rest of the document back in the original page layout! I can't do something like \restoregeometry, since I think geometry just overrides the class options... i.e. there doesn't seem to be anything to restore. Similarly, it seems I can't use \savegeometry or \loadgeometry. So how can I get back to my original layout for the rest of the document without painstakingly hard-coding in all of the specific page layout variables?

Here is a minimum working example:


\RequirePackage[a4paper,dvips]{geometry} % g1
\geometry{top=2.5cm,bottom=2.3cm}        % g2



\SomeGeometryCommandsHere  % g3



If I run the above code with the lines labeled "g" commented out, then the title page does not have the correct page layout, but the rest of the document is formatted perfectly.

If I leave lines g1 and g2 uncommented, then the title page has exactly the correct layout, but no matter what I put for g3 (e.g. \loadgeometry, \restoregeometry, etc.) I can't recover the original layout that I had when g1 and g2 were commented.

Of course, I could completely specify the original layout exhaustively in line g3, and this should in principle work. However, I spent almost one hour on this last night and when I still couldn't get it formated correctly I decided I really needed a smarter solution.

  • Steve, 1) any chance of providing a minimum working example, or at least identifying the two settings involved? And 2) what is your execution order: \usepackage{geometry} then LoadClass{report} or vice versa? At what stages in the execution order are you performing your \savegeometry, \restoregeometry, etc commands? MWE please. Sep 1, 2010 at 5:34
  • You need to provide more detail. See this question for how to write a minimal example.
    – TH.
    Sep 1, 2010 at 17:23
  • I have often ran into a similar problem. I have a document which already has "almost" the right layout, and I'd like to use the geometry package to slightly tweak the layout. However, the geometry package by default changes everything, and it's difficult to recover the original layout with the geometry package. Sep 2, 2010 at 16:02

1 Answer 1


With pass option, geometry package will change nothing and use the original layout. You can restore the original layout with \restoregeometry. For example,


\begin{document}%<-- the original layout for 'report' is saved here.
\restoregeometry %<-- the original layout is restored.

The \newgeometry/\restoregeometry commands have been introduced since v5.0, but use v5.6 or later, because in v5.6 a bug was fixed where \newgeometry didn't work when pass is specified in the preamble.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .