summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/geometry
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-03-02 00:44:35 +0000
committerKarl Berry <karl@freefriends.org>2010-03-02 00:44:35 +0000
commit65293db75e3702db6206732e71cc68adbb0075a7 (patch)
tree177ac7f2e0c39f831b7937f4bafa8fd61290e220 /Master/texmf-dist/tex/latex/geometry
parent22e1ea793c2800134b08e2148376a5dfa8722750 (diff)
geometry 5.2 (28feb10)
git-svn-id: svn://tug.org/texlive/trunk@17268 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/geometry')
-rw-r--r--Master/texmf-dist/tex/latex/geometry/geometry.sty74
1 files changed, 43 insertions, 31 deletions
diff --git a/Master/texmf-dist/tex/latex/geometry/geometry.sty b/Master/texmf-dist/tex/latex/geometry/geometry.sty
index aa2def676b0..78926d48f18 100644
--- a/Master/texmf-dist/tex/latex/geometry/geometry.sty
+++ b/Master/texmf-dist/tex/latex/geometry/geometry.sty
@@ -25,7 +25,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{geometry}
- [2010/02/15 v5.1 Page Geometry]
+ [2010/03/01 v5.2 Page Geometry]
\RequirePackage{keyval}%
\RequirePackage{ifpdf}%
\RequirePackage{ifvtex}%
@@ -78,7 +78,6 @@
\edef\Gm@orgpw{\the\paperwidth}%
\edef\Gm@orgph{\the\paperheight}%
\def\Gm@savelength#1{%
- \edef\@@tmp{\expandafter\the\csname #1\endcsname}%
\g@addto@macro\Gm@restore{\expandafter\noexpand\expandafter\csname
#1\endcsname\expandafter=\expandafter\the\csname #1\endcsname\relax}}
\def\Gm@saveboolean#1{%
@@ -555,6 +554,8 @@
\define@key{Gm}{layoutoffset}{\Gm@branch{#1}{layouthoffset}{layoutvoffset}}%
\define@key{Gm}{twocolumn}[true]{%
\Gm@doif{twocolumn}{#1}{\csname @twocolumn\Gm@bool\endcsname}}%
+\define@key{Gm}{onecolumn}[true]{%
+ \Gm@doifelse{onecolumn}{#1}{\@twocolumnfalse}{\@twocolumntrue}}%
\define@key{Gm}{reversemp}[true]{%
\Gm@doif{reversemp}{#1}{\csname @reversemargin\Gm@bool\endcsname}}%
\define@key{Gm}{reversemarginpar}[true]{%
@@ -632,7 +633,7 @@
\advance\@tempdimc-\@tempdimb
\ifdim\@tempdimc>\z@
\Gm@warning{The marginal notes overrun the paper edge.^^J
- \@spaces Add \the\@tempdimc\space and more to the left margin}%
+ \@spaces Add \the\@tempdimc\space and more to the left margin}%
\fi
\fi
\ifnum\@tempcntb=\@ne
@@ -641,7 +642,7 @@
\advance\@tempdimc-\@tempdimb
\ifdim\@tempdimc>\z@
\Gm@warning{The marginal notes overrun the paper.^^J
- \@spaces Add \the\@tempdimc\space and more to the right margin}%
+ \@spaces Add \the\@tempdimc\space and more to the right margin}%
\fi
\fi
\fi}%
@@ -821,24 +822,24 @@
\fi
\ifGm@verbose\expandafter\typeout\else\expandafter\wlog\fi
{\Gm@logcontent{#1}}}%
+\def\Gm@showdim#1{* \string#1=\the#1^^J}%
\def\Gm@showbool#1{\@nameuse{ifGm@#1}#1\space\fi}%
-\def\Gm@showdim#1{*gm \string#1=\the#1^^J}%
\def\Gm@logcontent#1{%
- *geometry* verbose: parameters #1^^J%
- \ifGm@pass *gm: pass (ignores the geometry layout)^^J%
+ *geometry* verbose mode - [ #1 ] result:^^J%
+ \ifGm@pass * pass (ignores the geometry layout)^^J%
\else
- \if\Gm@driver\relax *gm driver: <none>^^J\else *gm driver: \Gm@driver^^J\fi
- \ifx\Gm@paper\@undefined *gm paper: \the\paperwidth, \the\paperheight^^J%
- \else *gm paper: \Gm@paper^^J\fi
- \ifGm@layout *gm layout: \the\Gm@layoutwidth, \the\Gm@layoutheight^^J%
- \else *gm layout: (same as paper)^^J\fi
- \@ifundefined{Gm@lines}{}{*gm lines: \Gm@lines^^J}%
- \@ifundefined{Gm@hmarginratio}{}{*gm hratio: \Gm@hmarginratio^^J}%
- \@ifundefined{Gm@vmarginratio}{}{*gm vratio: \Gm@vmarginratio^^J}%
- \ifdim\Gm@bindingoffset=\z@\else *gm bindingoffset: \the\Gm@bindingoffset^^J\fi
- *gm L,W,R: \Gm@lmargin, \Gm@width, \Gm@rmargin^^J%
- *gm T,H,B: \Gm@tmargin, \Gm@height, \Gm@bmargin^^J%
- *gm switch-on: %
+ * driver: \if\Gm@driver\relax <none>\else\Gm@driver\fi^^J%
+ * paper: \ifx\Gm@paper\@undefined\the\paperwidth,
+ \the\paperheight\space(class default)\else\Gm@paper\fi^^J%
+ * layout: \ifGm@layout \the\Gm@layoutwidth, \the\Gm@layoutheight
+ \else\ifx\Gm@paper\@undefined\the\paperwidth,
+ \the\paperheight\else\Gm@paper\fi\fi^^J%
+ \@ifundefined{Gm@lines}{}{* lines: \Gm@lines^^J}%
+ \@ifundefined{Gm@hmarginratio}{}{* hratio: \Gm@hmarginratio^^J}%
+ \@ifundefined{Gm@vmarginratio}{}{* vratio: \Gm@vmarginratio^^J}%
+ \ifdim\Gm@bindingoffset=\z@\else
+ * bindingoffset: \the\Gm@bindingoffset^^J\fi
+ * switch(es): %
\Gm@showbool{landscape}%
\Gm@showbool{includehead}%
\Gm@showbool{includefoot}%
@@ -846,8 +847,10 @@
\if@twoside twoside\space\fi%
\if@mparswitch\else\if@twoside asymmetric\space\fi\fi%
\Gm@showbool{heightrounded}%
- \ifx\Gm@truedimen\@empty\else *gm truedimen\space\fi%
+ \ifx\Gm@truedimen\@empty\else truedimen\space\fi%
^^J%
+ * h-part:(L,W,R)=(\Gm@lmargin, \Gm@width, \Gm@rmargin)^^J%
+ * v-part:(T,H,B)=(\Gm@tmargin, \Gm@height, \Gm@bmargin)^^J%
\fi
\Gm@showdim{\paperwidth}%
\Gm@showdim{\paperheight}%
@@ -862,15 +865,15 @@
\Gm@showdim{\marginparwidth}%
\Gm@showdim{\marginparsep}%
\Gm@showdim{\columnsep}%
- *gm \string\skip\string\footins=\the\skip\footins^^J%
+ * \string\skip\string\footins=\the\skip\footins^^J%
\Gm@showdim{\hoffset}%
\Gm@showdim{\voffset}%
\Gm@showdim{\mag}%
- \if@twocolumn *gm\space\string\@twocolumntrue^^J\fi%
- \if@twoside *gm\space\string\@twosidetrue^^J\fi%
- \if@mparswitch *gm\space\string\@mparswitchtrue^^J\fi%
- \if@reversemargin *gm\space\string\@reversemargintrue^^J\fi%
- *gm (1in=72.27pt, 1cm=28.4528pt)}%
+ * \string\@twocolumn\if@twocolumn true\else false\fi^^J%
+ * \string\@twoside\if@twoside true\else false\fi^^J%
+ * \string\@mparswitch\if@mparswitch true\else false\fi^^J%
+ * \string\@reversemargin\if@reversemargin true\else false\fi^^J%
+ * (1in=72.27pt, 1cm=28.453pt)^^J}%
\def\Gm@cropmark(#1,#2,#3,#4){%
\begin{picture}(0,0)
\setlength\unitlength{1truemm}\thinlines
@@ -979,6 +982,9 @@
\ProcessOptionsKV[p]{Gm}%
\Gm@process
\AtBeginDocument{%
+ \Gm@savelength{paperwidth}%
+ \Gm@savelength{paperheight}%
+ \edef\Gm@restore@org{\Gm@restore}%
\ifGm@resetpaper
\edef\Gm@pw{\Gm@orgpw}%
\edef\Gm@ph{\Gm@orgph}%
@@ -1053,7 +1059,9 @@
\Gm@save
\edef\Gm@restore@pkg{\Gm@restore}%
\ifGm@verbose\ifGm@pass\else\Gm@checkmp\fi\fi
- \Gm@showparams{in the preamble}%
+ \Gm@showparams{preamble}%
+ \let\Gm@pw\relax
+ \let\Gm@ph\relax
}% end of \AtBeginDocument
\newcommand{\geometry}[1]{%
\Gm@clean
@@ -1061,10 +1069,13 @@
\Gm@process}%
\@onlypreamble\geometry
\DeclareRobustCommand\Gm@changelayout{%
- \setlength{\@colht}{\textheight}\setlength{\@colroom}{\textheight}%
- \setlength{\vsize}{\textheight}\setlength{\columnwidth}{\textwidth}%
+ \setlength{\@colht}{\textheight}
+ \setlength{\@colroom}{\textheight}%
+ \setlength{\vsize}{\textheight}
+ \setlength{\columnwidth}{\textwidth}%
\if@twocolumn%
- \advance\columnwidth-\columnsep \divide\columnwidth\tw@%
+ \advance\columnwidth-\columnsep
+ \divide\columnwidth\tw@%
\@firstcolumntrue%
\fi%
\setlength{\hsize}{\columnwidth}%
@@ -1077,8 +1088,9 @@
\setkeys{Gm}{#1}%
\Gm@newgmfalse
\Gm@process
+ \ifnum\mag=\@m\else\Gm@magtooffset\fi
\Gm@changelayout
- \Gm@showparams{by \string\newgeometry}}%
+ \Gm@showparams{newgeometry}}%
\newcommand\restoregeometry{%
\clearpage
\Gm@restore@pkg