diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/gmeometric/gmeometric.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/gmeometric/gmeometric.sty | 71 |
1 files changed, 33 insertions, 38 deletions
diff --git a/Master/texmf-dist/tex/latex/gmeometric/gmeometric.sty b/Master/texmf-dist/tex/latex/gmeometric/gmeometric.sty index f12a8734aab..61ad56414ce 100644 --- a/Master/texmf-dist/tex/latex/gmeometric/gmeometric.sty +++ b/Master/texmf-dist/tex/latex/gmeometric/gmeometric.sty @@ -23,12 +23,13 @@ % % \CheckSum{61} % \chschange{v0.69}{2007/4/26}{40} +% \chschange{v0.70}{2007/4/29}{36} % %% \FileInfo \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{gmeometric} - [2007/04/26 v0.69 to allow the `geometry' macro in the document (GM)] + [2007/04/29 v0.70 to allow the `geometry' macro in the document (GM)] %% % @@ -105,12 +106,12 @@ % \end{gmlonely} % % -% \division{Usage} -% The only use of this package is to allow the |\geometry| command -% also inside the \env{document} (originally it's -% |\@onlypreamble|). To make |\geometry| work properly it may be -% advisable to `commit' the layout changes with (|\clearpage|, -% |\cleardoublepage| or |\newpage|) and maybe |\one/twocolumn|. +% \division{Usage} The only use of this package is to allow the +% |\geometry| command also inside the \env{document} (originally it's +% |\@onlypreamble|). To make |\geometry| work properly is quite +% a~different business. It may be advisable to `commit' the layout +% changes with |\newpage|, |\clearpage|, or |\cleardoublepage| and +% maybe |\one/twocolumn|. % % Some layout commands should be put before |\one/twocolumn| and other % after it. An example: @@ -124,57 +125,51 @@ % % \advance\footskip-1.7cm % \geometry{hmargin=1.2cm,vmargin=1cm} +% \clearpage %\end{verbatim} % % And another: %\begin{verbatim} +% \newpage % \geometry{bottom=3.6cm} %\end{verbatim} % +% In some cases it doesn't work perfectly +% anyway. Well, the license \acro{(LPPL)} warns about it. % % \division{The Code} -\RequirePackage{gmutils}[2007/04/23]% this package defines the storing -% and restoring commands. - - -\RequirePackageWithOptions{geometry} +\RequirePackage{gmutils}[2007/04/23]% this package defines the storing and +% restoring commands. -% Let's remove some macros from the list to erase at begin document: -\let\do\not@onlypreamble +% redefine |\@onlypreamble|, add storing to BeginDocument. +\newcommand*\gme@tobestored{{% + \Gm@cnth \Gm@cntv \c@Gm@tempcnt \Gm@bindingoffset \Gm@wd@mp + \Gm@odd@mp \Gm@even@mp \Gm@orgw \Gm@orgh \Gm@dimlist}} -\do\Gm@cnth -\do\Gm@cntv -\do\c@Gm@tempcnt -\do\Gm@bindingoffset -\do\Gm@wd@mp -\do\Gm@odd@mp -\do\Gm@even@mp -\do\Gm@orgw -\do\Gm@orgh -\do\Gm@dimlist +\@xa\AtBeginDocument\@xa{\@xa\StoreMacros\gme@tobestored} -% Redefine |\geometry| to give it the starred version that clears -% a~double page when used in the document. The unstarred versions will -% do just |\clearpage|. Note that |\clear(double)page| makes no harm -% when used in the preamble. \CodeDefine\geometry -\def\geometry{% - \@ifstar{\gm@geometry{double}}{\gm@geometry{}}} +\StoreMacro\@onlypreamble +\let\@onlypreamble\@gobble -% \CodeDefine\gm@geometry -\def\gm@geometry#1#2{% - \Gm@clean - \setkeys{Gm}{#2}% - \Gm@process - \csname clear#1page\endcsname}% +\RequirePackageWithOptions{geometry} +% Restore |\@onlypreamble|: +\RestoreMacro\@onlypreamble -% \changes{v0.69}{2007/04/26}{The package main action rewritten to use -% \cs{not@onlypreamble} and not \cs{(Re)StoreMacros}} +% Add restore to BeginDocument: +\@xa\AtBeginDocument\@xa{\@xa\RestoreMacros\gme@tobestored} \endinput +% +% \changes{v0.70}{2007/04/29}{Back to the v0.68 settings because +% \cs{not@onlypreamble} was far too little. Well, in this version the +% redefinition of \cs{geometry} is given up since the `committing' +% commands depend on the particular situation so defining only two +% options doesn't seem advisable} +% % \NoEOF % (For my GNU Emacs:) |