In addition to some other flags, geometry
stores the page configuration upon package load in the macro \Gm@restore@org
. For the standard article
document class (your minimal example) this contains:
\csname paperwidth\endcsname =614.295pt\relax
\csname paperheight\endcsname =794.96999pt\relax
\csname textwidth\endcsname =345.0pt\relax
\csname textheight\endcsname =550.0pt\relax
\csname evensidemargin\endcsname =62.0pt\relax
\csname oddsidemargin\endcsname =62.0pt\relax
\csname topmargin\endcsname =16.0pt\relax
\csname headheight\endcsname =12.0pt\relax
\csname headsep\endcsname =25.0pt\relax
\csname topskip\endcsname =10.0pt\relax
\csname footskip\endcsname =30.0pt\relax
\csname baselineskip\endcsname =12.0pt\relax
\csname marginparwidth\endcsname =65.0pt\relax
\csname marginparsep\endcsname =11.0pt\relax
\csname columnsep\endcsname =10.0pt\relax
\csname hoffset\endcsname =0.0pt\relax
\csname voffset\endcsname =0.0pt\relax
\csname Gm@layouthoffset\endcsname =0.0pt\relax
\csname Gm@layoutvoffset\endcsname =0.0pt\relax
\@twocolumnfalse
\@twosidefalse
\@mparswitchfalse
\@reversemarginfalse
This is overwritten at the start of the document to
\csname paperwidth\endcsname =614.295pt\relax
\csname paperheight\endcsname =794.96999pt\relax
\csname textwidth\endcsname =430.00462pt\relax
\csname textheight\endcsname =556.47656pt\relax
\csname evensidemargin\endcsname =19.8752pt\relax
\csname oddsidemargin\endcsname =19.8752pt\relax
\csname topmargin\endcsname =-13.87262pt\relax
\csname headheight\endcsname =12.0pt\relax
\csname headsep\endcsname =25.0pt\relax
\csname topskip\endcsname =10.0pt\relax
\csname footskip\endcsname =30.0pt\relax
\csname baselineskip\endcsname =12.0pt\relax
\csname marginparwidth\endcsname =65.0pt\relax
\csname marginparsep\endcsname =11.0pt\relax
\csname columnsep\endcsname =10.0pt\relax
\csname hoffset\endcsname =0.0pt\relax
\csname voffset\endcsname =0.0pt\relax
\csname Gm@layouthoffset\endcsname =0.0pt\relax
\csname Gm@layoutvoffset\endcsname =0.0pt\relax
\@twocolumnfalse
\@twosidefalse
\@mparswitchfalse
\@reversemarginfalse
To restore the page and text dimensions to what it was before geometry was called, you can make an explicit call to \Gm@restore@org
before \begin{document}
:
\usepackage[...]{geometry}% http://ctan.org/pkg/geometry
\makeatletter
\Gm@restore@org
\makeatother
geometry
sets its own\textwidth
, so the reset is to the value set initially by geometry.