Page 11 of the geometry package manual says that the reset
option
sets back the layout dimensions and switches to the settings before geometry is loaded.
On page 30 there is a slightly different description:
The [reset] option cancels all the options specified before reset, except pass.
However, the following code
\documentclass{article}
\showthe\textwidth
\usepackage[textwidth=50pt,reset]{geometry}
\showthe\textwidth
produces the output
> 345.0pt.
l.2 \showthe\textwidth
> 430.00462pt.
l.4 \showthe\textwidth
So, \textwidth
doesn't return to the value it had before geometry
was loaded. What am I doing wrong?
Best Answer
In addition to some other flags,
geometry
stores the page configuration upon package load in the macro\Gm@restore@org
. For the standardarticle
document class (your minimal example) this contains:This is overwritten at the start of the document to
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}
: