# Geometry settings for default document layout?

How can I obtain the corresponding settings for the geometry package so that the document looks just like the standard article or report?

Assume that I have a document in the default style, and I would like to modify only some of the layout options; for example, I might want to change the headheight and leave everything else the same.

Try for example the following two option settings for geometry, the first of which shows the default layout, and then how everything changes even if I just wanted to change one of the settings.

\documentclass{article}
\usepackage[showframe,pass]{geometry}
\begin{document}
Hello World
\end{document}


There is a related question (from which I learned about the pass option), but note that the following

\usepackage[showframe,pass,headheight=1.5cm]{geometry}


doesn’t work.

• I thought that this can be done with the option reset, but it seems to be nonfunctional - perhaps a bug? – Ulrike Fischer Jul 14 '11 at 14:25

You can compile your document with \usepackage[pass]{geometry}, which will write in the .log file a transcript; here's the result (with A4 paper):

*geometry* driver: auto-detecting
*geometry* detected driver: dvips
*geometry* verbose mode - [ preamble ] result:
* pass: disregarded the geometry package!
* \paperwidth=597.50787pt
* \paperheight=845.04684pt
* \textwidth=345.0pt
* \textheight=598.0pt
* \oddsidemargin=53.0pt
* \evensidemargin=54.0pt
* \topmargin=17.0pt
* \topskip=10.0pt
* \footskip=30.0pt
* \marginparwidth=57.0pt
* \marginparsep=11.0pt
* \columnsep=10.0pt
* \skip\footins=9.0pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)


Since we are in a oneside context, all that should be needed is

\geometry{a4paper,textwidth=345pt,textheight=598pt}


But you can always check against the old transcript.

• How about a4 and twoside? I tried pass and the document seemed unchanged, when loading geometryusually would. I also checked my log (for oneside also) and was surprised to find textwidth=345pt, textheight=550pt - what is going on here ? Apparently \documentclass[a4,twoside]{report} produces another page size, than \geometry{ a4paper } !? I feel like geometry-paper is too high ? Checking the log, geometry is narrower and higher compared to default: \paperwidth=597.50787pt, \paperheight=845.04684pt vs \paperwidth=614.295pt, \paperheight=794.96999pt – gr4nt3d Jan 31 at 21:01
• @gr4nt3d The option a4 doesn't exist, so you get the same as for letterpaper. You need \documentclass[a4paper,twoside]{report} – egreg Jan 31 at 21:03
• You are absolutely right, I am getting the same page size now! I must have had that error for quite a while, I guess. However, the text still wanders around a bit when using \geometry{ ... } (looks like it is higher) ? edit: \topmargin=17.0pt is default, whereas \topmargin=-10.45126pt for geometry ?? – gr4nt3d Jan 31 at 21:15
• Ok, sry for spam, but I can not edit anymore: It seems like this is easily fixed by \setlength{\topmargin}{17pt} after \geometry{ ... }. I have no idea what caused it, though. – gr4nt3d Jan 31 at 21:28
• @gr4nt3d You shouldn't do \setlength{\topmargin}{whatever} when using geometry. Why would you? – egreg Jan 31 at 21:36