With some geometry
options, it is possible to override a previous setting in the preamble. For example:
\documentclass{article}
\usepackage{geometry}
\geometry{hmarginratio=1:1}
\geometry{showframe,hmarginratio=6:1}
\begin{document}
abc
\end{document}
With others, this method does not work. For example:
\documentclass{article}
\usepackage{geometry}
\geometry{scale=.85}
\geometry{showframe,scale=.25}
\begin{document}
abc
\end{document}
Is there a good reason for this difference and is there a workaround?
The reason I'd like to do this is so that I can have a class or package set a default value for scale
using \geometry{}
but allow the possibility of overriding this in the document preamble.
scale
option sets\textwidth
and\textheight
, so the second is ineffective because of the priority rules of section 6.3; this is however unexpected. If I look at the final values of\Gm@hscale
and\Gm@vscale
they are as stated (.85
in one case,.0.25
in the other).\newgeometry{showframe,scale=.25}
\newgeometry
until after\begin{document}
.AtBeginDocument
or various document hooks providedetoolbox
?