summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-11-07 01:31:46 +0000
committerKarl Berry <karl@freefriends.org>2008-11-07 01:31:46 +0000
commit3ce8ae42c698d44315421ad06c07b8618271fe11 (patch)
tree809698e87325d5e699b30f5a9a3a18d6f98d3ee9 /Master/texmf-dist
parentda2287ad4b9064c7cd79a5b1f3917dfff2bc3adc (diff)
geometry 4.0 (6nov08)
git-svn-id: svn://tug.org/texlive/trunk@11210 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/geometry/README128
-rw-r--r--Master/texmf-dist/doc/latex/geometry/changes.txt (renamed from Master/texmf-dist/doc/latex/geometry/ChangeLog)103
-rw-r--r--Master/texmf-dist/doc/latex/geometry/geometry-samples.tex (renamed from Master/texmf-dist/doc/latex/geometry/sample.tex)60
-rw-r--r--Master/texmf-dist/doc/latex/geometry/geometry.cfg28
-rw-r--r--Master/texmf-dist/doc/latex/geometry/geometry.pdfbin0 -> 334789 bytes
-rw-r--r--Master/texmf-dist/doc/latex/geometry/manual.pdfbin163156 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/geometry/test/Makefile26
-rw-r--r--Master/texmf-dist/doc/latex/geometry/test/gcheck.sty49
-rw-r--r--Master/texmf-dist/doc/latex/geometry/test/gtest01.tex35
-rw-r--r--Master/texmf-dist/doc/latex/geometry/test/gtest02.tex36
-rw-r--r--Master/texmf-dist/doc/latex/geometry/test/gtest03.tex32
-rw-r--r--Master/texmf-dist/doc/latex/geometry/test/gtest04.tex31
-rw-r--r--Master/texmf-dist/doc/latex/geometry/test/gtest05.tex32
-rw-r--r--Master/texmf-dist/doc/latex/geometry/test/gtest06.tex35
-rw-r--r--Master/texmf-dist/doc/latex/geometry/test/gtest07.tex34
-rw-r--r--Master/texmf-dist/doc/latex/geometry/test/gtest08.tex32
-rw-r--r--Master/texmf-dist/doc/latex/geometry/test/gtest09.tex36
-rw-r--r--Master/texmf-dist/doc/latex/geometry/test/gtest10.tex31
-rw-r--r--Master/texmf-dist/doc/latex/geometry/test/gtest11.tex34
-rw-r--r--Master/texmf-dist/doc/latex/geometry/test/gtest12.tex33
-rw-r--r--Master/texmf-dist/doc/latex/geometry/test/gtest13.tex33
-rw-r--r--Master/texmf-dist/doc/latex/geometry/test/gtest14.tex43
-rw-r--r--Master/texmf-dist/doc/latex/geometry/test/gtest15.tex40
-rw-r--r--Master/texmf-dist/doc/latex/geometry/test/gtest16.tex37
-rw-r--r--Master/texmf-dist/source/latex/geometry/Makefile47
-rw-r--r--Master/texmf-dist/source/latex/geometry/geometry.drv42
-rw-r--r--Master/texmf-dist/source/latex/geometry/geometry.dtx717
-rw-r--r--Master/texmf-dist/source/latex/geometry/geometry.ins99
-rw-r--r--Master/texmf-dist/source/latex/geometry/manual.drv38
-rw-r--r--Master/texmf-dist/tex/latex/geometry/geometry.sty159
30 files changed, 900 insertions, 1150 deletions
diff --git a/Master/texmf-dist/doc/latex/geometry/README b/Master/texmf-dist/doc/latex/geometry/README
index a7d8941f2ef..37d2f5bd12f 100644
--- a/Master/texmf-dist/doc/latex/geometry/README
+++ b/Master/texmf-dist/doc/latex/geometry/README
@@ -1,80 +1,52 @@
- G E O M E T R Y
- Geometry Package v3.2 (2002/07/08)
- CTAN:macros/latex/contrib/supported/geometry
- Copyright (C) 1996-2002 Hideo Umeki
- Distributed under the terms of LPPL
-
---------------
- Abstract
---------------
-
-This package provides a flexible and complete user interface to page
-dimensions. You can specify them by using intuitive parameters to get
-your desired page layout. For example, if you want to set margins
-(the left, right, top and bottom margins) to 2cm from each edge of
-the paper, what you need is just \usepackage[margin=2cm]{geometry}.
-
---------------
- Files
---------------
-
-README this file
-ChangeLog history of changes and versions
-Makefile makefile for unpacking and documentation
-geometry.ins installation script
-geometry.dtx documentation and code for geometry.{sty,cfg}
-manual.pdf ready-to-print package manual (A4-paper PDF)
-sample.tex sample file
-test/gcheck.sty style file for tests
-test/gtest*.tex test files
-test/Makefile makefile for test
-
---------------
- Installation
---------------
-
-1) latex geometry.ins (or `make')
- unpacks `geometry.sty' and `geometry.cfg' from geometry.dtx.
-
-2) Edit `geometry.cfg'
- if you need to set your default options.
- Add \ExecuteOptions{a4paper} in geometry.cfg
- if you are using A4 paper by default.
-
-3) Copy geometry.sty and geometry.cfg
- into a directory searched by LaTeX.
-
-4) To clean up files, type `make clean'.
-
---------------
- Documentation
---------------
-
-The package contains the manual `manual.pdf'. So you don't have to
-make the manual, but you can remake it. To create the same manual,
-type `make manual' then you have `manual.pdf' with PDF of A4-paper
-size. To create the full documentation with the code description,
-type `make doc' then you have `geometry.dvi' with DVI of us-letter
-size. You can edit manual.drv or geometry.drv and pdflatex or latex
-it.
-
---------------
- Test
---------------
-
-Type `make test' and check the results. Or you can use `sample.tex'
-for test, but make sure to set a proper paper size in sample.tex.
-
-Before checking these results by printing with your printer,
-I would strongly recommend to `latex testpage' and print testpage.dvi
-with your printer to see if the printer margins are properly set.
-
---------------
- ChangeLog
---------------
-
-See ChangeLog.
-
-EOF
+Geometry package 2008/11/06 v4.0
+----------------------------------
+Flexible and easy interface to page dimensions
+
+Copyright (C) 1996-2002, 2008 by Hideo Umeki <latexgeometry@gmail.com>
+
+
+Abstract:
+ This package provides a flexible and easy interface to page dimensions.
+ You can set the page layout with intuitive parameters. For instance,
+ if you want to set a margin to 2cm from each edge of the paper, you can go just
+ \usepackage[margin=2cm]{geometry}.
+
+CTAN: macros/latex/contrib/geometry
+
+
+What's new in v4.0: (See changes.txt or geometry.pdf for details)
+ * More robust driver detection.
+ * New option: resetpaper.
+ * Adjustment to \topskip introduced.
+ * ANSI paper sizes added.
+ * Bug fixed: Wrong ISO paper sizes.
+ * Bug fixed: PDFTeX magnification problem.
+ * Package source organization changed.
+ * Many other improvements to the code and documentation.
+
+Files:
+ * README - this file
+ * changes.txt - history of changes
+ * geometry.dtx - including sources and documentation
+ * geometry.pdf - print-ready documentation (can be generated from geometry.dtx)
+
+ To get geometry.sty, just "tex geometry.dtx".
+ To get geometry.pdf, just "pdflatex geometry.dtx".
+ (See also geometry.dtx)
+
+License:
+ This work may be distributed and/or modified under the conditions of
+ the LaTeX Project Public License, either version 1.3c of this license
+ or (at your option) any later version. The latest version of this
+ license is in
+ http://www.latex-project.org/lppl.txt
+ and version 1.3c or later is part of all distributions of LaTeX
+ version 2005/12/01 or later.
+
+--
+Happy TeXing!
+Hideo Umeki
+
+EOF \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/geometry/ChangeLog b/Master/texmf-dist/doc/latex/geometry/changes.txt
index 5bbf5671387..5566774a53d 100644
--- a/Master/texmf-dist/doc/latex/geometry/ChangeLog
+++ b/Master/texmf-dist/doc/latex/geometry/changes.txt
@@ -1,4 +1,43 @@
-2002-07-08 Hideo UMEKI <hideo.umeki@toshiba.co.jp>
+2008-11-06 Hideo Umeki
+ * Release 4.0
+ * More robust driver detection.
+ The driver detection method has been totally rewritten so that
+ it can automatically detect the driver appropriate for the
+ typesetting program in use. Therefore explicit driver setting is no
+ longer needed in most cases, except for the driver |dvipdfm|.
+ This improvement makes geometry work more robustly for
+ the typesetting programs under e-TeX, XeTeX and VTeX
+ as well as normal TeX environment. The packages `ifpdf' and
+ `ifvtex' are used, which are available in CTAN.
+ Note that `ifvtex' package v1.3 (2007/09/09), however, has a
+ bug (a typo) that affects the detection of VTeX.
+ So you need to use the new version of `ifvtex' later than v1.3.
+ * New option: resetpaper.
+ This option disables explicit paper setting in \textsf{geometry}
+ and uses the paper size specified before \textsf{geometry}.
+ This option may be useful to print nonstandard sized documents
+ with normal printers and papers.
+ * Adjustment to \topskip introduced.
+ When large font sizes are specified, \topskip has to be adjusted
+ so that the formula:
+ textheight = (lines - 1) x \baselineskip} + \topskip
+ to be correct. To do this, \topskip is set to \ht\strutbox,
+ if \topskip is smaller than \ht\strutbox.
+ * ANSI paper sizes added.
+ New paper size definitions for ANSI A to E are added.
+ * Bug fixed: Wrong ISO paper sizes.
+ The paper sizes for A1,A2,A5 and A6 were wrong (by 1mm).
+ * Bug fixed: PDFTeX magnification problem.
+ PDF paper offset is adjusted properly when magnification is
+ set by mag option with pdfTeX.
+ * Package source organization changed.
+ Files geometry.ins and geometry-samples.tex are integrated into
+ geometry.dtx so that they can be generated from geometry.dtx by
+ the `tex' command. Documentation can be also generated directly
+ from geometry.dtx by `(pdf)latex' command.
+ * Many other improvements to the code and documentation.
+
+2002-07-08 Hideo Umeki
* Release 3.2
* Added known problem: for crop package with its 'center' option and
'mag' larger than 1000, the result is not the one expected.
@@ -9,29 +48,29 @@
(I'd like to thank Rolf Niepraschk for his pointing out the bug.)
* Added two test files: gtest15.tex gtest16.tex
-2002-07-04 Hideo UMEKI <hideo.umeki@toshiba.co.jp>
+2002-07-04 Hideo Umeki
* Release 3.1
* Bug fix: error in setting geometry dimensions with \widthof of
calc package. \Gm@defbylen and \Gm@defbycnt are introduced to set
geometry dimensions.
-2002-06-30 Hideo UMEKI <hideo.umeki@toshiba.co.jp>
+2002-06-30 Hideo Umeki
(Special thanks to Frank Mittelbach for checking codes patiently
and providing extremely helpful insight and suggestions)
* Release 3.0
* Revised geometry.dtx document.
-2002-06-28 Hideo UMEKI <hideo.umeki@toshiba.co.jp>
+2002-06-28 Hideo Umeki
* Bug fix: multiple landscape/portrait switches malfunctioned.
* Bug fix: default hmarginratio wasn't reset when twoside is reset.
The initialization of default margionratios added in \Gm@clean.
-2002-06-12 Hideo UMEKI <hideo.umeki@toshiba.co.jp>
+2002-06-12 Hideo Umeki
* Improved 'reset': can reset 'paper' given as a geometry option.
* Bug fix: class default papersize with class option 'landscape'
didn't work with \geometry command.
-2002-06-05 Hideo UMEKI <hideo.umeki@toshiba.co.jp>
+2002-06-05 Hideo Umeki
* Added a landscape correction for dvips with 'special' command.
* Added 'dvipdfm' (same as 'dvips' internally).
* Changed driver settings ('dvips', 'pdftex', and all that) to exclusive.
@@ -41,12 +80,12 @@
* Bug fix: complex margin settings with calc, e.g. (1in-50pt)*2/3,
didn't work well.
-2002-05-27 Hideo UMEKI <hideo.umeki@toshiba.co.jp>
+2002-05-27 Hideo Umeki
* Added many '\@onlypreamble' commands.
* The default vscale is changed to 0.7.
* Added 'compat2' to achieve option compatibility with the old version.
-2002-05-24 Hideo UMEKI <hideo.umeki@toshiba.co.jp>
+2002-05-24 Hideo Umeki
* 'pdfoutput=1' is removed because it is unnecessary and rather harmful
with package 'hyperref'.
* The default hscale is changed to 0.7.
@@ -55,25 +94,25 @@
* 'asymmetric' sets \@mparswitchfalse and \@twosidetrue, so that
one can use 'asymmetric' as an alternative to the 'twoside' option.
-2002-05-21 Hideo UMEKI <hideo.umeki@toshiba.co.jp>
+2002-05-21 Hideo Umeki
* Added 'nomarginpar' with \marginparwidth and \marginparsep set to 0pt.
* Added '\geom@checkmp' checking if marginal notes fall off the page.
* '\geom@process' revised with new internal macros.
* Bug fixed: odd/evensidemargin calculations totally modified.
-2002-05-20 Hideo UMEKI <hideo.umeki@toshiba.co.jp>
+2002-05-20 Hideo Umeki
* Changed the default settings (old defaults --> new defaults)
- scale={0.8,0.9} --> scale=0.8
- includeheadfoot, ignoremp --> ignoreall
- marginratio={2:3,1:2} for oneside, marginratio=2:3 for twoside
--> marginratio={1:1,2:3} for oneside, marginratio=2:3 for twoside
-2002-05-19 Hideo UMEKI <hideo.umeki@toshiba.co.jp>
+2002-05-19 Hideo Umeki
* 'asymmetric' just sets \@mparswitchfalse. 'asymmetric=false' does
nothing.
* '\geom@process' revised.
-2002-05-14 Hideo UMEKI <hideo.umeki@toshiba.co.jp>
+2002-05-14 Hideo Umeki
* 'nohead', 'nofoot' and 'noheadfoot' are just shortcut for
setting the corresponding LaTeX dimensions to zero, so they
are overwritable by subsequent options.
@@ -93,7 +132,7 @@
a geometry option, not the class original papername.
Set the proper paper name again after 'reset'.
-2002-05-13 Hideo UMEKI <hideo.umeki@toshiba.co.jp>
+2002-05-13 Hideo Umeki
* Added 'twocolumn' option
* "verbose" displays the parameter results on the terminal,
"verbose=false" (default) still puts them into the log.
@@ -103,7 +142,7 @@
\Geom@setafter command needs \expandafter's
* Bug fixed: 'pass' and multiple 'reset' didn't work well.
-2002-05-10 Hideo UMEKI <hideo.umeki@toshiba.co.jp>
+2002-05-10 Hideo Umeki
* Added 'showframe' option, which shows textarea and page frames,
and lines for head and foot to check layout in detail.
Geometry.sty now contains features of showframe.sty. So showframe.sty
@@ -113,7 +152,7 @@
* Bug fixed: execution timing of changing papersize was wrong.
This bug was introduced in v3.0 beta.
-2002-05-09 Hideo UMEKI <hideo.umeki@toshiba.co.jp>
+2002-05-09 Hideo Umeki
* Added 'heightrounded' option. If \textheight is not specified,
this option rounds it to n-times (n: an integer) of \baselineskip plus
\topskip, \textheight = n * \baselineskip + \topskip,
@@ -126,14 +165,14 @@
directly (ie. 'textheight', 'height', 'vscale').
* Bug fixed: \Geom@dset wasn't set by \edef.
-2002-04-26 Hideo UMEKI <hideo.umeki@toshiba.co.jp>
+2002-04-26 Hideo Umeki
* \geom@setafter and \Geom@dset (both internal) makes LaTeX dimension
setting as a option (headsep, footskip, hoffset, and etc)
effective at the beginning of \geom@process for 'pass' option.
* Revised internal codes specifying papersize.
* Changed the way of displaying options and parameters in 'verbose' mode.
-2002-04-25 Hideo UMEKI <hideo.umeki@toshiba.co.jp>
+2002-04-25 Hideo Umeki
* Version 3.0 beta
* Added 'screen' option as a new papersize (papersize={225mm,180mm}).
To make presentation with PC and video projector, geometry option
@@ -144,7 +183,7 @@
* Added 'innermargin' and 'outermargin', aliases for leftmargin
and rightmargin respectively.
-2002-04-22 Hideo UMEKI <hideo.umeki@toshiba.co.jp>
+2002-04-22 Hideo Umeki
* Version 3.0 Candidate alpha, alpha-2 (formly known as 2.4 alpha-1,2)
* Added `ignorehead', `ignorefoot', `ignoreheadfoot', and
`ignoreheadfootmp'(ignoreall) options to disregard
@@ -161,71 +200,71 @@
* Removed twosideshift option, use bindingoffset instead.
bindingoffset is set 0pt as default and supports twoside.
-2000-06-28 Hideo UMEKI <hideo.umeki@toshiba.co.jp>
+2000-06-28 Hideo Umeki
* Release 2.3
* Added `truedimen', `columnsep' and `footnotesep' options.
* VTeX supported.
* Modified internal settings for twosideshift and mag.
-1999-10-07 Hideo UMEKI <hideo.umeki@toshiba.co.jp>
+1999-10-07 Hideo Umeki
* Release 2.2
* Bug fixed: explicit twoside was needed for book.cls.
-1999-09-27 Hideo UMEKI <hideo.umeki@toshiba.co.jp>
+1999-09-27 Hideo Umeki
* Release 2.1
* Bug fixed: twosideshift with reversemarginpar made wrong margins.
* Added mag option.
* Paper sizes A6 and B6 supported.
* Changed license declaration to LPPL.
-1998-04-06 Hideo UMEKI <hideo.umeki@toshiba.co.jp>
+1998-04-06 Hideo Umeki
* Release 2.0
* Flexible setting scheme for package option with keyval.
* Removed exclamations and extra control sequences for paperwidth
and paperheight.
* Totally revised the code and document.
-1997-09-08 Hideo UMEKI <hideo.umeki@toshiba.co.jp>
+1997-09-08 Hideo Umeki
* Release 1.08
* Included geometry.cfg into geometry.dtx.
* Changed the catcode of exclamation mark.
-1997-07-05 Hideo UMEKI <hideo.umeki@toshiba.co.jp>
+1997-07-05 Hideo Umeki
* Release 1.07
* Modified process of 'dvips' option.
* pdftex supported.
* Added `a0paper' and `b0paper'.
-1997-04-16 Hideo UMEKI <hideo.umeki@toshiba.co.jp>
+1997-04-16 Hideo Umeki
* Release 1.06
* reversemarginpar supported.
-1997-02-17 Hideo UMEKI <hideo.umeki@toshiba.co.jp>
+1997-02-17 Hideo Umeki
* Release 1.05
* Changed the definition for dvips option.
-1996-08-05 Hideo UMEKI <hideo.umeki@toshiba.co.jp>
+1996-08-05 Hideo Umeki
* Release 1.04
* Bug fixed: papersize= had no effect when papertype was given
in geometry.cfg or as a package option.
-1996-07-17 Hideo UMEKI <hideo.umeki@toshiba.co.jp>
+1996-07-17 Hideo Umeki
* Release 1.03
* calc support
-1996-06-07 Hideo UMEKI <hideo.umeki@toshiba.co.jp>
+1996-06-07 Hideo Umeki
* Release 1.02
* Changed definition for `reset' option.
* Revised instructions for `reset' and `dvips' options.
-1996-06-03 Hideo UMEKI <hideo.umeki@toshiba.co.jp>
+1996-06-03 Hideo Umeki
* Release 1.01
* Fixed bugs in setting paper and option processing.
* geometry.cfg
* Added `dvips' option.
-1996-05-31 Hideo UMEKI <hideo.umeki@toshiba.co.jp>
+1996-05-31 Hideo Umeki
* Release 1.00
* Started geometry package distribution.
* Use keyval interface.
-EOF \ No newline at end of file
+EOF
diff --git a/Master/texmf-dist/doc/latex/geometry/sample.tex b/Master/texmf-dist/doc/latex/geometry/geometry-samples.tex
index 459535d3dc2..9b9335960a4 100644
--- a/Master/texmf-dist/doc/latex/geometry/sample.tex
+++ b/Master/texmf-dist/doc/latex/geometry/geometry-samples.tex
@@ -1,18 +1,38 @@
-%
-% Sample file for geometry v3.0 or later
-% sample.tex
-%
-%---------- Specify your paper size properly -------------------
+%%
+%% This is file `geometry-samples.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% geometry.dtx (with options: `samples')
+%%
+%% Copyright (C) 1996-2002, 2008 by Hideo Umeki <latexgeometry@gmail.com>
+%%
+%% This work may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3c of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work is "maintained" (as per the LPPL maintenance status)
+%% by Hideo Umeki.
+%%
+%% This work consists of the files geometry.dtx and
+%% the derived files: geometry.{sty,ins,drv}, geometry-samples.tex.
+%%
\documentclass{article}% uses letterpaper by default
-%\documentclass[a4paper]{article}% for A4 paper
-
-%---------- Uncomment one of them ------------------------------
-\usepackage{geometry}
+% \documentclass[a4paper]{article}% for A4 paper
+%---------------------------------------------------------------
+% Edit and uncomment one of the settings below
+%---------------------------------------------------------------
+% \usepackage{geometry}
% \usepackage[centering]{geometry}
% \usepackage[width=10cm,vscale=.7]{geometry}
-% \usepackage[margin=1cm]{geometry}
+% \usepackage[margin=1cm, papersize={12cm,19cm}, resetpaper]{geometry}
% \usepackage[margin=1cm,includeheadfoot]{geometry}
-% \usepackage[margin=1cm,includemp]{geometry}
+\usepackage[margin=1cm,includeheadfoot,includemp]{geometry}
% \usepackage[margin=1cm,bindingoffset=1cm,twoside]{geometry}
% \usepackage[hmarginratio=2:1, vmargin=2cm]{geometry}
% \usepackage[hscale=0.5,twoside]{geometry}
@@ -25,18 +45,17 @@
% \usepackage[headsep=20pt, head=40pt,foot=20pt,includeheadfoot]{geometry}
% \usepackage[text={6in,8in}, top=2cm, left=2cm]{geometry}
% \usepackage[centering,includemp,twoside,landscape]{geometry}
-% \usepackage[margin=2cm,mag=1414]{geometry}
-% \usepackage[margin=2truecm,mag=1414,truedimen]{geometry}
+% \usepackage[mag=1414,margin=2cm]{geometry}
+% \usepackage[mag=1414,margin=2truecm,truedimen]{geometry}
% \usepackage[compat2,marginpar=50pt,twosideshift=50pt]{geometry}
-
% \usepackage[a5paper, landscape, twocolumn, twoside,
-% left=2cm, hmarginratio=2:1, includemp, marginparwidth=43pt,
+% left=2cm, hmarginratio=2:1, includemp, marginparwidth=43pt,
% bottom=1cm, foot=.7cm, includefoot, textheight=11cm, heightrounded,
-% columnsep=1cm, dvips, verbose]{geometry}
+% columnsep=1cm,verbose]{geometry}
+%---------------------------------------------------------------
+% No need to change below
%---------------------------------------------------------------
-
-\geometry{verbose,showframe,dvips}% options appended.
-
+\geometry{verbose,showframe}% options appended.
\newcommand\mynote{\marginpar%
[\raggedright\rule{\marginparwidth}{.7pt}\\A left side note.]%
{\raggedright\rule{\marginparwidth}{.7pt}\\A side note.}}%
@@ -49,3 +68,6 @@
\manyfoxes\manyfoxes\manyfoxes\manyfoxes
\manyfoxes\manyfoxes\manyfoxes\manyfoxes
\end{document}
+\endinput
+%%
+%% End of file `geometry-samples.tex'.
diff --git a/Master/texmf-dist/doc/latex/geometry/geometry.cfg b/Master/texmf-dist/doc/latex/geometry/geometry.cfg
index 9bafe583219..4277d685942 100644
--- a/Master/texmf-dist/doc/latex/geometry/geometry.cfg
+++ b/Master/texmf-dist/doc/latex/geometry/geometry.cfg
@@ -6,17 +6,25 @@
%%
%% geometry.dtx (with options: `config')
%%
-%% File: geometry.dtx Copyright (C) 1996-2002 Hideo Umeki
-%% (hideo.umeki@toshiba.co.jp)
-%%
-%% This package may be distributed under the terms of the LaTeX
-%% Project Public License, as described in lppl.txt in the base
-%% LaTeX distribution, either version 1.2 or (at your option)
-%% any later version.
-%%
+%% Copyright (C) 1996-2002, 2008 by Hideo Umeki <latexgeometry@gmail.com>
+%%
+%% This work may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3c of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work is "maintained" (as per the LPPL maintenance status)
+%% by Hideo Umeki.
+%%
+%% This work consists of the files geometry.dtx and
+%% the derived files: geometry.{sty,ins,drv}, geometry-samples.tex.
+%%
-%% Uncomment and edit the line below to set default options.
-%%\ExecuteOptions{a4paper,dvips}
+% Uncomment and edit the line below to set default options.
+%\ExecuteOptions{a4paper}
\endinput
%%
diff --git a/Master/texmf-dist/doc/latex/geometry/geometry.pdf b/Master/texmf-dist/doc/latex/geometry/geometry.pdf
new file mode 100644
index 00000000000..6762f8b33cb
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/geometry/geometry.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/geometry/manual.pdf b/Master/texmf-dist/doc/latex/geometry/manual.pdf
deleted file mode 100644
index 7cbd1ee2dc9..00000000000
--- a/Master/texmf-dist/doc/latex/geometry/manual.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/geometry/test/Makefile b/Master/texmf-dist/doc/latex/geometry/test/Makefile
deleted file mode 100644
index ff46011bca7..00000000000
--- a/Master/texmf-dist/doc/latex/geometry/test/Makefile
+++ /dev/null
@@ -1,26 +0,0 @@
-RM=rm -f
-SHELL=sh
-VERSION=3.0
-JUNKS=*.aux *.toc *.idx *.drv *.dvi *.log *.lof *.ist *.ilg *.ind *.out
-
-all: test
-
-#
-# You need to put the new geometry.sty in
-# the current directory or a directory searched by LaTeX.
-#
-test:
- @echo
- @(for f in gtest*tex; do latex $$f; done)
- @echo
- @echo "--- Summary of Tests ---"
- @(grep -h Test gtest*.log)
- @echo "-------------------------"
-
-clean:
- @$(RM) $(JUNKS) *~ \#*
- @echo 'Test directory has been cleaned up except geometry.{sty,cfg}.'
-
-veryclean: clean
- @$(RM) geometry.sty geometry.cfg
- @echo Test directory has been cleaned up.
diff --git a/Master/texmf-dist/doc/latex/geometry/test/gcheck.sty b/Master/texmf-dist/doc/latex/geometry/test/gcheck.sty
deleted file mode 100644
index 787e5e5b7c5..00000000000
--- a/Master/texmf-dist/doc/latex/geometry/test/gcheck.sty
+++ /dev/null
@@ -1,49 +0,0 @@
-\usepackage{calc}
-
-\newif\ifcheckpass
-\checkpasstrue
-
-\def\checkresults{%
- \ifcheckpass
- \typeout{---^^JTest (\jobname): success.^^J---}
- \else
- \typeout{---^^JTest (\jobname): FAILED.\@spaces Check \jobname.log.^^J---}
- \fi
-}
-
-\def\dcheck#1#2{%
- \setlength\@tempdima{#2}%
- \setlength\@tempdimb{#2}%
- \addtolength\@tempdimb{-#1}%
- \@tempcnta=\z@
- \ifdim\@tempdimb > -0.01pt
- \ifdim\@tempdimb < 0.01pt
- \@tempcnta=\@ne
- \wlog{OK: #1= \the#1 (diff=\the\@tempdimb).}
- \fi
- \fi
- \ifnum\@tempcnta=\z@
- \checkpassfalse
- \immediate\typeout{NG: #1= \the#1 (expected=\the\@tempdima).}
- \fi}
-
-\def\ccheck#1#2{%
- \edef\@@tempa{#2}
- \@tempcnta=\@@tempa
- \advance\@tempcnta-#1\relax
- \ifnum\@tempcnta=\z@
- \wlog{OK: #1= \the#1 (diff=\the\@tempcnta).}
- \else
- \checkpassfalse
- \immediate\typeout{NG: #1= \the#1 (expected=\@@tempa).}
- \fi}
-
-\def\nompstring{\renewcommand\mynote\relax}
-
-\newcommand\mynote{\marginpar%
-[\raggedright\rule{\marginparwidth}{.7pt}\\A left side note.]%
-{\raggedright\rule{\marginparwidth}{.7pt}\\A side note.}}%
-\def\fox{A quick brown fox jumps over the lazy dog. }
-\def\fivefoxes{\fox\fox\fox\fox\fox}
-\def\manyfoxes{\fivefoxes\mynote\fivefoxes\par\fivefoxes\fivefoxes\par}
-% \let\mynote\relax % removes marginal notes.
diff --git a/Master/texmf-dist/doc/latex/geometry/test/gtest01.tex b/Master/texmf-dist/doc/latex/geometry/test/gtest01.tex
deleted file mode 100644
index f10bf1f0d9b..00000000000
--- a/Master/texmf-dist/doc/latex/geometry/test/gtest01.tex
+++ /dev/null
@@ -1,35 +0,0 @@
-\documentclass{article}%
-
-\usepackage{gcheck}
-
-\usepackage[a5paper, landscape, twocolumn, twoside,
- left=2cm, hmarginratio=2:1, includemp, marginparwidth=43pt,
- bottom=1cm, foot=20pt, includefoot, textheight=300pt, heightrounded,
- columnsep=1cm]{geometry}
-\geometry{showframe,dvips}
-
-\begin{document}
-
-\typeout{}
-\dcheck\paperwidth{597.50787pt}
-\dcheck\paperheight{423.94606pt}
-\dcheck\textwidth{404.14963pt}
-\dcheck\textheight{298.0pt}% because of 'heightrounded'
-\dcheck\oddsidemargin{38.63551pt}
-\dcheck\evensidemargin{10.18275pt}
-\dcheck\topmargin{-33.77667pt}
-\dcheck\headheight{12.0pt}
-\dcheck\headsep{25.0pt}
-\dcheck\footskip{20pt}
-\dcheck\marginparwidth{43.0pt}
-\dcheck\marginparsep{11.0pt}
-\dcheck\columnsep{28.45274pt}
-\dcheck\hoffset{0pt}
-\dcheck\voffset{0pt}
-\ccheck\mag{1000}
-\checkresults
-\typeout{}
-
-\manyfoxes\manyfoxes\manyfoxes\manyfoxes
-\manyfoxes\manyfoxes\manyfoxes\manyfoxes
-\end{document}
diff --git a/Master/texmf-dist/doc/latex/geometry/test/gtest02.tex b/Master/texmf-dist/doc/latex/geometry/test/gtest02.tex
deleted file mode 100644
index 9c242e8de1d..00000000000
--- a/Master/texmf-dist/doc/latex/geometry/test/gtest02.tex
+++ /dev/null
@@ -1,36 +0,0 @@
-\documentclass[12pt,landscape,twoside]{book}
-\usepackage{gcheck}
-
-\usepackage[portrait]{geometry}
-\geometry{landscape=false, includemp, margin=1cm,
- bindingoffset=1cm, heightrounded}
-\geometry{marginparwidth=3cm, includehead}
-\geometry{dvipdfm=false}
-\geometry{mag=1414, truedimen}
-\geometry{showframe}
-
-\begin{document}
-
-\typeout{}
-\dcheck\paperwidth{614.28824pt}
-\dcheck\paperheight{794.96506pt}
-\dcheck\textwidth{256.72127pt}
-\dcheck\textheight{476.0pt}
-\dcheck\oddsidemargin{5.79622pt}
-\dcheck\evensidemargin{69.70174pt}
-\dcheck\topmargin{-22.65652pt}
-\dcheck\headheight{12pt}
-\dcheck\headsep{19.8738pt}
-\dcheck\footskip{30pt}
-\dcheck\marginparwidth{85.35826pt}
-\dcheck\marginparsep{7pt}
-\dcheck\columnsep{10pt}
-\dcheck\hoffset{0pt}
-\dcheck\voffset{0pt}
-\ccheck\mag{1414}
-\checkresults
-\typeout{}
-
-\manyfoxes\manyfoxes\manyfoxes\manyfoxes
-\manyfoxes\manyfoxes\manyfoxes\manyfoxes
-\end{document}
diff --git a/Master/texmf-dist/doc/latex/geometry/test/gtest03.tex b/Master/texmf-dist/doc/latex/geometry/test/gtest03.tex
deleted file mode 100644
index 4cea6af6a79..00000000000
--- a/Master/texmf-dist/doc/latex/geometry/test/gtest03.tex
+++ /dev/null
@@ -1,32 +0,0 @@
-\documentclass{report}
-\usepackage{gcheck}
-
-\usepackage[]{geometry}
-\geometry{margin=10pt}
-\geometry{showframe,dvips}
-
-\begin{document}
-
-\typeout{}
-\dcheck\paperwidth{614.28824pt}
-\dcheck\paperheight{794.96506pt}
-\dcheck\textwidth{594.295pt}
-\dcheck\textheight{774.96999pt}
-\dcheck\oddsidemargin{-62.26999pt}
-\dcheck\evensidemargin{-62.26999pt}
-\dcheck\topmargin{-99.26999pt}
-\dcheck\headheight{12pt}
-\dcheck\headsep{25pt}
-\dcheck\footskip{30pt}
-\dcheck\marginparwidth{65pt}
-\dcheck\marginparsep{11pt}
-\dcheck\columnsep{10pt}
-\dcheck\hoffset{0pt}
-\dcheck\voffset{0pt}
-\ccheck\mag{1000}
-\checkresults
-\typeout{}
-
-\manyfoxes\manyfoxes\manyfoxes\manyfoxes
-\manyfoxes\manyfoxes\manyfoxes\manyfoxes
-\end{document}
diff --git a/Master/texmf-dist/doc/latex/geometry/test/gtest04.tex b/Master/texmf-dist/doc/latex/geometry/test/gtest04.tex
deleted file mode 100644
index 6e7b35bd864..00000000000
--- a/Master/texmf-dist/doc/latex/geometry/test/gtest04.tex
+++ /dev/null
@@ -1,31 +0,0 @@
-\documentclass{report}
-\usepackage{gcheck}
-
-\usepackage[dvips,showframe]{geometry}
-\geometry{screen,margin={50pt,30pt},foot=20pt}
-
-\begin{document}
-
-\typeout{}
-\dcheck\paperwidth{640.187pt}
-\dcheck\paperheight{512.1496pt}
-\dcheck\textwidth{540.187pt}
-\dcheck\textheight{452.1496pt}
-\dcheck\oddsidemargin{-22.26999pt}
-\dcheck\evensidemargin{-22.26999pt}
-\dcheck\topmargin{-79.26999pt}
-\dcheck\headheight{12pt}
-\dcheck\headsep{25pt}
-\dcheck\footskip{20pt}
-\dcheck\marginparwidth{65pt}
-\dcheck\marginparsep{11pt}
-\dcheck\columnsep{10pt}
-\dcheck\hoffset{0pt}
-\dcheck\voffset{0pt}
-\ccheck\mag{1000}
-\checkresults
-\typeout{}
-
-\manyfoxes\manyfoxes\manyfoxes\manyfoxes
-\manyfoxes\manyfoxes\manyfoxes\manyfoxes
-\end{document}
diff --git a/Master/texmf-dist/doc/latex/geometry/test/gtest05.tex b/Master/texmf-dist/doc/latex/geometry/test/gtest05.tex
deleted file mode 100644
index 192a6b8f760..00000000000
--- a/Master/texmf-dist/doc/latex/geometry/test/gtest05.tex
+++ /dev/null
@@ -1,32 +0,0 @@
-\documentclass[twocolumn,twoside]{report}
-\usepackage{gcheck}
-
-\usepackage[reset]{geometry}
-\geometry{width=600pt,left=2cm,right=1cm}
-\geometry{dvips,showframe, columnsep=20pt}
-
-\begin{document}
-
-\typeout{}
-\dcheck\paperwidth{614.295pt}
-\dcheck\paperheight{794.96999pt}
-\dcheck\textwidth{528.93675pt}
-\dcheck\textheight{556.47656pt}
-\dcheck\oddsidemargin{-15.36449pt}
-\dcheck\evensidemargin{-43.81725pt}
-\dcheck\topmargin{-13.87262pt}
-\dcheck\headheight{12pt}
-\dcheck\headsep{25pt}
-\dcheck\footskip{30pt}
-\dcheck\marginparwidth{48pt}
-\dcheck\marginparsep{10pt}
-\dcheck\columnsep{20pt}
-\dcheck\hoffset{0pt}
-\dcheck\voffset{0pt}
-\ccheck\mag{1000}
-\checkresults
-\typeout{}
-
-\manyfoxes\manyfoxes\manyfoxes\manyfoxes
-\manyfoxes\manyfoxes\manyfoxes\manyfoxes
-\end{document}
diff --git a/Master/texmf-dist/doc/latex/geometry/test/gtest06.tex b/Master/texmf-dist/doc/latex/geometry/test/gtest06.tex
deleted file mode 100644
index 7e928915528..00000000000
--- a/Master/texmf-dist/doc/latex/geometry/test/gtest06.tex
+++ /dev/null
@@ -1,35 +0,0 @@
-\documentclass[a4paper,twoside]{book}
-\usepackage{gcheck}
-
-\usepackage[margin=1cm,includehead]{geometry}
-\geometry{reset, a3paper, landscape}
-\geometry{a6paper, hmargin={1cm,0.5cm}, heightrounded}
-\geometry{portrait, a5paper, centering }
-% `centering' (marginratio=1:1) is ineffective `hmargin'.
-\geometry{dvips, showframe}
-
-\begin{document}
-
-\typeout{}
-\dcheck\paperwidth{423.94606pt}
-\dcheck\paperheight{597.50787pt}
-\dcheck\textwidth{381.26695pt}
-\dcheck\textheight{418.0pt}
-\dcheck\oddsidemargin{-43.81725pt}
-\dcheck\evensidemargin{-58.04362pt}
-\dcheck\topmargin{-12.71039pt}
-\dcheck\headheight{12pt}
-\dcheck\headsep{18.06749pt}
-\dcheck\footskip{25.29494pt}
-\dcheck\marginparwidth{115pt}
-\dcheck\marginparsep{7.0pt}
-\dcheck\columnsep{10pt}
-\dcheck\hoffset{0pt}
-\dcheck\voffset{0pt}
-\ccheck\mag{1000}
-\checkresults
-\typeout{}
-
-\manyfoxes\manyfoxes\manyfoxes\manyfoxes
-\manyfoxes\manyfoxes\manyfoxes\manyfoxes
-\end{document}
diff --git a/Master/texmf-dist/doc/latex/geometry/test/gtest07.tex b/Master/texmf-dist/doc/latex/geometry/test/gtest07.tex
deleted file mode 100644
index 7b9be3ad845..00000000000
--- a/Master/texmf-dist/doc/latex/geometry/test/gtest07.tex
+++ /dev/null
@@ -1,34 +0,0 @@
-\documentclass[]{article}
-\usepackage{gcheck}
-
-\usepackage[a4paper,portrait,landscape,portrait,a4paper]{geometry}
-\geometry{landscape,landscape,portrait,a4paper}
-\geometry{top=2cm,twoside,twoside=false}
-\geometry{twoside}
-\geometry{dvips,showframe}
-
-\begin{document}
-
-\typeout{}
-\dcheck\paperwidth{597.50787pt}
-\dcheck\paperheight{845.04684pt}
-\dcheck\textwidth{418.25368pt}
-\dcheck\textheight{702.7831pt}
-\dcheck\oddsidemargin{-0.56833pt}
-\dcheck\evensidemargin{35.28255pt}
-\dcheck\topmargin{-52.36449pt}
-\dcheck\headheight{12pt}
-\dcheck\headsep{25.0pt}
-\dcheck\footskip{30pt}
-\dcheck\marginparwidth{65pt}
-\dcheck\marginparsep{11pt}
-\dcheck\columnsep{10pt}
-\dcheck\hoffset{0pt}
-\dcheck\voffset{0pt}
-\ccheck\mag{1000}
-\checkresults
-\typeout{}
-
-\manyfoxes\manyfoxes\manyfoxes\manyfoxes
-\manyfoxes\manyfoxes\manyfoxes\manyfoxes
-\end{document}
diff --git a/Master/texmf-dist/doc/latex/geometry/test/gtest08.tex b/Master/texmf-dist/doc/latex/geometry/test/gtest08.tex
deleted file mode 100644
index 014f9beeaee..00000000000
--- a/Master/texmf-dist/doc/latex/geometry/test/gtest08.tex
+++ /dev/null
@@ -1,32 +0,0 @@
-\documentclass[]{article}
-\usepackage{gcheck}
-
-\usepackage[compat2,twosideshift=10pt, marginpar=50pt,
- dvips, showframe]{geometry}
-\geometry{twosideshift=8pt}
-
-\begin{document}
-
-\typeout{}
-\dcheck\paperwidth{614.295pt}
-\dcheck\paperheight{794.96999pt}
-\dcheck\textwidth{430.43787pt}
-\dcheck\textheight{648.46812pt}
-\dcheck\oddsidemargin{-2.84143pt}
-\dcheck\evensidemargin{42.15858pt}
-\dcheck\topmargin{-32.51906pt}
-\dcheck\headheight{12pt}
-\dcheck\headsep{25.0pt}
-\dcheck\footskip{30pt}
-\dcheck\marginparwidth{50pt}
-\dcheck\marginparsep{11pt}
-\dcheck\columnsep{10pt}
-\dcheck\hoffset{0pt}
-\dcheck\voffset{0pt}
-\ccheck\mag{1000}
-\checkresults
-\typeout{}
-
-\manyfoxes\manyfoxes\manyfoxes\manyfoxes
-\manyfoxes\manyfoxes\manyfoxes\manyfoxes
-\end{document}
diff --git a/Master/texmf-dist/doc/latex/geometry/test/gtest09.tex b/Master/texmf-dist/doc/latex/geometry/test/gtest09.tex
deleted file mode 100644
index c0043ad0358..00000000000
--- a/Master/texmf-dist/doc/latex/geometry/test/gtest09.tex
+++ /dev/null
@@ -1,36 +0,0 @@
-\documentclass[twoside]{article}%
-
-\setlength{\headheight}{12pt}
-\setlength{\headsep}{10pt}
-
-\usepackage{gcheck}
-\usepackage[left=1in,top=1in, width=5in, asymmetric]{geometry}
-\geometry{bindingoffset=20pt}
-\geometry{showframe,dvips}
-
-\begin{document}
-
-\typeout{}
-\dcheck\paperwidth{8.5in}
-\dcheck\paperheight{11in}
-\dcheck\textwidth{361.34999pt}
-\dcheck\textheight{614.29501pt}
-\dcheck\oddsidemargin{20pt}% because of 'bindingoffset=20pt'
-\dcheck\evensidemargin{0pt}
-\dcheck\topmargin{-10pt-12pt}
-\dcheck\headheight{12.0pt}
-\dcheck\headsep{10pt}
-\dcheck\footskip{30pt}
-\dcheck\marginparwidth{121.0pt}
-\dcheck\marginparsep{11.0pt}
-\dcheck\columnsep{10pt}
-\dcheck\hoffset{0pt}
-\dcheck\voffset{0pt}
-\ccheck\mag{1000}
-\checkresults
-\typeout{}
-
-\manyfoxes\manyfoxes\manyfoxes\manyfoxes
-\manyfoxes\manyfoxes\manyfoxes\manyfoxes
-\manyfoxes\manyfoxes\manyfoxes\manyfoxes
-\end{document}
diff --git a/Master/texmf-dist/doc/latex/geometry/test/gtest10.tex b/Master/texmf-dist/doc/latex/geometry/test/gtest10.tex
deleted file mode 100644
index 5f026a04d68..00000000000
--- a/Master/texmf-dist/doc/latex/geometry/test/gtest10.tex
+++ /dev/null
@@ -1,31 +0,0 @@
-\documentclass[]{book}%
-
-\usepackage{gcheck}
-
-\usepackage[a6paper,twoside]{geometry}
-\geometry{dvips,showframe}
-
-\begin{document}
-
-\typeout{}
-\dcheck\paperwidth{298.75394pt}
-\dcheck\paperheight{423.94606pt}
-\dcheck\textwidth{209.12683pt}
-\dcheck\textheight{296.76094pt}
-\dcheck\oddsidemargin{-36.41916pt}
-\dcheck\evensidemargin{-18.49371pt}
-\dcheck\topmargin{-51.46346pt}
-\dcheck\headheight{12.0pt}
-\dcheck\headsep{18.06749pt}
-\dcheck\footskip{25.29494pt}
-\dcheck\marginparwidth{125.0pt}
-\dcheck\marginparsep{7.0pt}
-\dcheck\columnsep{10pt}
-\dcheck\hoffset{0pt}
-\dcheck\voffset{0pt}
-\ccheck\mag{1000}
-\checkresults
-\typeout{}
-
-\manyfoxes\manyfoxes\manyfoxes
-\end{document}
diff --git a/Master/texmf-dist/doc/latex/geometry/test/gtest11.tex b/Master/texmf-dist/doc/latex/geometry/test/gtest11.tex
deleted file mode 100644
index 7137567d396..00000000000
--- a/Master/texmf-dist/doc/latex/geometry/test/gtest11.tex
+++ /dev/null
@@ -1,34 +0,0 @@
-\documentclass[]{article}%
-
-\usepackage{gcheck}
-
-\usepackage[a6paper,asymmetric, bindingoffset=18pt,
- marginparwidth=.8in, reversemp,
- hmarginratio=2:1, vmarginratio=4:5,
- left=1in, top=1in]{geometry}
-\geometry{dvips,showframe}
-
-\begin{document}
-
-\typeout{}
-\dcheck\paperwidth{298.75394pt}
-\dcheck\paperheight{423.94606pt}
-\dcheck\textwidth{172.34895pt}
-\dcheck\textheight{261.3386pt}
-\dcheck\oddsidemargin{18.0pt}
-\dcheck\evensidemargin{0pt}
-\dcheck\topmargin{-37.0pt}
-\dcheck\headheight{12.0pt}
-\dcheck\headsep{25.0pt}
-\dcheck\footskip{30pt}
-\dcheck\marginparwidth{57.81621pt}
-\dcheck\marginparsep{11.0pt}
-\dcheck\columnsep{10pt}
-\dcheck\hoffset{0pt}
-\dcheck\voffset{0pt}
-\ccheck\mag{1000}
-\checkresults
-\typeout{}
-
-\manyfoxes\manyfoxes
-\end{document}
diff --git a/Master/texmf-dist/doc/latex/geometry/test/gtest12.tex b/Master/texmf-dist/doc/latex/geometry/test/gtest12.tex
deleted file mode 100644
index 5701c37d01d..00000000000
--- a/Master/texmf-dist/doc/latex/geometry/test/gtest12.tex
+++ /dev/null
@@ -1,33 +0,0 @@
-\documentclass[]{article}%
-
-\usepackage{gcheck}
-
-\usepackage[a6paper,landscape,
- margin=1in,includeall]{geometry}
-\geometry{right=2in,ignoremp}
-\geometry{dvips,showframe}
-
-\begin{document}
-
-\typeout{}
-\dcheck\paperwidth{423.94606pt}
-\dcheck\paperheight{298.75394pt}
-\dcheck\textwidth{207.13608pt}
-\dcheck\textheight{87.21396pt}
-\dcheck\oddsidemargin{0pt}
-\dcheck\evensidemargin{0pt}
-\dcheck\topmargin{0pt}
-\dcheck\headheight{12pt}
-\dcheck\headsep{25pt}
-\dcheck\footskip{30pt}
-\dcheck\marginparwidth{65pt}
-\dcheck\marginparsep{11pt}
-\dcheck\columnsep{10pt}
-\dcheck\hoffset{0pt}
-\dcheck\voffset{0pt}
-\ccheck\mag{1000}
-\checkresults
-\typeout{}
-
-\manyfoxes
-\end{document}
diff --git a/Master/texmf-dist/doc/latex/geometry/test/gtest13.tex b/Master/texmf-dist/doc/latex/geometry/test/gtest13.tex
deleted file mode 100644
index a57d28b47da..00000000000
--- a/Master/texmf-dist/doc/latex/geometry/test/gtest13.tex
+++ /dev/null
@@ -1,33 +0,0 @@
-\documentclass[]{article}%
-
-\usepackage{gcheck}
-
-\usepackage[a5paper, papersize={14cm,20cm},
- landscape, margin=1in]{geometry}
-\geometry{portrait,landscape}
-\geometry{dvips,showframe}
-
-\begin{document}
-
-\typeout{}
-\dcheck\paperwidth{569.05511pt}
-\dcheck\paperheight{398.33858pt}
-\dcheck\textwidth{424.51514pt}
-\dcheck\textheight{253.7986pt}
-\dcheck\oddsidemargin{0pt}
-\dcheck\evensidemargin{0pt}
-\dcheck\topmargin{-37.0pt}
-\dcheck\headheight{12pt}
-\dcheck\headsep{25pt}
-\dcheck\footskip{30pt}
-\dcheck\marginparwidth{65pt}
-\dcheck\marginparsep{11pt}
-\dcheck\columnsep{10pt}
-\dcheck\hoffset{0pt}
-\dcheck\voffset{0pt}
-\ccheck\mag{1000}
-\checkresults
-\typeout{}
-
-\manyfoxes
-\end{document}
diff --git a/Master/texmf-dist/doc/latex/geometry/test/gtest14.tex b/Master/texmf-dist/doc/latex/geometry/test/gtest14.tex
deleted file mode 100644
index 93486ff959d..00000000000
--- a/Master/texmf-dist/doc/latex/geometry/test/gtest14.tex
+++ /dev/null
@@ -1,43 +0,0 @@
-\documentclass[10pt,a4paper,twoside]{article}
-
-\usepackage{gcheck}
-\usepackage{calc}
-\usepackage[showframe]{geometry}
-
-\geometry{textwidth=\widthof{\texttt{M}}*80,
- lines=40+5*2-4, centering, includeheadfoot,
- top=\heightof{\texttt{N}}*10}
-
-\setlength{\parindent}{0pt}
-\begin{document}
-{\ttfamily
-MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM%
-MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM%
-% 80 characters
-}
-
-\bigskip
-\manyfoxes\manyfoxes\manyfoxes\manyfoxes
-\manyfoxes\manyfoxes\manyfoxes\manyfoxes
-
-\typeout{}
-\dcheck\paperwidth{597.50787pt}
-\dcheck\paperheight{845.04684pt}
-\dcheck\textwidth{419.99634pt}
-\dcheck\textheight{550.0pt}
-\dcheck\oddsidemargin{16.48578pt}
-\dcheck\evensidemargin{16.48578pt}
-\dcheck\topmargin{-11.15884pt}
-\dcheck\headheight{12pt}
-\dcheck\headsep{25pt}
-\dcheck\footskip{30pt}
-\dcheck\marginparwidth{111.0pt}
-\dcheck\marginparsep{11pt}
-\dcheck\columnsep{10pt}
-\dcheck\hoffset{0pt}
-\dcheck\voffset{0pt}
-\ccheck\mag{1000}
-\checkresults
-\typeout{}
-
-\end{document}
diff --git a/Master/texmf-dist/doc/latex/geometry/test/gtest15.tex b/Master/texmf-dist/doc/latex/geometry/test/gtest15.tex
deleted file mode 100644
index 576f955ae41..00000000000
--- a/Master/texmf-dist/doc/latex/geometry/test/gtest15.tex
+++ /dev/null
@@ -1,40 +0,0 @@
-\documentclass[]{article}
-
-\usepackage{gcheck}
-\usepackage{calc}
-\usepackage{geometry}
-
-% \geometry{compat2,a4paper,mag=1200,truedimen,margin=2cm,
-% twosideshift=10pt,headsep=7pt,headheight=14.5pt}
-% The case above can be rewritten without 'compat2' as follows:
- \geometry{a4paper,mag=1200,truedimen,margin=2cm,
- twoside, left=2cm+10pt, right=2cm-10pt,
- includeheadfoot, headsep=7pt,headheight=14.5pt}
-
-\geometry{dvips,showframe}
-
-\begin{document}
-\manyfoxes\manyfoxes\manyfoxes\manyfoxes
-\manyfoxes\manyfoxes\manyfoxes\manyfoxes
-
-\typeout{}
-\dcheck\paperwidth{597.49146pt}
-\dcheck\paperheight{845.03174pt}
-\dcheck\textwidth{384.11221pt}
-\dcheck\textheight{538.8947pt}
-\dcheck\oddsidemargin{6.68088pt}
-\dcheck\evensidemargin{-13.31912pt}
-\dcheck\topmargin{-3.31912pt}
-\dcheck\headheight{14.5pt}
-\dcheck\headsep{7.0pt}
-\dcheck\footskip{30pt}
-\dcheck\marginparwidth{65.0pt}
-\dcheck\marginparsep{11pt}
-\dcheck\columnsep{10pt}
-\dcheck\hoffset{0.01344pt}
-\dcheck\voffset{0.01344pt}
-\ccheck\mag{1200}
-\checkresults
-\typeout{}
-
-\end{document}
diff --git a/Master/texmf-dist/doc/latex/geometry/test/gtest16.tex b/Master/texmf-dist/doc/latex/geometry/test/gtest16.tex
deleted file mode 100644
index a7b6bac8120..00000000000
--- a/Master/texmf-dist/doc/latex/geometry/test/gtest16.tex
+++ /dev/null
@@ -1,37 +0,0 @@
-\documentclass[a4paper]{article}
-
-\usepackage{gcheck}
-\usepackage[textwidth=15cm,textheight=20cm,
- noheadfoot,nomarginpar,
- marginratio={1:1,1:5}
-% hmarginratio=1:1, vmarginratio=1:5
-% ratio={1:1, 1:5}
- ]{geometry}
-\geometry{showframe,dvips}
-
-\begin{document}
-\nompstring
-\manyfoxes\manyfoxes\manyfoxes\manyfoxes
-\manyfoxes\manyfoxes\manyfoxes\manyfoxes
-
-\typeout{}
-\dcheck\paperwidth{597.50787pt}
-\dcheck\paperheight{845.04684pt}
-\dcheck\textwidth{426.79134pt}
-\dcheck\textheight{569.05511pt}
-\dcheck\oddsidemargin{13.08827pt}
-\dcheck\evensidemargin{13.08827pt}
-\dcheck\topmargin{-26.27138pt}
-\dcheck\headheight{0pt}
-\dcheck\headsep{0pt}
-\dcheck\footskip{0pt}
-\dcheck\marginparwidth{0pt}
-\dcheck\marginparsep{0pt}
-\dcheck\columnsep{10pt}
-\dcheck\hoffset{0pt}
-\dcheck\voffset{0pt}
-\ccheck\mag{1000}
-\checkresults
-\typeout{}
-
-\end{document}
diff --git a/Master/texmf-dist/source/latex/geometry/Makefile b/Master/texmf-dist/source/latex/geometry/Makefile
deleted file mode 100644
index 1bfb24849c1..00000000000
--- a/Master/texmf-dist/source/latex/geometry/Makefile
+++ /dev/null
@@ -1,47 +0,0 @@
-RM=rm -f
-SHELL=sh
-VERSION=3.2
-FILES=README ChangeLog Makefile geometry.dtx geometry.ins manual.pdf gtest.tex
-JUNKS=*.aux *.toc *.idx *.drv *.dvi *.log *.lof *.ist *.ilg *.ind *.out
-
-unpack:
- latex geometry.ins
- @echo '**************************************'
- @echo ' To make geomtery documentation, '
- @echo ' % make manual '
- @echo ' or '
- @echo ' % make doc (for full documentation)'
- @echo '**************************************'
-
-all: unpack doc manual
-
-geometry.drv: unpack
-manual.drv: unpack
-
-doc: geometry.drv
- latex geometry.drv
- latex geometry.drv
- latex geometry.drv
-
-manual: manual.drv
- -$(RM) manual.aux
- pdflatex manual.drv
- pdflatex manual.drv
- pdflatex manual.drv
-
-test: unpack
- -cp geometry.sty geometry.cfg test
- @echo
- @(cd test; for f in gtest*tex; do latex $$f; done)
- @echo
- @echo "--- Summary of Tests ---"
- @(cd test; grep -h Test gtest*.log)
- @echo "-------------------------"
-
-pack: clean
- -(cd ..; tar cvfz geometry-$(VERSION).tgz geometry-$(VERSION))
-
-clean:
- @$(RM) $(JUNKS) geometry.sty geometry.cfg *~ \#*
- @(cd test; $(RM) $(JUNKS) geometry.sty geometry.cfg *~ \#*)
- @echo The current and test directories have been cleaned up.
diff --git a/Master/texmf-dist/source/latex/geometry/geometry.drv b/Master/texmf-dist/source/latex/geometry/geometry.drv
index 3b10423cc8d..cfac34ff2c6 100644
--- a/Master/texmf-dist/source/latex/geometry/geometry.drv
+++ b/Master/texmf-dist/source/latex/geometry/geometry.drv
@@ -6,28 +6,30 @@
%%
%% geometry.dtx (with options: `driver')
%%
-%% File: geometry.dtx Copyright (C) 1996-2002 Hideo Umeki
-%% (hideo.umeki@toshiba.co.jp)
-%%
-%% This package may be distributed under the terms of the LaTeX
-%% Project Public License, as described in lppl.txt in the base
-%% LaTeX distribution, either version 1.2 or (at your option)
-%% any later version.
-%%
-\ProvidesFile{geometry.drv}
- [Geometry documentation driver file]
+%% Copyright (C) 1996-2002, 2008 by Hideo Umeki <latexgeometry@gmail.com>
+%%
+%% This work may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3c of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work is "maintained" (as per the LPPL maintenance status)
+%% by Hideo Umeki.
+%%
+%% This work consists of the files geometry.dtx and
+%% the derived files: geometry.{sty,ins,drv}, geometry-samples.tex.
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{geometry.drv}%
+ [2008/11/06 v4.0 Page Geometry]%
\documentclass{ltxdoc}
-\usepackage{times}
-\def\ttdefault{cmtt}
-\usepackage[ hmargin={4cm,1.5cm},top=1.5cm, marginpar=3.5cm
- ]{geometry}
-%\OnlyDescription
+\usepackage[colorlinks, linkcolor=blue]{hyperref}
+\usepackage[a4paper, hmargin={3.8cm,1.5cm},vmargin={1.5cm,1cm},
+ includeheadfoot, marginpar=3.5cm]{geometry}
\begin{document}
- \GetFileInfo{geometry.sty}
- \title{The \textsf{geometry} package}
- \author{Hideo UMEKI\\\texttt{hideo.umeki@toshiba.co.jp}}
- \date{\filedate~~\fileversion{}}
- \maketitle
\DocInput{geometry.dtx}
\end{document}
\endinput
diff --git a/Master/texmf-dist/source/latex/geometry/geometry.dtx b/Master/texmf-dist/source/latex/geometry/geometry.dtx
index ad991a72efc..2e4f75ce69d 100644
--- a/Master/texmf-dist/source/latex/geometry/geometry.dtx
+++ b/Master/texmf-dist/source/latex/geometry/geometry.dtx
@@ -1,42 +1,153 @@
% \iffalse meta-comment
-%% File: geometry.dtx Copyright (C) 1996-2002 Hideo Umeki
-%% (hideo.umeki@toshiba.co.jp)
-%%
-%% This package may be distributed under the terms of the LaTeX
-%% Project Public License, as described in lppl.txt in the base
-%% LaTeX distribution, either version 1.2 or (at your option)
-%% any later version.
-%%
-%
-%<package>\NeedsTeXFormat{LaTeX2e}%
-%<package>\ProvidesPackage{geometry}[2002/07/08 v3.2 Page Geometry]
-%<driver>\ProvidesFile{geometry.drv}
-%<manual>\ProvidesFile{manual.drv}
-%<driver> [Geometry documentation driver file]
-%<manual> [Geometry manual driver file (A4 PDF)]
-%<*driver|manual>
+%
+% Copyright 1996-2002, 2008 by Hideo Umeki <latexgeometry@gmail.com>
+%
+% LaTeX Package: Geometry
+% -----------------------
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3c of this license
+% or (at your option) any later version. The latest version of this
+% license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work is "maintained" (as per the LPPL maintenance status)
+% by Hideo Umeki.
+%
+% This work consists of the files geometry.dtx and
+% the derived files: geometry.{sty,ins,drv}, geometry-samples.tex.
+%
+% Distribution:
+% CTAN: macros/latex/contrib/geometry/geometry.dtx
+% CTAN: macros/latex/contrib/geometry/geometry.pdf
+%
+% Unpacking: to get geometry.{ins,drv} and geometry-test.tex
+% (a) Directly
+% tex geometry.dtx
+% (b) If geometry.ins is present, you can go
+% tex geometry.ins
+% (c) If you insist on using LaTeX,
+% latex \let\install=y\input{geometry.dtx}
+% (quote the arguments according to the demands of your shell)
+%
+% Documentation: to get geometry.dvi or pdf
+% (a) Directly
+% (pdf)latex geometry.dtx
+% (b) If geometry.drv is present, you can go
+% (pdf)latex geometry.drv
+%
+% Installation:
+% TDS:tex/latex/geometry/geometry.sty
+% TDS:doc/latex/geometry/geometry.pdf
+% TDS:source/latex/geometry/geometry.dtx
+%
+%<*ignore>
+\begingroup
+ \def\x{LaTeX2e}
+\expandafter\endgroup
+\ifcase 0\ifx\install y1\fi\expandafter
+ \ifx\csname processbatchFile\endcsname\relax\else1\fi
+ \ifx\fmtname\x\else 1\fi\relax
+\else\csname fi\endcsname
+%</ignore>
+%<*install>
+\input docstrip.tex
+\Msg{************************************************************************}
+\Msg{* Installation}
+\Msg{* Package: geometry 2008/11/06 v4.0 Page Geometry}
+\Msg{************************************************************************}
+
+\keepsilent
+\askforoverwritefalse
+
+\preamble
+
+Copyright (C) 1996-2002, 2008 by Hideo Umeki <latexgeometry@gmail.com>
+
+This work may be distributed and/or modified under the conditions of
+the LaTeX Project Public License, either version 1.3c of this license
+or (at your option) any later version. The latest version of this
+license is in
+ http://www.latex-project.org/lppl.txt
+and version 1.3c or later is part of all distributions of LaTeX
+version 2005/12/01 or later.
+
+This work is "maintained" (as per the LPPL maintenance status)
+by Hideo Umeki.
+
+This work consists of the files geometry.dtx and
+the derived files: geometry.{sty,ins,drv}, geometry-samples.tex.
+
+\endpreamble
+
+\generate{%
+ \file{geometry.ins}{\from{geometry.dtx}{install}}%
+ \file{geometry.drv}{\from{geometry.dtx}{driver}}%
+ \usedir{tex/latex/geometry}%
+ \file{geometry.sty}{\from{geometry.dtx}{package}}%
+ \file{geometry.cfg}{\from{geometry.dtx}{config}}%
+ \file{geometry-samples.tex}{\from{geometry.dtx}{samples}}%
+}
+
+\obeyspaces
+\Msg{************************************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* file into a directory searched by LaTeX:}
+\Msg{*}
+\Msg{* \space\space geometry.sty}
+\Msg{*}
+\Msg{* To produce the documentation run the file `geometry.drv'}
+\Msg{* through (PDF)LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*}
+\Msg{************************************************************************}
+
+\endbatchfile
+%</install>
+%<*ignore>
+\fi
+%</ignore>
+%<*driver>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{geometry.drv}%
+ [2008/11/06 v4.0 Page Geometry]%
\documentclass{ltxdoc}
-\usepackage{times}
-\def\ttdefault{cmtt}
-%<manual>\usepackage[colorlinks, linkcolor=blue,
-%<manual> pdftitle={Geometry Manual}, pdfauthor={Hideo Umeki}]{hyperref}
-\usepackage[ hmargin={4cm,1.5cm},top=1.5cm, marginpar=3.5cm
-%<manual> ,a4paper,pdftex, hmargin=3cm, top=2cm
- ]{geometry}
-%<manual>\OnlyDescription
-%<driver>%\OnlyDescription
+\usepackage[colorlinks, linkcolor=blue]{hyperref}
+\usepackage[a4paper, hmargin={3.8cm,1.5cm},vmargin={1.5cm,1cm},
+ includeheadfoot, marginpar=3.5cm]{geometry}
\begin{document}
- \GetFileInfo{geometry.sty}
- \title{The \textsf{geometry} package}
- \author{Hideo UMEKI\\\texttt{hideo.umeki@toshiba.co.jp}}
- \date{\filedate~~\fileversion{}}
- \maketitle
\DocInput{geometry.dtx}
\end{document}
-%</driver|manual>
+%</driver>
% \fi
%
-% \CheckSum{2369}
+% \CheckSum{2563}
+%
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+% \GetFileInfo{geometry.drv}
+%
+% \title{The \textsf{geometry} package}
+% \date{\filedate\ \fileversion}
+% \author{Hideo Umeki\\\texttt{latexgeometry@gmail.com}}
%
% \def\OpenB{{\ttfamily\char`\{}}
% \def\Comma{{\ttfamily\char`,}}
@@ -61,14 +172,15 @@
% \raggedright}
% {\end{list}}
%
+% \maketitle
+%
% \MakeShortVerb{|}
%
% \begin{abstract}
-% This package provides a flexible and complete user interface to page
-% dimensions. You can specify them by using intuitive parameters to get
-% your desired page layout. For example, if you want to set margins
-% (the left, right, top and bottom margins) to 2cm from each edge of
-% the paper, what you need is just |\usepackage[margin=2cm]{geometry}|.
+% This package provides a flexible and easy interface to page dimensions.
+% You can set the page layout with intuitive parameters. For instance,
+% if you want to set a margin to 2cm from each edge of the paper,
+% you can go just |\usepackage[margin=2cm]{geometry}|.
% \end{abstract}
%
% \newif\ifmulticols
@@ -82,7 +194,52 @@
% \tableofcontents
% }
%
-% \section{Preface to Version 3}
+% \section{Preface to version 4}
+%
+% Many improvements to the code and documentation were made according to
+% suggestions and comments from users.
+% Main changes are listed below.
+% \begin{itemize}
+% \item \textbf{More robust driver detection.}\par
+% The driver detection method has been totally rewritten so that
+% it can automatically detect the driver appropriate for the
+% typesetting program in use. Therefore, explicit driver setting is no longer
+% needed in most cases, except for the driver |dvipdfm|.
+% This improvement makes \textsf{geometry} work more robustly
+% for typesetting programs under e\TeX, Xe\TeX{} and
+% V\TeX{} as well as normal \TeX{} environment. The packages
+% \textsf{ifpdf} and \textsf{ifvtex} are used, which are available in
+% CTAN. See Section~\ref{sec:drivers} for details.
+% Note that \textsf{ifvtex} package v1.3 (2007/09/09), however, has a
+% bug (a typo) that affects the detection of VTeX.
+% So you need to use the new version of \textsf{ifvtex} later than v1.3.
+% \item \textbf{New option: |resetpaper|.}\par
+% This option disables explicit paper setting in \textsf{geometry} and
+% uses the paper size specified before \textsf{geometry}. This option
+% may be useful to print nonstandard sized documents with normal
+% printers and papers.
+% \item \textbf{Adjustment to |topskip| introduced.}\par
+% When large font sizes are specified, \cs{topskip} has to be
+% adjusted so that the formula
+% ``$\cs{textheight} = (lines - 1) \times \cs{baselineskip} + \cs{topskip}$''
+% to be correct. To do this, \cs{topskip} is set to
+% \cs{ht}\cs{strutbox}, if \cs{topskip} is smaller than
+% \cs{ht}\cs{strutbox}.
+% \item \textbf{ANSI paper sizes added.}\par
+% New paper size definitions for ANSI A to E are added.
+% \item \textbf{Bug fixed: Wrong ISO paper sizes.}\par
+% The paper sizes for A1,A2,A5 and A6 were wrong (by 1mm).
+% \item \textbf{Bug fixed: pdf\TeX{} magnification problem.}\par
+% PDF paper offset is adjusted properly when magnification is set by |mag|
+% option with pdf\TeX{}.
+% \item \textbf{Package source organization changed.}\par
+% Files |geometry.ins| and |geometry-samples.tex| are integrated into
+% |geometry.dtx| so that they can be generated from |geometry.dtx| by
+% the `tex' command. Documentation can be also generated directly from
+% |geometry.dtx| by `(pdf)latex' command.
+% \end{itemize}
+%
+% \section{Preface to version 3}
%
% The \textsf{geometry} package becomes even more flexible and powerful with
% the release of version 3. This new release contains major changes and
@@ -221,8 +378,8 @@
% The name `geometry' comes from the |-geometry| option used for specifying
% a size and location of a window in X Window System.
%
-% \section{Page Geometry}
-% \subsection{Layout Dimensions}
+% \section{Page geometry}
+% \subsection{Layout dimensions}
% To realize a straightforward setting for page layout, the following page
% structure is introduced: A paper contains a total body (printable area)
% and margins. The total body consists of a body (text area) with optional
@@ -470,7 +627,7 @@
% \label{fig:modes}
% \end{figure}
%
-% \subsection{Auto-Completion Scheme}\label{sec:completion}
+% \subsection{Auto-completion scheme}\label{sec:completion}
%
% Suppose that the paper size is pre-defined in Equation~(\ref{eq:paperwidth})
% or (\ref{eq:paperheight}), if two dimensions out of the three dimensions
@@ -601,8 +758,8 @@
% \label{tab:completion}
% \end{table}
%
-% \section{User Interface}
-% \subsection{General Features}
+% \section{User interface}
+% \subsection{General features}
%
% The geometry options using the \textsf{keyval} interface
% `\meta{key}=\meta{value}' can be set either in the optional argument to
@@ -652,7 +809,7 @@
% |\usepackage[textheight=20\baselineskip+10pt]{geometry}|
% \end{quote}
%
-% \subsection{Option Types}
+% \subsection{Option types}
% \textsf{Geometry} options are categorized into four types:
%
% \begin{enumerate}\itemsep=0pt
@@ -708,11 +865,11 @@
% |divide={1in,*,1in}|.
% \end{enumerate}
%
-% \section{Option Specification}
+% \section{Option specification}
%
% This section describes all the options provided by \textsf{geometry}.
%
-% \subsection{Paper Size}
+% \subsection{Paper size}
%
% The options below set paper/media size and orientation.
% \begin{Options}
@@ -723,12 +880,13 @@
% \item[\vtop{
% \hbox{a0paper, a1paper, a2paper, a3paper, a4paper, a5paper, a6paper}
% \hbox{b0paper, b1paper, b2paper, b3paper, b4paper, b5paper, b6paper}
+% \hbox{ansiapaper, ansibpaper, ansicpaper, ansidpaper, ansiepaper}
% \hbox{letterpaper, executivepaper, legalpaper}}]~\\[1ex]
% specifies paper name. They can typically be used with no values.
% Note that whatever value (even |false|) is given to this option, the
% value will be ignored. For example, the followings have the same effect:
% |a5paper|, |a5paper=true|, |a5paper=false| and |a5paper=XXXX|.
-% \item[\New{3}screen] a special paper size with (W,H) = (225mm,180mm).
+% \item[screen] a special paper size with (W,H) = (225mm,180mm).
% For presentation with PC and video projector, ``|screen,centering|''
% with `slide' documentclass would be useful.
% \item[paperwidth] width of the paper. |paperwidth=|\meta{length}.
@@ -747,7 +905,7 @@
% This is also the case for |twoside| and |twocolumn|
% (see also Section~\ref{sec:dimension}).
%
-% \subsection{Body Size}\label{sec:body}
+% \subsection{Body size}\label{sec:body}
%
% The options specifying the size of \gpart{total body} are described in this
% section.
@@ -784,39 +942,39 @@
% |textheight=|\meta{length}.
% \item[text\OR body] sets both \cs{textwidth} and \cs{textheight} of the body
% of page. |body=|\argii{width}{height} or |text=|\meta{length}.
-% \item[\New{3}lines] enables users to specify \cs{textheight} by the number
+% \item[lines] enables users to specify \cs{textheight} by the number
% of lines. |lines|=\meta{integer}.
-% \item[\New{3}includehead] includes the head of the page, \cs{headheight}
+% \item[includehead] includes the head of the page, \cs{headheight}
% and \cs{headsep}, into \gpart{total body}. It is set to |false| by
% default. It is opposite to |ignorehead|. See Figure~\ref{fig:includes}.
-% \item[\New{3}includefoot] includes the foot of the page, \cs{footskip},
-% into \gpart{body}. It is opposite to |ignorefoot|.
+% \item[includefoot] includes the foot of the page, \cs{footskip},
+% into \gpart{total body}. It is opposite to |ignorefoot|.
% It is |false| by default. See Figure~\ref{fig:includes}.
-% \item[\New{3}includeheadfoot]~\\
+% \item[includeheadfoot]~\\
% sets both |includehead| and |includefoot| to |true|, which is opposite
% to |ignoreheadfoot|. See Figure~\ref{fig:includes}.
-% \item[\Mod{3}includemp] includes the margin notes, \cs{marginparwidth}
+% \item[includemp] includes the margin notes, \cs{marginparwidth}
% and \cs{marginparsep}, into \gpart{body} when calculating horizontal
% calculation. In version 3, |includemp| is independent of options
% |marginparwidth| and |marginparsep|, and set to |false| by default.
-% \item[\New{3}includeall] sets both |includeheadfoot| and |includemp| to
+% \item[includeall] sets both |includeheadfoot| and |includemp| to
% |true|. See Figure~\ref{fig:includes} and Figure~\ref{fig:modes}.
-% \item[\New{3}ignorehead] disregards the head of the page,
+% \item[ignorehead] disregards the head of the page,
% |headheight| and |headsep|, in determining vertical layout, but does not
% change those lengths. It is equivalent to |includehead=false|. It is set
% to |true| by default. See also |includehead|.
-% \item[\New{3}ignorefoot] disregards the foot of page, |footskip|,
+% \item[ignorefoot] disregards the foot of page, |footskip|,
% in determining vertical layout, but does not change that length.
% This option is set to |true| by default. See also |includefoot|.
-% \item[\New{3}ignoreheadfoot]~\\ sets both |ignorehead| and |ignorefoot|
+% \item[ignoreheadfoot]~\\ sets both |ignorehead| and |ignorefoot|
% to |true|. See also |includeheadfoot|.
-% \item[\New{3}ignoremp] disregards the marginal notes in determining the
+% \item[ignoremp] disregards the marginal notes in determining the
% horizontal margins (|true| is set by default). If marginal notes fall off
% the page, the warning message will be displayed when |verbose=true|.
% See also Figure~\ref{fig:modes} and |includemp|.
-% \item[\New{3}ignoreall] sets both |ignoreheadfoot| and |ignoremp| to |true|.
+% \item[ignoreall] sets both |ignoreheadfoot| and |ignoremp| to |true|.
% See also |includeall|.
-% \item[\New{3}heightrounded]~\\
+% \item[heightrounded]~\\
% This option rounds \cs{textheight} to \textit{n}-times (\textit{n}:
% an integer) of \cs{baselineskip} plus \cs{topskip} to avoid
% ``underfull vbox'' in some cases. For example, if \cs{textheight} is
@@ -846,7 +1004,7 @@
% |hdivide=|\vargiii{$A$}{$B$}{$C$} and |vdivide=|\vargiii{$A$}{$B$}{$C$}.
% \end{Options}
%
-% \subsection{Margin Size}\label{sec:margin}
+% \subsection{Margin size}\label{sec:margin}
%
% The options specifying the size of visible margins are listed below.
% \begin{Options}
@@ -869,36 +1027,36 @@
% \item[margin] |margin=|\vargii{$A$}{$B$} is equivalent to
% |hmargin=|\vargii{$A$}{$B$} and |vmargin=|\vargii{$A$}{$B$}.
% |margin=|$A$ is automatically expanded to |hmargin=|$A$ and |vmargin=|$A$.
-% \item[\New{3}hmarginratio]
+% \item[hmarginratio]
% horizontal margin ratio of |left| (inner) to |right| (outer).
% The value of \meta{ratio} should be specified with colon-separated
% two values. Each value should be a positive integer less than 100
% to prevent arithmetic overflow, e.g., |2:3| instead of |1:1.5|.
% The default ratio is |1:1| for oneside, |2:3| for twoside.
-% \item[\New{3}vmarginratio]
+% \item[vmarginratio]
% vertical margin ratio of |top| to |bottom|. The default ratio is |2:3|.
-% \item[\New{3}marginratio\OR ratio]~\\
+% \item[marginratio\OR ratio]~\\
% horizontal and vertical margin ratios.
% |marginratio=|\argii{horizontal ratio}{vertical ratio} or
% |marginratio=|\meta{ratio}.
-% \item[\New{3}hcentering] sets auto-centering horizontally and is
+% \item[hcentering] sets auto-centering horizontally and is
% equivalent to |hmarginratio=1:1|. It is set to |true| by default for
% oneside. See also |hmarginratio|.
-% \item[\New{3}vcentering] sets auto-centering vertically and is
+% \item[vcentering] sets auto-centering vertically and is
% equivalent to |vmarginratio=1:1|. The default is |false|.
% See also |vmarginratio|.
-% \item[\New{3}centering] sets auto-centering and is equivalent to
+% \item[centering] sets auto-centering and is equivalent to
% |marginratio=1:1|. See also |marginratio|. The default is |false|.
% See also |marginratio|.
% \item[twoside] switches on twoside mode with left and right margins swapped
% on verso pages. The option sets \cs{@twoside} and \cs{@mparswitch}
% switches. See also |asymmetric|.
-% \item[\New{3}asymmetric] implements a twosided layout in which margins are
+% \item[asymmetric] implements a twosided layout in which margins are
% not swapped on alternate pages (by setting \cs{oddsidemargin} to
% \cs{evensidemargin} |+| |bindingoffset|) and in which the marginal notes
% stay always on the same side. This option can be used as an alternative
% to the twoside option. See also |twoside|.
-% \item[\New{3}bindingoffset]~\\ removes a specified space
+% \item[bindingoffset]~\\ removes a specified space
% from the lefthand-side of the page for oneside or the inner-side for
% twoside. |bindingoffset=|\meta{length}. This is useful if pages
% are bound by a press binding (glued, stitched, stapled \ldots).
@@ -949,7 +1107,7 @@
% \label{fig:bindingoffset}
% \end{figure}
%
-% \subsection{Native Dimensions}\label{sec:dimension}
+% \subsection{Native dimensions}\label{sec:dimension}
%
% The options below specify \LaTeX\ native dimensions and switches for page
% layout. See Figure~\ref{fig:layout}. Note that unlike version 2.3,
@@ -966,22 +1124,22 @@
% \item[footskip\OR foot]~\\ modifies \cs{footskip}, distance separation
% between baseline of last line of text and baseline of footer.
% |footskip=|\meta{length} or |foot=|\meta{length}.
-% \item[\Mod{3}nohead] eliminates spaces for the head of the page, which is
+% \item[nohead] eliminates spaces for the head of the page, which is
% equivalent to both \cs{headheight}|=0pt| and \cs{headsep}|=0pt|.
-% \item[\Mod{3}nofoot] eliminates spaces for the foot of the page, which is
+% \item[nofoot] eliminates spaces for the foot of the page, which is
% equivalent to \cs{footskip}|=0pt|.
-% \item[\Mod{3}noheadfoot] equivalent to |nohead| and |nofoot|.
+% \item[noheadfoot] equivalent to |nohead| and |nofoot|, which means that
+% \cs{headheight}, \cs{headsep} and \cs{footskip} are all set to |0pt|.
% \item[footnotesep] changes the dimension \cs{skip}\cs{footins}, separation
% between the bottom of text body and the top of footnote text.
-% \cs{headheight}|=0pt|, \cs{headsep}|=0pt| and \cs{footskip}|=0pt|.
-% \item[\Mod{3}marginparwidth\OR marginpar]~\\
+% \item[marginparwidth\OR marginpar]~\\
% modifies \cs{marginparwidth}, width of the marginal notes.
% |marginparwidth=|\meta{length}.
% Unlike version 2.3, it does \textit{not} set |includemp=true|.
-% \item[\Mod{3}marginparsep] modifies \cs{marginparsep}, separation between
+% \item[marginparsep] modifies \cs{marginparsep}, separation between
% body and marginal notes. |marginparsep=|\meta{length}.
% Unlike version 2.3, it does \textit{not} set |includemp=true|.
-% \item[\New{3}nomarginpar] shrinks spaces for marginal notes to 0pt, which
+% \item[nomarginpar] shrinks spaces for marginal notes to 0pt, which
% is equivalent to \cs{marginparwidth}|=0pt| and \cs{marginparsep}|=0pt|.
% \item[columnsep] modifies \cs{columnsep}, the separation between two
% columns in |twocolumn| mode.
@@ -995,56 +1153,48 @@
% See Section~\ref{sec:margin}.
% \item[textwidth] sets \cs{textwidth} directly. See Section~\ref{sec:body}.
% \item[textheight] sets \cs{textheight} directly. See Section~\ref{sec:body}.
-% \item[\New{3}reversemp\OR reversemarginpar]~\\
+% \item[reversemp\OR reversemarginpar]~\\
% makes the marginal notes appear in the left (inner) margin with
% \cs{@reversemargintrue}. Unlike version 2.3 or earlier,
% it does \textit{not} change |includemp| mode. This is |false| by default.
% \end{Options}
%
-% \subsection{Drivers}\label{sec:drivers}
+% \subsection{drivers}\label{sec:drivers}
%
-% Package \textsf{geometry} supports \textsl{dvips}, \textsl{dvipdfm},
-% \textsl{pdflatex} and \textsl{V\TeX} environment. These driver options are
-% exclusive.
-%
+% Package \textsf{geometry} supports |dvips|, |dvipdfm| including its
+% derivatives \textsf{dvipdfmx} and \textsf{xdvipdfmx}, |pdftex|
+% for \textsf{pdflatex}, and |vtex| for V\TeX{} environment.
+% These driver options are exclusive. The driver can be set by either
+% |driver=|\meta{driver name} or any of the drivers directly like |pdftex|.
+% A driver auto-detection mechanism is introduced in version 4.
+% Therefore, you don't have to set a driver in most cases, except for
+% |dvipdfm|.
+% Explicit setting |driver=auto| is also available. When it is set, the
+% previous driver setting is ignored and the auto-detection will work.
+% \begin{Options}
+% \item[driver] sets driver. |driver=|\meta{driver name}.
+% |dvips|, |dvipdfm|, |pdftex|, |vtex| and |auto| are available as a
+% driver name.
+% \end{Options}
+% The options below can be set directly instead of |driver=|\meta{value}.
% \begin{Options}
-% \item[\Mod{3}dvips] writes the paper size in dvi output with the \cs{special}
+% \item[dvips] writes the paper size in dvi output with the \cs{special}
% macro. If you use \textsl{dvips} as a DVI-to-PS driver,
% for example, to print a document with |\geometry{a3paper,landscape}|
% on A3 paper in landscape orientation, you don't need options
% ``|-t a3 -t landscape|'' to \textsl{dvips}.
-% In version 3, this option sets an addtional correction for landscape
-% documents so that PostScript outputs shouldn't be displayed upside down
-% by PostScript viewers, e.g., Ghostscript.
-% If you use \textsl{V\TeX} environment or \textsl{pdflatex} command,
-% this option is automatically deselected and changed to the corresponding
-% driver option. This option works with xdvi and \textsl{dviout}
-% (though you may get some warnings).
-% \item[\New{3}dvipdfm] works like |dvips| except landscape correction.
-% \item[pdftex] sets \cs{pdfpagewidth} and \cs{pdfpageheight} properly
-% if \textsl{pdflatex} command is used for typeset.
-% When \textsl{pdflatex} command is used, |pdftex| is automatically
-% selected. On the other hand when one is not using \textsl{pdflatex}
-% command this option is ineffective.
+% \item[dvipdfm] works like |dvips| except landscape correction.
+% \item[pdftex] sets \cs{pdfpagewidth} and \cs{pdfpageheight} internally.
% \item[vtex] sets dimensions \cs{mediawidth} and \cs{mediaheight}
-% for \textsl{V\TeX}.
-% This option is automatically selected when one is using \textsl{V\TeX}
-% environment. On the other hand when one is not using \textsl{V\TeX}
-% this option is ineffective.
+% for V\TeX. When this driver is selected (explicitly or
+% automatically), \textsf{geometry} will auto-detect which output mode
+% (DVI, PDF or PS) is selected in V\TeX, and do proper
+% settings for it.
% \end{Options}
+% If explicit driver setting is mismatched with the typesetting program
+% in use, the default driver |dvips| would be selected.
%
-% Drivers options can be automatically changed depending on the typeset
-% environment.
-% \begin{center}
-% \begin{tabular}{ll@{\quad$\rightarrow$\quad}ll}
-% environment & given driver option & resulted option \\\hline
-% \textsl{latex} & |pdftex|~/~|vtex| & \textit{none} \\
-% \textsl{pdflatex} & \textit{any} & |pdftex| \\
-% \textsl{V\TeX} & \textit{any} & |vtex|. \\\hline
-% \end{tabular}
-% \end{center}
-%
-% \subsection{Other Options}
+% \subsection{Other options}
%
% The other useful options are described here.
% \begin{Options}
@@ -1069,9 +1219,9 @@
% with 1000 as a normal size. For example, |mag=1414| with |a4paper|
% provides an enlarged print fitting in |a3paper|, which is $1.414$
% (=$\sqrt{2}$) times larger than |a4paper|. Font enlargement needs extra
-% disk space. \textbf{Note that you should not specify |mag| more than
-% once.} Multiple |mag| specification causes an error.
-% See also |truedimen| option.
+% disk space. \textbf{Note that setting |mag| should precede any other
+% settings with `true' dimensions, such as |1.5truein|, |2truecm|
+% and so on.} See also |truedimen| option.
% \item[truedimen] changes all internal explicit dimension values into
% \textit{true} dimensions, e.g., |1in| is changed to |1truein|.
% Typically this option will be used together with |mag| option. Note that
@@ -1079,13 +1229,13 @@
% when you set ``\texttt{mag=1440, margin=10pt, truedimen}'', margins are
% not `true' but magnified. If you want to set exact margins, you should
% set like ``\texttt{mag=1440, margin=10truept, truedimen}'' instead.
-% \item[\New{3}pass] disables all of the geometry options and calculations
+% \item[pass] disables all of the geometry options and calculations
% except |verbose| and |showframe|. It can be used for checking
% out the page layout of the documentclass, other packages and manual
% settings without \textsf{geometry}.
-% \item[\New{3}showframe] shows visible frames for the text area and page,
+% \item[showframe] shows visible frames for the text area and page,
% and the lines for the head and foot on the first page.
-% \item[\New{3}compat2] sets all kind of options so that
+% \item[compat2] sets all kind of options so that
% |\usepackage[compat2]{geometry}| would behave as if one is using
% the old version (v2.3) with the old default layout:
% \texttt{[scale=\{0.8,0.9\}, centering, includeheadfoot]},
@@ -1093,9 +1243,9 @@
% Note this option should be set as a first option.
% \end{Options}
%
-% \section{Default Settings}
+% \section{Default settings}
%
-% \subsection{Default Layout}\label{sec:default}
+% \subsection{Default layout}\label{sec:default}
%
% Let us recapitulate the default layout here.
% The \textsf{geometry} package has the following default page layout
@@ -1130,7 +1280,7 @@
% \end{quote}
% would behave as if one is using the old version (v2.3).
%
-% \subsection{Configuration File}
+% \subsection{Configuration file}
%
% One can set up a configuration file to make default options. To do this,
% produce a file |geometry.cfg| containing an \cs{ExecuteOptions} macro,
@@ -1143,10 +1293,10 @@
% The options specified in the |geometry.cfg| can be cleared by
% option |reset|.
%
-% \section{Relations Between Options}
+% \section{Relations between options}
% This section shows how complexity is solved when options are over-specified.
%
-% \subsection{Order Dependence}\label{sec:order-depend}
+% \subsection{Order dependence}\label{sec:order-depend}
%
% The \textsf{geometry} options are basically order-independent, but there
% are some exceptions. For multiple specification of the same option,
@@ -1176,6 +1326,10 @@
% |\usepackage[left=2cm]{geometry}|
% \end{quote}
%
+% The |mag| option should be set in advance of any other settings with
+% `true' length, such as |left=1.5truecm|, |width=5truein| and so on.
+% The |\mag| primitive can be set before this package is called.
+%
% \subsection{Priority}
%
% There are several ways to set dimensions of the printable area:
@@ -1272,9 +1426,10 @@
% \begin{itemize}
% \item |scale=0.9, centering|
% \item |text={.9\paperwidth,.9\paperheight}, ratio=1:1|
-% \item |width=.9\paperwidth, vmargin=.1\paperheight, marginratio=1:1|
-% \item |hdivide={*,0.9\paperwidth,*}, vdivide={*,0.9\paperheight,*}|
-% \item |margin={.1\paperwidth,.1\paperheight}, marginratio=1:1|
+% \item |width=.9\paperwidth, vmargin=.05\paperheight, marginratio=1:1|
+% \item |hdivide={*,0.9\paperwidth,*}, vdivide={*,0.9\paperheight,*}|
+% (as for onesided documents)
+% \item |margin={0.05\paperwidth,0.05\paperheight}|
% \end{itemize}
% You can add |heightrounded| to avoid an ``underfull vbox warning'' like
% \begin{quote}\small
@@ -1286,7 +1441,7 @@
% width of \gpart{total body}. The following examples are the same.
% \begin{itemize}
% \item |marginparwidth=3cm, includemp|
-% \item |marginpar=3cm, igoremp=false|
+% \item |marginpar=3cm, ignoremp=false|
% \end{itemize}
%
% \item A layout the full scale \gpart{body} of the paper with A5 paper in
@@ -1343,29 +1498,49 @@
% Try typesetting it and checking out the result yourself. |:-)|
% \end{itemize}
%
-% \section{Known Problems}
+% \section{Known problems}
% \begin{itemize}
% \item With |pdftex=true|, |mag| $\neq 1000$ and |truedimen|,
% |paperwidth| and |paperheight| shown in verbose mode are different
% from the real size of the resulted PDF. The PDF itself is correct anyway.
+%
% \item With |pdftex=true|, |mag| $\neq 1000$, \textit{no} |truedimen|,
% and \textsf{hyperref}, \textsf{hyperref} should be loaded
% by \cs{usepackage} before \textsf{geometry}.
% Otherwise the resulted PDF size will become wrong.
+%
% \item With \textsf{crop} package and |mag| $\neq 1000$,
% |center| option of \textsf{crop} doesn't work well.
% \end{itemize}
%
% \section{Acknowledgments}
-% I would like to thank the following people for their
-% pointing out bugs and suggesting, and for many helpful comments:~
-% Friedrich Flender, Piet van Oostrum, Keith
-% Reckdahl, Peter Riocreux, James Kilfiger, Jean-Marc Lasgouttes
-% Frank Bennett, Vladimir Volovich, Wlodzimierz Macewicz,
-% Jean-Bernard Addor, Michael Vulis (MicroPress), and
-% Rolf Niepraschk.
+% The author appreciates helpful suggestions and comments from
+% Jean-Bernard Addor,
+% Frank Bennett,
+% Alexis Dimitriadis,
+% Friedrich Flender,
+% Stephan Hennig,
+% Morten H$\phi$gholm,
+% Jonathan Kew,
+% James Kilfiger,
+% Jean-Marc Lasgouttes,
+% Wlodzimierz Macewicz,
+% Rolf Niepraschk,
+% Hans Fr. Nordhaug,
+% Keith Reckdahl,
+% Peter Riocreux,
+% Will Robertson,
+% Nico Schl\"{o}emer
+% Perry C. Stearns,
+% Frank Stengel,
+% Plamen Tanovski,
+% Petr Uher,
+% Piet van Oostrum,
+% Vladimir Volovich,
+% and
+% Michael Vulis.
%
-% I am deeply grateful to Frank Mittelbach for checking the codes patiently
+% The author is deeply grateful to Frank Mittelbach for checking the codes patiently
% and providing extremely helpful insight and suggestions for version 3.
%
% \StopEventually{%
@@ -1374,14 +1549,19 @@
% \fi
% }
%
-% \section{The Code}
+% \section{Implementation}
% \begin{macrocode}
%<*package>
% \end{macrocode}
-% This package requires package \textsf{keyval} included in
-% \LaTeX\ graphics bundle.
+% This package requires three other packages:
+% \begin{itemize}
+% \item\textsf{keyval} in \LaTeX\ graphics bundle,
+% \item\textsf{ifpdf} and \item\textsf{ifvtex} in `oberdiek' bundle,
+% \end{itemize}
% \begin{macrocode}
\RequirePackage{keyval}%
+\RequirePackage{ifpdf}%
+\RequirePackage{ifvtex}%
% \end{macrocode}
%
% Internal switches are declared here.
@@ -1396,9 +1576,9 @@
\newif\ifGm@heightrounded
\newif\ifGm@showframe
\newif\ifGm@compatii
-\newif\ifGm@special
\newif\ifGm@sworient\Gm@sworientfalse
\newif\ifGm@pass\Gm@passfalse
+\newif\ifGm@resetpaper
% \end{macrocode}
% \begin{macro}{\Gm@cnth}
% \begin{macro}{\Gm@cntv}
@@ -1502,6 +1682,15 @@
% \end{macrocode}
% \end{macro}\end{macro}
%
+% \begin{macro}{\Gm@orgpw}
+% \begin{macro}{\Gm@orgph}
+% These macros keep original paper (media) size intact.
+% \begin{macrocode}
+\edef\Gm@orgpw{\the\paperwidth}%
+\edef\Gm@orgph{\the\paperheight}%
+% \end{macrocode}
+% \end{macro}\end{macro}
+%
% \begin{macro}{\Gm@dorg}
% The macro saves \LaTeX{} native dimensions and switches before
% processing \textsf{geometry} options, and is called when |reset|
@@ -1545,7 +1734,7 @@
\Gm@hbodyfalse\Gm@vbodyfalse
\Gm@includeheadfalse\Gm@includefootfalse\Gm@includempfalse
\Gm@landscapefalse\Gm@compatiifalse\Gm@heightroundedfalse
- \Gm@verbosefalse\Gm@showframefalse\Gm@specialfalse
+ \Gm@verbosefalse\Gm@showframefalse\Gm@resetpaperfalse
\let\Gm@paper\@undefined
\let\Gm@width\@undefined\let\Gm@height\@undefined
\let\Gm@textwidth\@undefined\let\Gm@textheight\@undefined
@@ -1953,12 +2142,12 @@
% Various paper size are defined here.
% \begin{macrocode}
\@namedef{Gm@a0paper}{\Gm@setpaper(841,1189){mm}}%
-\@namedef{Gm@a1paper}{\Gm@setpaper(595,841){mm}}%
-\@namedef{Gm@a2paper}{\Gm@setpaper(420,595){mm}}%
+\@namedef{Gm@a1paper}{\Gm@setpaper(594,841){mm}}%
+\@namedef{Gm@a2paper}{\Gm@setpaper(420,594){mm}}%
\@namedef{Gm@a3paper}{\Gm@setpaper(297,420){mm}}%
\@namedef{Gm@a4paper}{\Gm@setpaper(210,297){mm}}%
-\@namedef{Gm@a5paper}{\Gm@setpaper(149,210){mm}}%
-\@namedef{Gm@a6paper}{\Gm@setpaper(105,149){mm}}%
+\@namedef{Gm@a5paper}{\Gm@setpaper(148,210){mm}}%
+\@namedef{Gm@a6paper}{\Gm@setpaper(105,148){mm}}%
\@namedef{Gm@b0paper}{\Gm@setpaper(1000,1414){mm}}%
\@namedef{Gm@b1paper}{\Gm@setpaper(707,1000){mm}}%
\@namedef{Gm@b2paper}{\Gm@setpaper(500,707){mm}}%
@@ -1966,6 +2155,11 @@
\@namedef{Gm@b4paper}{\Gm@setpaper(250,353){mm}}%
\@namedef{Gm@b5paper}{\Gm@setpaper(176,250){mm}}%
\@namedef{Gm@b6paper}{\Gm@setpaper(125,176){mm}}%
+\@namedef{Gm@ansiapaper}{\Gm@setpaper(8.5,11){in}}%
+\@namedef{Gm@ansibpaper}{\Gm@setpaper(11,17){in}}%
+\@namedef{Gm@ansicpaper}{\Gm@setpaper(17,22){in}}%
+\@namedef{Gm@ansidpaper}{\Gm@setpaper(22,34){in}}%
+\@namedef{Gm@ansiepaper}{\Gm@setpaper(34,44){in}}%
\@namedef{Gm@letterpaper}{\Gm@setpaper(8.5,11){in}}%
\@namedef{Gm@legalpaper}{\Gm@setpaper(8.5,14){in}}%
\@namedef{Gm@executivepaper}{\Gm@setpaper(7.25,10.5){in}}%
@@ -1983,12 +2177,14 @@
% \end{key}
% \begin{key}{Gm}{a[0-6]paper}
% \begin{key}{Gm}{b[0-6]paper}
+% \begin{key}{Gm}{ansi[a-e]paper}
% \begin{key}{Gm}{letterpaper}
% \begin{key}{Gm}{legalpaper}
% \begin{key}{Gm}{executivepaper}
% \begin{key}{Gm}{screen}
-% The following paper names are available. |screen| is introduced
-% in version 3, which should not be specified in the class option list.
+% The following paper names are available. |screen| and ANSI paper sizes
+% have been introduced in ver.3, but of course they can't be used as
+% a documentclass option.
% \begin{macrocode}
\define@key{Gm}{a0paper}[true]{\def\Gm@paper{a0paper}\Gm@chpaper}%
\define@key{Gm}{a1paper}[true]{\def\Gm@paper{a1paper}\Gm@chpaper}%
@@ -2004,6 +2200,11 @@
\define@key{Gm}{b4paper}[true]{\def\Gm@paper{b4paper}\Gm@chpaper}%
\define@key{Gm}{b5paper}[true]{\def\Gm@paper{b5paper}\Gm@chpaper}%
\define@key{Gm}{b6paper}[true]{\def\Gm@paper{b6paper}\Gm@chpaper}%
+\define@key{Gm}{ansiapaper}[true]{\def\Gm@paper{ansiapaper}\Gm@chpaper}%
+\define@key{Gm}{ansibpaper}[true]{\def\Gm@paper{ansibpaper}\Gm@chpaper}%
+\define@key{Gm}{ansicpaper}[true]{\def\Gm@paper{ansicpaper}\Gm@chpaper}%
+\define@key{Gm}{ansidpaper}[true]{\def\Gm@paper{ansidpaper}\Gm@chpaper}%
+\define@key{Gm}{ansiepaper}[true]{\def\Gm@paper{ansiepaper}\Gm@chpaper}%
\define@key{Gm}{letterpaper}[true]{\def\Gm@paper{letterpaper}\Gm@chpaper}%
\define@key{Gm}{legalpaper}[true]{\def\Gm@paper{legalpaper}\Gm@chpaper}%
\define@key{Gm}{executivepaper}[true]{\def\Gm@paper{executivepaper}%
@@ -2011,7 +2212,7 @@
\define@key{Gm}{screen}[true]{\def\Gm@paper{screen}\Gm@chpaper}%
% \end{macrocode}
% \end{key}\end{key}\end{key}\end{key}\end{key}
-% \end{key}
+% \end{key}\end{key}
% \begin{key}{Gm}{paperwidth}
% \begin{key}{Gm}{paperheight}
% \begin{key}{Gm}{papersize}
@@ -2331,8 +2532,10 @@
% \end{key}\end{key}
% \begin{key}{Gm}{dviver}
% \begin{macrocode}
-\define@key{Gm}{driver}{\edef\@@tempa{#1}%
- \ifx\@@tempa\@empty\let\Gm@driver\@empty\else\setkeys{Gm}{#1}\fi}%
+\define@key{Gm}{driver}{\edef\@@tempa{#1}\edef\@@auto{auto}%
+ \ifx\@@tempa\@empty\let\Gm@driver\@empty\else
+ \ifx\@@tempa\@@auto\let\Gm@driver\@empty\else
+ \setkeys{Gm}{#1}\fi\fi}%
% \end{macrocode}
% \end{key}
% \begin{key}{Gm}{dvips}
@@ -2367,6 +2570,14 @@
{\Gm@init\Gm@dorg\ProcessOptionsKV[c]{Gm}\Gm@setdefaultpaper}{}}%
% \end{macrocode}
% \end{key}
+% \begin{key}{Gm}{resetpaper}
+% If |resetpaper| is set to |true|, the paper size redefined in the package
+% is discarded and the original one is restored. This option may be useful
+% to print nonstandard sized documents with normal printers and papers.
+% \begin{macrocode}
+\define@key{Gm}{resetpaper}[true]{\Gm@setbool{resetpaper}{#1}}%
+% \end{macrocode}
+% \end{key}
% \begin{key}{Gm}{mag}
% |mag| is expanded immediately when it is specified. So |reset| can't
% reset |mag| when it is set with |truedimen|.
@@ -2487,28 +2698,52 @@
%
% \begin{macro}{\Gm@checkdrivers}
% The macro checks the typeset environment and changes the driver option
-% if necessary.
+% if necessary. To make the engine detection more robust, the macro is
+% rewritten in version 4 with packages \textsf{ifpdf} and \textsf{ifvtex}.
% \begin{macrocode}
\def\Gm@checkdrivers{%
- \ifx\pdfpagewidth\@undefined\else
- \ifnum\pdfoutput=\@ne
+% \end{macrocode}
+% If the driver option is not specified explicitly, then driver
+% auto-detection works.
+% \begin{macrocode}
+ \ifx\Gm@driver\@empty
+ \typeout{*geometry auto-detecting driver*}%
+% \end{macrocode}
+% \cs{ifpdf} is defined in \textsf{ifpdf} package in `oberdiek' bundle.
+% \begin{macrocode}
+ \ifpdf
\Gm@setdriver{pdftex}%
+ \else
+ \Gm@setdriver{dvips}%
\fi
- \fi
- \ifx\VTeXversion\@undefined\else
- \ifnum\OpMode=\@ne
+% \end{macrocode}
+% Xe\TeX{} supports the same page size parameter as pdf\TeX.
+% \begin{macrocode}
+ \@ifundefined{XeTeXrevision}{}{\Gm@setdriver{pdftex}}%
+% \end{macrocode}
+% \cs{ifvtex} is defined in \textsf{ifvtex} package in `oberdiek'
+% bundle. Make sure to use |ifvtex.sty| newer than v1.3 because v1.3
+% (2007/09/09) has a bug that affects the detection of V\TeX.
+% \begin{macrocode}
+ \ifvtex
\Gm@setdriver{vtex}%
- \else
- \ifnum\OpMode=\tw@
- \Gm@setdriver{vtex}%
- \fi
\fi
- \fi
- \ifx\Gm@driver\Gm@dvips
- \Gm@specialtrue
+% \end{macrocode}
+% When the driver option is set by the user, check if it is valid or not.
+% \begin{macrocode}
\else
- \ifx\Gm@driver\Gm@dvipdfm
- \Gm@specialtrue
+ \ifx\Gm@driver\Gm@pdftex
+ \ifpdf\else
+ \@ifundefined{XeTeXrevision}{\Gm@warning{%
+ Wrong driver setting: `pdftex'; using default driver}%
+ \Gm@setdriver{dvips}}{}%
+ \fi
+ \fi
+ \ifx\Gm@driver\Gm@vtex
+ \ifvtex\else
+ \Gm@warning{Wrong driver setting: `vtex'; using default driver}%
+ \Gm@setdriver{dvips}%
+ \fi
\fi
\fi}%
\@onlypreamble\Gm@checkdrivers
@@ -2556,9 +2791,9 @@
% If |pass| is set, the original dimensions and switches are restored
% and process is ended here.
% \begin{macrocode}
- \ifGm@pass
- \Gm@dorg
- \else
+ \ifGm@pass
+ \Gm@dorg
+ \else
% \end{macrocode}
% The stored native dimension settings are processed here.
% \begin{macrocode}
@@ -2625,6 +2860,18 @@
\fi
\fi
% \end{macrocode}
+% \cs{topskip} has to be adjusted so that the formula
+% ``$\cs{textheight} = (lines - 1) \times \cs{baselineskip} + \cs{topskip}$''
+% to be correct even if large font sizes are specified by users.
+% If \cs{topskip} is smaller than \cs{ht}\cs{strutbox}, then \cs{topskip}
+% is set to \cs{ht}\cs{strutbox}.
+% \begin{macrocode}
+ \ifdim\topskip<\ht\strutbox
+ \setlength\@tempdima{\topskip}%
+ \setlength\topskip{\ht\strutbox}%
+ \Gm@warning{\noexpand\topskip was changed from \the\@tempdima\space to \the\topskip}%
+ \fi
+% \end{macrocode}
% If the vertical dimension of \gpart{body} is specified by user,
% \cs{Gm@height} is set properly here.
% \begin{macrocode}
@@ -2893,8 +3140,13 @@
% Paper size is temporally adjusted according to \cs{mag} for
% printing devices.
% \begin{macrocode}
- \edef\Gm@orgw{\the\paperwidth}%
- \edef\Gm@orgh{\the\paperheight}%
+ \ifGm@resetpaper
+ \edef\Gm@pw{\Gm@orgpw}%
+ \edef\Gm@ph{\Gm@orgph}%
+ \else
+ \edef\Gm@pw{\the\paperwidth}%
+ \edef\Gm@ph{\the\paperheight}%
+ \fi
% \end{macrocode}
% If |pass| is set to |true|, no adjustment for page dimensions is done.
% \begin{macrocode}
@@ -2911,30 +3163,35 @@
% Checking the driver options.
% \begin{macrocode}
\Gm@checkdrivers
+ \typeout{*geometry detected driver: \Gm@driver*}%
% \end{macrocode}
% If |pdftex| is set to |true|, pdf-commands are set properly.
+% To avoid |pdftex| magnification problem, \cs{pdfhorigin} and
+% \cs{pdfvorigin} are adjusted for \cs{mag}.
% \begin{macrocode}
\ifx\Gm@driver\Gm@pdftex
- \ifx\pdfpagewidth\@undefined
- \Gm@warning{`pdftex' option is invalid in this environment}%
- \else
- \setlength\pdfpagewidth{\Gm@orgw}%
- \setlength\pdfpageheight{\Gm@orgh}%
- \ifnum\mag=\@m\else\ifx\Gm@truedimen\Gm@true
- \setlength\paperwidth{\Gm@orgw}%
- \setlength\paperheight{\Gm@orgh}%
- \fi\fi
+ \setlength\pdfpagewidth{\Gm@pw}%
+ \setlength\pdfpageheight{\Gm@ph}%
+ \ifnum\mag=\@m\else
+ \@tempdima=\mag sp%
+ \divide\pdfhorigin\@tempdima
+ \multiply\pdfhorigin\@m
+ \divide\pdfvorigin\@tempdima
+ \multiply\pdfvorigin\@m
+ \ifx\Gm@truedimen\Gm@true
+ \setlength\paperwidth{\Gm@pw}%
+ \setlength\paperheight{\Gm@ph}%
+ \fi
\fi
\fi
% \end{macrocode}
-% With \textsl{V\TeX} environment, \textsl{V\TeX} variables are set here.
+% With V\TeX{} environment, V\TeX{} variables are set here.
% \begin{macrocode}
\ifx\Gm@driver\Gm@vtex
- \ifx\VTeXversion\@undefined
- \Gm@warning{`vtex' option is invalid in this environment}%
- \else
- \mediawidth=\paperwidth
- \mediaheight=\paperheight
+ \mediawidth=\paperwidth
+ \mediaheight=\paperheight
+ \ifvtexdvi
+ \AtBeginDvi{\special{papersize=\the\paperwidth,\the\paperheight}}%
\fi
\fi
% \end{macrocode}
@@ -2943,12 +3200,24 @@
% because a landscape document converted by dvips is upside-down in
% PostScript viewers.
% \begin{macrocode}
- \ifGm@special
+ \ifx\Gm@driver\Gm@dvips
\AtBeginDvi{\special{papersize=\the\paperwidth,\the\paperheight}}%
\ifx\Gm@driver\Gm@dvips\ifGm@landscape
\AtBeginDvi{\special{! /landplus90 true store}}%
\fi\fi
- \fi
+% \end{macrocode}
+% When |dvipdfm| option is set and \textsf{atbegshi} package in
+% `oberdiek' bundle is loaded, \cs{AtBeginShipoutFirst} is used
+% instead of \cs{AtBeginDvi} for compatibility with \textsf{hyperref}
+% and |dvipdfm| program.
+% \begin{macrocode}
+ \else\ifx\Gm@driver\Gm@dvipdfm
+ \ifx\AtBeginShipoutFirst\relax
+ \AtBeginDvi{\special{papersize=\the\paperwidth,\the\paperheight}}%
+ \else
+ \AtBeginShipoutFirst{\special{papersize=\the\paperwidth,\the\paperheight}}%
+ \fi
+ \fi\fi
% \end{macrocode}
% If |showframe=true|, page frames and lines are showed
% on the first page.
@@ -2995,8 +3264,10 @@
\let\Gm@wd@mp\relax
\let\Gm@odd@mp\relax
\let\Gm@even@mp\relax
- \let\Gm@orgw\relax
- \let\Gm@orgh\relax
+ \let\Gm@orgpw\relax
+ \let\Gm@orgph\relax
+ \let\Gm@pw\relax
+ \let\Gm@ph\relax
\let\Gm@dimlist\relax}%
% \end{macrocode}
%
@@ -3013,17 +3284,75 @@
% \end{macrocode}
% \end{macro}
%
+% \section{Config file}
% In the configuration file |geometry.cfg|, one can use
% \cs{ExecuteOptions} to set the site or user default settings.
% \begin{macrocode}
%<*config>
+%<<SAVE_INTACT
-%% Uncomment and edit the line below to set default options.
-%%\ExecuteOptions{a4paper,dvips}
+% Uncomment and edit the line below to set default options.
+%\ExecuteOptions{a4paper}
+%SAVE_INTACT
%</config>
% \end{macrocode}
%
+% \section{Sample file}
+% Here is an executable sample tex file.
+% \begin{macrocode}
+%<*samples>
+%<<SAVE_INTACT
+\documentclass{article}% uses letterpaper by default
+% \documentclass[a4paper]{article}% for A4 paper
+%---------------------------------------------------------------
+% Edit and uncomment one of the settings below
+%---------------------------------------------------------------
+% \usepackage{geometry}
+% \usepackage[centering]{geometry}
+% \usepackage[width=10cm,vscale=.7]{geometry}
+% \usepackage[margin=1cm, papersize={12cm,19cm}, resetpaper]{geometry}
+% \usepackage[margin=1cm,includeheadfoot]{geometry}
+\usepackage[margin=1cm,includeheadfoot,includemp]{geometry}
+% \usepackage[margin=1cm,bindingoffset=1cm,twoside]{geometry}
+% \usepackage[hmarginratio=2:1, vmargin=2cm]{geometry}
+% \usepackage[hscale=0.5,twoside]{geometry}
+% \usepackage[hscale=0.5,asymmetric]{geometry}
+% \usepackage[hscale=0.5,heightrounded]{geometry}
+% \usepackage[left=1cm,right=4cm,top=2cm,includefoot]{geometry}
+% \usepackage[lines=20,left=2cm,right=6cm,top=2cm,twoside]{geometry}
+% \usepackage[width=15cm, marginparwidth=3cm, includemp]{geometry}
+% \usepackage[hdivide={1cm,,2cm}, vdivide={3cm,8in,}, nohead]{geometry}
+% \usepackage[headsep=20pt, head=40pt,foot=20pt,includeheadfoot]{geometry}
+% \usepackage[text={6in,8in}, top=2cm, left=2cm]{geometry}
+% \usepackage[centering,includemp,twoside,landscape]{geometry}
+% \usepackage[mag=1414,margin=2cm]{geometry}
+% \usepackage[mag=1414,margin=2truecm,truedimen]{geometry}
+% \usepackage[compat2,marginpar=50pt,twosideshift=50pt]{geometry}
+% \usepackage[a5paper, landscape, twocolumn, twoside,
+% left=2cm, hmarginratio=2:1, includemp, marginparwidth=43pt,
+% bottom=1cm, foot=.7cm, includefoot, textheight=11cm, heightrounded,
+% columnsep=1cm,verbose]{geometry}
+%---------------------------------------------------------------
+% No need to change below
+%---------------------------------------------------------------
+\geometry{verbose,showframe}% options appended.
+\newcommand\mynote{\marginpar%
+[\raggedright\rule{\marginparwidth}{.7pt}\\A left side note.]%
+{\raggedright\rule{\marginparwidth}{.7pt}\\A side note.}}%
+\def\fox{A quick brown fox jumps over the lazy dog. }
+\def\fivefoxes{\fox\fox\fox\fox\fox}
+\def\manyfoxes{\fivefoxes\mynote\fivefoxes\par\fivefoxes\fivefoxes\par}
+% \let\mynote\relax % removes marginal notes.
+\begin{document}
+\manyfoxes\manyfoxes\manyfoxes\manyfoxes
+\manyfoxes\manyfoxes\manyfoxes\manyfoxes
+\manyfoxes\manyfoxes\manyfoxes\manyfoxes
+\end{document}
+%SAVE_INTACT
+%</samples>
+% \end{macrocode}
+%
% \Finale
%
-\endinput
+\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/source/latex/geometry/geometry.ins b/Master/texmf-dist/source/latex/geometry/geometry.ins
index a252c89b4c0..62383ad956c 100644
--- a/Master/texmf-dist/source/latex/geometry/geometry.ins
+++ b/Master/texmf-dist/source/latex/geometry/geometry.ins
@@ -1,38 +1,81 @@
-\def\batchfile{geometry.ins}
-\input docstrip
-
-\ifx\generate\undefined
- \Msg{**********************************************}
- \Msg{* This installation requires docstrip}
- \Msg{* version 2.4 or later.}
- \Msg{* An older version of docstrip has been input}
- \Msg{**********************************************}
- \errhelp{Move or rename old docstrip.tex and get a newer one.}
- \errmessage{Old docstrip in input path}
- \batchmode
- \csname @@end\endcsname\end
-\fi
+%%
+%% This is file `geometry.ins',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% geometry.dtx (with options: `install')
+%%
+%% Copyright (C) 1996-2002, 2008 by Hideo Umeki <latexgeometry@gmail.com>
+%%
+%% This work may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3c of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work is "maintained" (as per the LPPL maintenance status)
+%% by Hideo Umeki.
+%%
+%% This work consists of the files geometry.dtx and
+%% the derived files: geometry.{sty,ins,drv}, geometry-samples.tex.
+%%
+\input docstrip.tex
+\Msg{************************************************************************}
+\Msg{* Installation}
+\Msg{* Package: geometry 2008/11/06 v4.0 Page Geometry}
+\Msg{************************************************************************}
\keepsilent
+\askforoverwritefalse
+
\preamble
+
+Copyright (C) 1996-2002, 2008 by Hideo Umeki <latexgeometry@gmail.com>
+
+This work may be distributed and/or modified under the conditions of
+the LaTeX Project Public License, either version 1.3c of this license
+or (at your option) any later version. The latest version of this
+license is in
+ http://www.latex-project.org/lppl.txt
+and version 1.3c or later is part of all distributions of LaTeX
+version 2005/12/01 or later.
+
+This work is "maintained" (as per the LPPL maintenance status)
+by Hideo Umeki.
+
+This work consists of the files geometry.dtx and
+the derived files: geometry.{sty,ins,drv}, geometry-samples.tex.
+
\endpreamble
-\generateFile{geometry.sty}{f}{\from{geometry.dtx}{package}}
-\generateFile{geometry.cfg}{f}{\from{geometry.dtx}{config}}
-\generateFile{geometry.drv}{f}{\from{geometry.dtx}{driver}}
-\generateFile{manual.drv}{f}{\from{geometry.dtx}{manual}}
-\Msg{***************************************************************}
+\generate{%
+ \file{geometry.ins}{\from{geometry.dtx}{install}}%
+ \file{geometry.drv}{\from{geometry.dtx}{driver}}%
+ \usedir{tex/latex/geometry}%
+ \file{geometry.sty}{\from{geometry.dtx}{package}}%
+ \file{geometry.cfg}{\from{geometry.dtx}{config}}%
+ \file{geometry-samples.tex}{\from{geometry.dtx}{samples}}%
+}
+
+\obeyspaces
+\Msg{************************************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* file into a directory searched by LaTeX:}
\Msg{*}
-\Msg{* \space Copy the files listed below into a TeX searchable directory.}
-\Msg{* \@spaces geometry.sty}
-\Msg{* \@spaces geometry.cfg}
+\Msg{* \space\space geometry.sty}
\Msg{*}
-\Msg{* \space To get geometry documentation,}
-\Msg{* \@spaces latex geometry.drv \space or}
-\Msg{* \@spaces pdflatex manual.drv\space (for A4 PDF).}
-\Msg{* \space Repeat it three times to get cross-references right.}
+\Msg{* To produce the documentation run the file `geometry.drv'}
+\Msg{* through (PDF)LaTeX.}
\Msg{*}
-\Msg{***************************************************************}
+\Msg{* Happy TeXing!}
+\Msg{*}
+\Msg{************************************************************************}
+\endbatchfile
\endinput
-
+%%
+%% End of file `geometry.ins'.
diff --git a/Master/texmf-dist/source/latex/geometry/manual.drv b/Master/texmf-dist/source/latex/geometry/manual.drv
deleted file mode 100644
index 1b260e708d4..00000000000
--- a/Master/texmf-dist/source/latex/geometry/manual.drv
+++ /dev/null
@@ -1,38 +0,0 @@
-%%
-%% This is file `manual.drv',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% geometry.dtx (with options: `manual')
-%%
-%% File: geometry.dtx Copyright (C) 1996-2002 Hideo Umeki
-%% (hideo.umeki@toshiba.co.jp)
-%%
-%% This package may be distributed under the terms of the LaTeX
-%% Project Public License, as described in lppl.txt in the base
-%% LaTeX distribution, either version 1.2 or (at your option)
-%% any later version.
-%%
-\ProvidesFile{manual.drv}
- [Geometry manual driver file (A4 PDF)]
-\documentclass{ltxdoc}
-\usepackage{times}
-\def\ttdefault{cmtt}
-\usepackage[colorlinks, linkcolor=blue,
- pdftitle={Geometry Manual}, pdfauthor={Hideo Umeki}]{hyperref}
-\usepackage[ hmargin={4cm,1.5cm},top=1.5cm, marginpar=3.5cm
- ,a4paper,pdftex, hmargin=3cm, top=2cm
- ]{geometry}
-\OnlyDescription
-\begin{document}
- \GetFileInfo{geometry.sty}
- \title{The \textsf{geometry} package}
- \author{Hideo UMEKI\\\texttt{hideo.umeki@toshiba.co.jp}}
- \date{\filedate~~\fileversion{}}
- \maketitle
- \DocInput{geometry.dtx}
-\end{document}
-\endinput
-%%
-%% End of file `manual.drv'.
diff --git a/Master/texmf-dist/tex/latex/geometry/geometry.sty b/Master/texmf-dist/tex/latex/geometry/geometry.sty
index 53ce447cf17..cac8125bc73 100644
--- a/Master/texmf-dist/tex/latex/geometry/geometry.sty
+++ b/Master/texmf-dist/tex/latex/geometry/geometry.sty
@@ -6,17 +6,25 @@
%%
%% geometry.dtx (with options: `package')
%%
-%% File: geometry.dtx Copyright (C) 1996-2002 Hideo Umeki
-%% (hideo.umeki@toshiba.co.jp)
-%%
-%% This package may be distributed under the terms of the LaTeX
-%% Project Public License, as described in lppl.txt in the base
-%% LaTeX distribution, either version 1.2 or (at your option)
-%% any later version.
-%%
-\NeedsTeXFormat{LaTeX2e}%
-\ProvidesPackage{geometry}[2002/07/08 v3.2 Page Geometry]
+%% Copyright (C) 1996-2002, 2008 by Hideo Umeki <latexgeometry@gmail.com>
+%%
+%% This work may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3c of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work is "maintained" (as per the LPPL maintenance status)
+%% by Hideo Umeki.
+%%
+%% This work consists of the files geometry.dtx and
+%% the derived files: geometry.{sty,ins,drv}, geometry-samples.tex.
+%%
\RequirePackage{keyval}%
+\RequirePackage{ifpdf}%
+\RequirePackage{ifvtex}%
\newif\ifGm@verbose
\newif\ifGm@landscape
\newif\ifGm@includehead
@@ -27,9 +35,9 @@
\newif\ifGm@heightrounded
\newif\ifGm@showframe
\newif\ifGm@compatii
-\newif\ifGm@special
\newif\ifGm@sworient\Gm@sworientfalse
\newif\ifGm@pass\Gm@passfalse
+\newif\ifGm@resetpaper
\newcount\Gm@cnth
\newcount\Gm@cntv
\newcount\c@Gm@tempcnt
@@ -60,6 +68,8 @@
\@onlypreamble\Gm@vtex
\def\Gm@true{true}%
\def\Gm@false{false}%
+\edef\Gm@orgpw{\the\paperwidth}%
+\edef\Gm@orgph{\the\paperheight}%
\edef\Gm@dorg{%
\noexpand\setlength{\paperwidth}{\the\paperwidth}%
\noexpand\setlength{\paperheight}{\the\paperheight}%
@@ -91,7 +101,7 @@
\Gm@hbodyfalse\Gm@vbodyfalse
\Gm@includeheadfalse\Gm@includefootfalse\Gm@includempfalse
\Gm@landscapefalse\Gm@compatiifalse\Gm@heightroundedfalse
- \Gm@verbosefalse\Gm@showframefalse\Gm@specialfalse
+ \Gm@verbosefalse\Gm@showframefalse\Gm@resetpaperfalse
\let\Gm@paper\@undefined
\let\Gm@width\@undefined\let\Gm@height\@undefined
\let\Gm@textwidth\@undefined\let\Gm@textheight\@undefined
@@ -332,12 +342,12 @@
\def\Gm@chpaper{\@nameuse{Gm@\Gm@paper}}%
\@onlypreamble\Gm@chpaper
\@namedef{Gm@a0paper}{\Gm@setpaper(841,1189){mm}}%
-\@namedef{Gm@a1paper}{\Gm@setpaper(595,841){mm}}%
-\@namedef{Gm@a2paper}{\Gm@setpaper(420,595){mm}}%
+\@namedef{Gm@a1paper}{\Gm@setpaper(594,841){mm}}%
+\@namedef{Gm@a2paper}{\Gm@setpaper(420,594){mm}}%
\@namedef{Gm@a3paper}{\Gm@setpaper(297,420){mm}}%
\@namedef{Gm@a4paper}{\Gm@setpaper(210,297){mm}}%
-\@namedef{Gm@a5paper}{\Gm@setpaper(149,210){mm}}%
-\@namedef{Gm@a6paper}{\Gm@setpaper(105,149){mm}}%
+\@namedef{Gm@a5paper}{\Gm@setpaper(148,210){mm}}%
+\@namedef{Gm@a6paper}{\Gm@setpaper(105,148){mm}}%
\@namedef{Gm@b0paper}{\Gm@setpaper(1000,1414){mm}}%
\@namedef{Gm@b1paper}{\Gm@setpaper(707,1000){mm}}%
\@namedef{Gm@b2paper}{\Gm@setpaper(500,707){mm}}%
@@ -345,6 +355,11 @@
\@namedef{Gm@b4paper}{\Gm@setpaper(250,353){mm}}%
\@namedef{Gm@b5paper}{\Gm@setpaper(176,250){mm}}%
\@namedef{Gm@b6paper}{\Gm@setpaper(125,176){mm}}%
+\@namedef{Gm@ansiapaper}{\Gm@setpaper(8.5,11){in}}%
+\@namedef{Gm@ansibpaper}{\Gm@setpaper(11,17){in}}%
+\@namedef{Gm@ansicpaper}{\Gm@setpaper(17,22){in}}%
+\@namedef{Gm@ansidpaper}{\Gm@setpaper(22,34){in}}%
+\@namedef{Gm@ansiepaper}{\Gm@setpaper(34,44){in}}%
\@namedef{Gm@letterpaper}{\Gm@setpaper(8.5,11){in}}%
\@namedef{Gm@legalpaper}{\Gm@setpaper(8.5,14){in}}%
\@namedef{Gm@executivepaper}{\Gm@setpaper(7.25,10.5){in}}%
@@ -365,6 +380,11 @@
\define@key{Gm}{b4paper}[true]{\def\Gm@paper{b4paper}\Gm@chpaper}%
\define@key{Gm}{b5paper}[true]{\def\Gm@paper{b5paper}\Gm@chpaper}%
\define@key{Gm}{b6paper}[true]{\def\Gm@paper{b6paper}\Gm@chpaper}%
+\define@key{Gm}{ansiapaper}[true]{\def\Gm@paper{ansiapaper}\Gm@chpaper}%
+\define@key{Gm}{ansibpaper}[true]{\def\Gm@paper{ansibpaper}\Gm@chpaper}%
+\define@key{Gm}{ansicpaper}[true]{\def\Gm@paper{ansicpaper}\Gm@chpaper}%
+\define@key{Gm}{ansidpaper}[true]{\def\Gm@paper{ansidpaper}\Gm@chpaper}%
+\define@key{Gm}{ansiepaper}[true]{\def\Gm@paper{ansiepaper}\Gm@chpaper}%
\define@key{Gm}{letterpaper}[true]{\def\Gm@paper{letterpaper}\Gm@chpaper}%
\define@key{Gm}{legalpaper}[true]{\def\Gm@paper{legalpaper}\Gm@chpaper}%
\define@key{Gm}{executivepaper}[true]{\def\Gm@paper{executivepaper}%
@@ -483,8 +503,10 @@
\Gm@doif{reversemp}{#1}{\csname @reversemargin\Gm@bool\endcsname}}%
\define@key{Gm}{reversemarginpar}[true]{%
\Gm@doif{reversemarginpar}{#1}{\csname @reversemargin\Gm@bool\endcsname}}%
-\define@key{Gm}{driver}{\edef\@@tempa{#1}%
- \ifx\@@tempa\@empty\let\Gm@driver\@empty\else\setkeys{Gm}{#1}\fi}%
+\define@key{Gm}{driver}{\edef\@@tempa{#1}\edef\@@auto{auto}%
+ \ifx\@@tempa\@empty\let\Gm@driver\@empty\else
+ \ifx\@@tempa\@@auto\let\Gm@driver\@empty\else
+ \setkeys{Gm}{#1}\fi\fi}%
\define@key{Gm}{dvips}[true]{%
\Gm@doifelse{dvips}{#1}{\Gm@setdriver{dvips}}{\Gm@unsetdriver{dvips}}}%
\define@key{Gm}{dvipdfm}[true]{%
@@ -496,6 +518,7 @@
\define@key{Gm}{verbose}[true]{\Gm@setbool{verbose}{#1}}%
\define@key{Gm}{reset}[true]{\Gm@doifelse{reset}{#1}%
{\Gm@init\Gm@dorg\ProcessOptionsKV[c]{Gm}\Gm@setdefaultpaper}{}}%
+\define@key{Gm}{resetpaper}[true]{\Gm@setbool{resetpaper}{#1}}%
\define@key{Gm}{mag}{\mag=#1}%
\define@key{Gm}{truedimen}[true]{\Gm@doifelse{truedimen}{#1}%
{\let\Gm@truedimen\Gm@true}{\let\Gm@truedimen\@empty}}%
@@ -560,25 +583,30 @@
\fi}%
\@onlypreamble\Gm@checkmp
\def\Gm@checkdrivers{%
- \ifx\pdfpagewidth\@undefined\else
- \ifnum\pdfoutput=\@ne
+ \ifx\Gm@driver\@empty
+ \typeout{*geometry auto-detecting driver*}%
+ \ifpdf
\Gm@setdriver{pdftex}%
+ \else
+ \Gm@setdriver{dvips}%
\fi
- \fi
- \ifx\VTeXversion\@undefined\else
- \ifnum\OpMode=\@ne
+ \@ifundefined{XeTeXrevision}{}{\Gm@setdriver{pdftex}}%
+ \ifvtex
\Gm@setdriver{vtex}%
- \else
- \ifnum\OpMode=\tw@
- \Gm@setdriver{vtex}%
- \fi
\fi
- \fi
- \ifx\Gm@driver\Gm@dvips
- \Gm@specialtrue
\else
- \ifx\Gm@driver\Gm@dvipdfm
- \Gm@specialtrue
+ \ifx\Gm@driver\Gm@pdftex
+ \ifpdf\else
+ \@ifundefined{XeTeXrevision}{\Gm@warning{%
+ Wrong driver setting: `pdftex'; using default driver}%
+ \Gm@setdriver{dvips}}{}%
+ \fi
+ \fi
+ \ifx\Gm@driver\Gm@vtex
+ \ifvtex\else
+ \Gm@warning{Wrong driver setting: `vtex'; using default driver}%
+ \Gm@setdriver{dvips}%
+ \fi
\fi
\fi}%
\@onlypreamble\Gm@checkdrivers
@@ -606,9 +634,9 @@
\fi}%
\@onlypreamble\Gm@mpfix
\def\Gm@process{%
- \ifGm@pass
- \Gm@dorg
- \else
+ \ifGm@pass
+ \Gm@dorg
+ \else
\Gm@processdimlist
\ifx\Gm@hmarginratio\@undefined
\if@twoside
@@ -648,6 +676,11 @@
\edef\Gm@width{\the\@tempdima}%
\fi
\fi
+ \ifdim\topskip<\ht\strutbox
+ \setlength\@tempdima{\topskip}%
+ \setlength\topskip{\ht\strutbox}%
+ \Gm@warning{\noexpand\topskip was changed from \the\@tempdima\space to \the\topskip}%
+ \fi
\ifGm@vbody
\ifx\Gm@height\@undefined
\ifx\Gm@vscale\@undefined
@@ -818,8 +851,13 @@
\ProcessOptionsKV[p]{Gm}%
\Gm@process
\AtBeginDocument{%
- \edef\Gm@orgw{\the\paperwidth}%
- \edef\Gm@orgh{\the\paperheight}%
+ \ifGm@resetpaper
+ \edef\Gm@pw{\Gm@orgpw}%
+ \edef\Gm@ph{\Gm@orgph}%
+ \else
+ \edef\Gm@pw{\the\paperwidth}%
+ \edef\Gm@ph{\the\paperheight}%
+ \fi
\ifGm@pass\else
\ifnum\mag=\@m\else
\Gm@magtooffset
@@ -830,32 +868,41 @@
\fi
\fi
\Gm@checkdrivers
+ \typeout{*geometry detected driver: \Gm@driver*}%
\ifx\Gm@driver\Gm@pdftex
- \ifx\pdfpagewidth\@undefined
- \Gm@warning{`pdftex' option is invalid in this environment}%
- \else
- \setlength\pdfpagewidth{\Gm@orgw}%
- \setlength\pdfpageheight{\Gm@orgh}%
- \ifnum\mag=\@m\else\ifx\Gm@truedimen\Gm@true
- \setlength\paperwidth{\Gm@orgw}%
- \setlength\paperheight{\Gm@orgh}%
- \fi\fi
+ \setlength\pdfpagewidth{\Gm@pw}%
+ \setlength\pdfpageheight{\Gm@ph}%
+ \ifnum\mag=\@m\else
+ \@tempdima=\mag sp%
+ \divide\pdfhorigin\@tempdima
+ \multiply\pdfhorigin\@m
+ \divide\pdfvorigin\@tempdima
+ \multiply\pdfvorigin\@m
+ \ifx\Gm@truedimen\Gm@true
+ \setlength\paperwidth{\Gm@pw}%
+ \setlength\paperheight{\Gm@ph}%
+ \fi
\fi
\fi
\ifx\Gm@driver\Gm@vtex
- \ifx\VTeXversion\@undefined
- \Gm@warning{`vtex' option is invalid in this environment}%
- \else
- \mediawidth=\paperwidth
- \mediaheight=\paperheight
+ \mediawidth=\paperwidth
+ \mediaheight=\paperheight
+ \ifvtexdvi
+ \AtBeginDvi{\special{papersize=\the\paperwidth,\the\paperheight}}%
\fi
\fi
- \ifGm@special
+ \ifx\Gm@driver\Gm@dvips
\AtBeginDvi{\special{papersize=\the\paperwidth,\the\paperheight}}%
\ifx\Gm@driver\Gm@dvips\ifGm@landscape
\AtBeginDvi{\special{! /landplus90 true store}}%
\fi\fi
- \fi
+ \else\ifx\Gm@driver\Gm@dvipdfm
+ \ifx\AtBeginShipoutFirst\relax
+ \AtBeginDvi{\special{papersize=\the\paperwidth,\the\paperheight}}%
+ \else
+ \AtBeginShipoutFirst{\special{papersize=\the\paperwidth,\the\paperheight}}%
+ \fi
+ \fi\fi
\ifGm@showframe
\AtBeginDvi{%
\moveright\@themargin%
@@ -887,8 +934,10 @@
\let\Gm@wd@mp\relax
\let\Gm@odd@mp\relax
\let\Gm@even@mp\relax
- \let\Gm@orgw\relax
- \let\Gm@orgh\relax
+ \let\Gm@orgpw\relax
+ \let\Gm@orgph\relax
+ \let\Gm@pw\relax
+ \let\Gm@ph\relax
\let\Gm@dimlist\relax}%
\def\geometry#1{%
\Gm@clean