The geometry
package provides a simple way to set layout parameters. For example,
\usepackage[margin=1in]{geometry}
will give me a document with 1 inch margins on each side. In particular, it computes the LaTeX parameters like \textwidth
, \oddsidemargin
, \textheight
, and \topmargin
, among others. Is it possible to retrieve the 'friendlier' values like left
, right
, top
, and bottom
?
Of course, one can compute the values using something like \dimexpr \topmargin + \headheight + \headsep + 1in \relax
. There's also the further complication that the includehead
and includefoot
options influence the setting of the parameters.
Best Answer
The values are stored in pt in commands like
\Gm@lmargin
,\Gm@tmargin
etc. If you are interested in the unit you actually used in the options you could also patch\Gm@defbylen
which is (as far as I can see) used by most options and then set the values with\geometry
: