texlive[47106] Master/texmf-dist: geometry (25mar18)

commits+karl at tug.org commits+karl at tug.org
Sun Mar 25 23:23:05 CEST 2018


Revision: 47106
          http://tug.org/svn/texlive?view=revision&revision=47106
Author:   karl
Date:     2018-03-25 23:23:05 +0200 (Sun, 25 Mar 2018)
Log Message:
-----------
geometry (25mar18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/geometry/changes.txt
    trunk/Master/texmf-dist/doc/latex/geometry/geometry-samples.tex
    trunk/Master/texmf-dist/doc/latex/geometry/geometry.cfg
    trunk/Master/texmf-dist/doc/latex/geometry/geometry.pdf
    trunk/Master/texmf-dist/source/latex/geometry/geometry.drv
    trunk/Master/texmf-dist/source/latex/geometry/geometry.dtx
    trunk/Master/texmf-dist/source/latex/geometry/geometry.ins
    trunk/Master/texmf-dist/tex/latex/geometry/geometry.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/geometry/README.md

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/latex/geometry/README

Deleted: trunk/Master/texmf-dist/doc/latex/geometry/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/geometry/README	2018-03-25 19:57:47 UTC (rev 47105)
+++ trunk/Master/texmf-dist/doc/latex/geometry/README	2018-03-25 21:23:05 UTC (rev 47106)
@@ -1,78 +0,0 @@
-LaTeX Package: Geometry 2010/09/12 v5.6
-----------------------------------------
-Flexible and complete interface to document dimensions.
-
-Copyright (C) 1996-2010
-by Hideo Umeki <latexgeometry at 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 \usepackage[margin=2cm]{geometry}. With \newgeometry command
-  you can change the layout anywhere in the document.
-
-CTAN: macros/latex/contrib/geometry
-
-Recent changes:
-[Release 5.0-5.6]
-  * Package 'ifxetex' is loaded for robuster detection of XeTeX. (v5.6-)
-  * Changing page layout mid-document.
-  * A new set of options to specify layout area.
-  * A new driver option 'xetex'.
-  * New paper size presets for JIS B-series and ISO C-series (v5.4-).
-  * Changing default for underspecified margin.
-  * The option 'showframe' works on every page.
-  * The option 'showcrop' prints elbow-shaped crop marks at each corner
-    of the layout area, which is equal to paper size. (v5.5-)
-  * Package 'atbegshi' is required when 'showframe' or 'showcrop' is specified.
-  * Loading geometry.cfg precedes processing class options.
-  * Deleted options: 'compat2' and 'twosideshift'.
-  * Added 'onecolumn' option as a shorthand for 'twocolumn=false'.
-  * Changed the format of the verbose mode.
-  * Fixed typos and wrong figures, and revised expressions in the document.
-
-(changes.txt for more history)
-
-Files:
-  * README         -  this file
-  * changes.txt    -  history of changes
-  * geometry.ins   -  for installation to get .sty from .dtx
-  * geometry.dtx   -  including sources and documentation
-  * geometry.pdf   -  print-ready documentation
-
-Installation: 
-[manual installation]
-  * To get geometry.sty out of geometry.dtx
-        $ tex geometry.dtx 
-    or  $ (la)tex geometry.ins
-  * To build documentation
-        $ latex geometry.dtx  
-    or  $ latex geometry.drv
-  * Put the derived files in the proper directories:
-      -  tex/latex/geometry/geometry.sty
-      -  doc/latex/geometry/geometry.pdf
-      -  source/latex/geometry/geometry.dtx
-
-[TeXLive]
-  * Use 'tlmgr' command
-        $ tlmgr show geometry          -- to check the package info
-        $ sudo tlmgr update geometry   -- to update the package
-  * You can use 'TeX Live Utility' instead of 'tlmgr', if on MacOSX.
-
-[MikTeX]
-  * Use the MikTeX Update Wizard to update geometry package.
-
-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

Added: trunk/Master/texmf-dist/doc/latex/geometry/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/geometry/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/geometry/README.md	2018-03-25 21:23:05 UTC (rev 47106)
@@ -0,0 +1,67 @@
+LaTeX Package: Geometry 2010/09/12 v5.6
+----------------------------------------
+Flexible and complete interface to document dimensions.
+
+Copyright (C) 1996-2010
+by Hideo Umeki <latexgeometry at gmail.com>
+Copyright (C) 2018
+Hideo Umeki and David Carlisle https://github.com/davidcarlisle/geometry
+
+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 \usepackage[margin=2cm]{geometry}. With \newgeometry command
+  you can change the layout anywhere in the document.
+
+CTAN: macros/latex/contrib/geometry
+
+Recent changes:
+
+[Release 5.7]
+Add support for luatex (with new comand names introduced in luatex 0.85)
+
+(changes.txt for more history)
+
+Files:
+  * README.md         -  this file
+  * changes.txt    -  history of changes
+  * geometry.ins   -  for installation to get .sty from .dtx
+  * geometry.dtx   -  including sources and documentation
+  * geometry.pdf   -  print-ready documentation
+
+Installation: 
+[manual installation]
+  * To get geometry.sty out of geometry.dtx
+        $ tex geometry.dtx 
+    or  $ (la)tex geometry.ins
+  * To build documentation
+        $ latex geometry.dtx  
+    or  $ latex geometry.drv
+  * Put the derived files in the proper directories:
+      -  tex/latex/geometry/geometry.sty
+      -  doc/latex/geometry/geometry.pdf
+      -  source/latex/geometry/geometry.dtx
+
+[TeXLive]
+  * Use 'tlmgr' command
+        $ tlmgr show geometry          -- to check the package info
+        $ sudo tlmgr update geometry   -- to update the package
+  * You can use 'TeX Live Utility' instead of 'tlmgr', if on MacOSX.
+
+[MikTeX]
+  * Use the MikTeX Update Wizard to update geometry package.
+
+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


Property changes on: trunk/Master/texmf-dist/doc/latex/geometry/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/geometry/changes.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/geometry/changes.txt	2018-03-25 19:57:47 UTC (rev 47105)
+++ trunk/Master/texmf-dist/doc/latex/geometry/changes.txt	2018-03-25 21:23:05 UTC (rev 47106)
@@ -1,3 +1,6 @@
+2018-03-24 Release 5.7
+  * add support for luatex 0.85+
+
 2010-09-12 Release 5.6
   * Package 'ifxetex' is loaded for robuster detection of XeTeX.
   * Fixed a bug where 'pass' option was not reset in \newgeometry.

Modified: trunk/Master/texmf-dist/doc/latex/geometry/geometry-samples.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/geometry/geometry-samples.tex	2018-03-25 19:57:47 UTC (rev 47105)
+++ trunk/Master/texmf-dist/doc/latex/geometry/geometry-samples.tex	2018-03-25 21:23:05 UTC (rev 47106)
@@ -8,6 +8,8 @@
 %% 
 %% Copyright (C) 1996-2010
 %% by Hideo Umeki <latexgeometry at gmail.com>
+%% Copyright (C) 2018
+%% by Hideo Umeki and David Carlisle https://github.com/davidcarlisle/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
@@ -18,7 +20,7 @@
 %% version 2005/12/01 or later.
 %% 
 %% This work is "maintained" (as per the LPPL maintenance status)
-%% by Hideo Umeki.
+%% by David Carlisle.
 %% 
 %% This work consists of the files geometry.dtx and
 %% the derived files: geometry.{sty,ins,drv}, geometry-samples.tex.

Modified: trunk/Master/texmf-dist/doc/latex/geometry/geometry.cfg
===================================================================
--- trunk/Master/texmf-dist/doc/latex/geometry/geometry.cfg	2018-03-25 19:57:47 UTC (rev 47105)
+++ trunk/Master/texmf-dist/doc/latex/geometry/geometry.cfg	2018-03-25 21:23:05 UTC (rev 47106)
@@ -8,6 +8,8 @@
 %% 
 %% Copyright (C) 1996-2010
 %% by Hideo Umeki <latexgeometry at gmail.com>
+%% Copyright (C) 2018
+%% by Hideo Umeki and David Carlisle https://github.com/davidcarlisle/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
@@ -18,7 +20,7 @@
 %% version 2005/12/01 or later.
 %% 
 %% This work is "maintained" (as per the LPPL maintenance status)
-%% by Hideo Umeki.
+%% by David Carlisle.
 %% 
 %% This work consists of the files geometry.dtx and
 %% the derived files: geometry.{sty,ins,drv}, geometry-samples.tex.

Modified: trunk/Master/texmf-dist/doc/latex/geometry/geometry.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/geometry/geometry.drv
===================================================================
--- trunk/Master/texmf-dist/source/latex/geometry/geometry.drv	2018-03-25 19:57:47 UTC (rev 47105)
+++ trunk/Master/texmf-dist/source/latex/geometry/geometry.drv	2018-03-25 21:23:05 UTC (rev 47106)
@@ -8,6 +8,8 @@
 %% 
 %% Copyright (C) 1996-2010
 %% by Hideo Umeki <latexgeometry at gmail.com>
+%% Copyright (C) 2018
+%% by Hideo Umeki and David Carlisle https://github.com/davidcarlisle/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
@@ -18,7 +20,7 @@
 %% version 2005/12/01 or later.
 %% 
 %% This work is "maintained" (as per the LPPL maintenance status)
-%% by Hideo Umeki.
+%% by David Carlisle.
 %% 
 %% This work consists of the files geometry.dtx and
 %% the derived files: geometry.{sty,ins,drv}, geometry-samples.tex.

Modified: trunk/Master/texmf-dist/source/latex/geometry/geometry.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/geometry/geometry.dtx	2018-03-25 19:57:47 UTC (rev 47105)
+++ trunk/Master/texmf-dist/source/latex/geometry/geometry.dtx	2018-03-25 21:23:05 UTC (rev 47106)
@@ -1,6 +1,7 @@
 % \iffalse meta-comment
 %
 % Copyright 1996-2010 by Hideo Umeki <latexgeometry at gmail.com>
+% Copyright 2018  Hideo Umeki and David Carlisle
 %
 % LaTeX Package: Geometry
 % -----------------------
@@ -14,13 +15,13 @@
 % version 2005/12/01 or later.
 %
 % This work is "maintained" (as per the LPPL maintenance status)
-% by Hideo Umeki.
+% by David Carlisle
 %
 % 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/README
+%    CTAN: macros/latex/contrib/geometry/README.md
 %    CTAN: macros/latex/contrib/geometry/changes.txt
 %    CTAN: macros/latex/contrib/geometry/geometry.ins
 %    CTAN: macros/latex/contrib/geometry/geometry.dtx
@@ -39,12 +40,12 @@
 %</ignore>
 %<package|driver>\NeedsTeXFormat{LaTeX2e}
 %<package>\ProvidesPackage{geometry}
-%<package>  [2010/09/12 v5.6 Page Geometry]
+%<package>  [2018/03/24 v5.7 Page Geometry]
 %<*install>
 \input docstrip.tex
 \Msg{************************************************************************}
 \Msg{* Installation}
-\Msg{* Package: geometry 2010/09/12 v5.6 Page Geometry}
+\Msg{* Package: geometry 2018/03/24 v5.7 Page Geometry}
 \Msg{************************************************************************}
 
 \keepsilent
@@ -53,6 +54,8 @@
 
 Copyright (C) 1996-2010
 by Hideo Umeki <latexgeometry at gmail.com>
+Copyright (C) 2018
+by Hideo Umeki and David Carlisle https://github.com/davidcarlisle/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
@@ -63,7 +66,7 @@
 version 2005/12/01 or later.
 
 This work is "maintained" (as per the LPPL maintenance status)
-by Hideo Umeki.
+by David Carlisle.
 
 This work consists of the files geometry.dtx and
 the derived files: geometry.{sty,ins,drv}, geometry-samples.tex.
@@ -117,24 +120,7 @@
 %</driver>
 % \fi
 %
-% \CheckSum{2680}
 %
-% \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.sty}
 %
 % \title{The \textsf{geometry} package}
@@ -1130,8 +1116,8 @@
 %
 % \subsection{Drivers}\label{sec:drivers}
 % 
-% The package supports drivers |dvips|, |dvipdfm|, |pdftex|, |xetex| and
-% |vtex|. You can also set |dvipdfm| for \textsf{dvipdfmx} and
+% The package supports drivers |dvips|, |dvipdfm|, |pdftex|, |luatex|,
+% |xetex| and |vtex|. You can also set |dvipdfm| for \textsf{dvipdfmx} and
 % \textsf{xdvipdfmx}. |pdftex| for \textsf{pdflatex}, and |vtex| for
 % V\TeX{} environment.
 % The driver options are exclusive. The driver can be set by either
@@ -1920,6 +1906,7 @@
 %    \begin{macro}{\Gm at dvips}%
 %    \begin{macro}{\Gm at dvipdfm}%
 %    \begin{macro}{\Gm at pdftex}%
+%    \begin{macro}{\Gm at luatex}%
 %    \begin{macro}{\Gm at xetex}%
 %    \begin{macro}{\Gm at vtex}%
 %    The driver names.
@@ -1927,10 +1914,11 @@
 \def\Gm at dvips{dvips}%
 \def\Gm at dvipdfm{dvipdfm}%
 \def\Gm at pdftex{pdftex}%
+\def\Gm at luatex{luatex}%
 \def\Gm at xetex{xetex}%
 \def\Gm at vtex{vtex}%
 %    \end{macrocode}
-%    \end{macro}\end{macro}\end{macro}\end{macro}\end{macro}
+%    \end{macro}\end{macro}\end{macro}\end{macro}\end{macro}\end{macro}
 %    \begin{macro}{\Gm at true}%
 %    \begin{macro}{\Gm at false}%
 %    The macros for |true| and |false|.
@@ -2893,10 +2881,11 @@
 %  \begin{key}{Gm}{dvips}
 %  \begin{key}{Gm}{dvipdfm}
 %  \begin{key}{Gm}{pdftex}
+%  \begin{key}{Gm}{luatex}
 %  \begin{key}{Gm}{xetex}
 %  \begin{key}{Gm}{vtex}
 %    The \Gm\ package supports |dvips|, |dvipdfm|, 
-%    |pdflatex| and |vtex|. |dvipdfm| works like |dvips|.
+%    |pdflatex|, |luatex| and |vtex|. |dvipdfm| works like |dvips|.
 %    \begin{macrocode}
 \define at key{Gm}{dvips}[true]{\ifGm at preamble{dvips}{%
   \Gm at doifelse{dvips}{#1}{\Gm at setdriver{dvips}}{\Gm at unsetdriver{dvips}}}}%
@@ -2904,12 +2893,14 @@
   \Gm at doifelse{dvipdfm}{#1}{\Gm at setdriver{dvipdfm}}{\Gm at unsetdriver{dvipdfm}}}}%
 \define at key{Gm}{pdftex}[true]{\ifGm at preamble{pdftex}{%
   \Gm at doifelse{pdftex}{#1}{\Gm at setdriver{pdftex}}{\Gm at unsetdriver{pdftex}}}}%
+\define at key{Gm}{luatex}[true]{\ifGm at preamble{luatex}{%
+  \Gm at doifelse{luatex}{#1}{\Gm at setdriver{luatex}}{\Gm at unsetdriver{luatex}}}}%
 \define at key{Gm}{xetex}[true]{\ifGm at preamble{xetex}{%
   \Gm at doifelse{xetex}{#1}{\Gm at setdriver{xetex}}{\Gm at unsetdriver{xetex}}}}%
 \define at key{Gm}{vtex}[true]{\ifGm at preamble{vtex}{%
   \Gm at doifelse{vtex}{#1}{\Gm at setdriver{vtex}}{\Gm at unsetdriver{vtex}}}}%
 %    \end{macrocode}
-%  \end{key}\end{key}\end{key}\end{key}\end{key}
+%  \end{key}\end{key}\end{key}\end{key}\end{key}\end{key}
 %  \begin{key}{Gm}{verbose}
 %    The verbose mode.
 %    \begin{macrocode}
@@ -3276,7 +3267,11 @@
 %    \cs{ifpdf} is defined in \textsf{ifpdf} package in `oberdiek' bundle.
 %    \begin{macrocode} 
     \ifpdf
-      \Gm at setdriver{pdftex}%
+      \ifx\pdfextension\@undefined
+        \Gm at setdriver{pdftex}%
+      \else
+        \Gm at setdriver{luatex}%
+      \fi
     \else
       \Gm at setdriver{dvips}%
     \fi
@@ -3591,7 +3586,7 @@
       \setlength\pdfpagewidth{\Gm at pw}%
       \setlength\pdfpageheight{\Gm at ph}}%
     \ifnum\mag=\@m\else
-      \@tempdima=\mag sp%
+      \@tempdima=\mag sp
       \@ifundefined{pdfhorigin}{}{%
         \divide\pdfhorigin\@tempdima
         \multiply\pdfhorigin\@m
@@ -3604,6 +3599,28 @@
     \fi
   \fi
 %    \end{macrocode}
+%    If |luatex| is set to |true|, pdf-commands are set properly.
+%    To avoid |luatex| magnification problem, \cs{horigin} and
+%    \cs{vorigin} are adjusted for \cs{mag}.
+%    \begin{macrocode}
+  \ifx\Gm at driver\Gm at luatex
+    \setlength\pagewidth{\Gm at pw}%
+    \setlength\pageheight{\Gm at ph}%
+    \ifnum\mag=\@m\else
+      \@tempdima=\mag sp
+        \edef\Gm at horigin{\pdfvariable horigin}%
+        \edef\Gm at vorigin{\pdfvariable vorigin}%
+        \divide\Gm at horigin\@tempdima
+        \multiply\Gm at horigin\@m
+        \divide\Gm at vorigin\@tempdima
+        \multiply\Gm at vorigin\@m
+      \ifx\Gm at truedimen\Gm at true
+        \setlength\paperwidth{\Gm at pw}%
+        \setlength\paperheight{\Gm at ph}%
+      \fi
+    \fi
+  \fi
+%    \end{macrocode}
 %    With V\TeX{} environment, V\TeX{} variables are set here.
 %    \begin{macrocode}
   \ifx\Gm at driver\Gm at vtex

Modified: trunk/Master/texmf-dist/source/latex/geometry/geometry.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/geometry/geometry.ins	2018-03-25 19:57:47 UTC (rev 47105)
+++ trunk/Master/texmf-dist/source/latex/geometry/geometry.ins	2018-03-25 21:23:05 UTC (rev 47106)
@@ -8,6 +8,8 @@
 %% 
 %% Copyright (C) 1996-2010
 %% by Hideo Umeki <latexgeometry at gmail.com>
+%% Copyright (C) 2018
+%% by Hideo Umeki and David Carlisle https://github.com/davidcarlisle/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
@@ -18,7 +20,7 @@
 %% version 2005/12/01 or later.
 %% 
 %% This work is "maintained" (as per the LPPL maintenance status)
-%% by Hideo Umeki.
+%% by David Carlisle.
 %% 
 %% This work consists of the files geometry.dtx and
 %% the derived files: geometry.{sty,ins,drv}, geometry-samples.tex.
@@ -26,7 +28,7 @@
 \input docstrip.tex
 \Msg{************************************************************************}
 \Msg{* Installation}
-\Msg{* Package: geometry 2010/09/12 v5.6 Page Geometry}
+\Msg{* Package: geometry 2018/03/24 v5.7 Page Geometry}
 \Msg{************************************************************************}
 
 \keepsilent
@@ -35,6 +37,8 @@
 
 Copyright (C) 1996-2010
 by Hideo Umeki <latexgeometry at gmail.com>
+Copyright (C) 2018
+by Hideo Umeki and David Carlisle https://github.com/davidcarlisle/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
@@ -45,7 +49,7 @@
 version 2005/12/01 or later.
 
 This work is "maintained" (as per the LPPL maintenance status)
-by Hideo Umeki.
+by David Carlisle.
 
 This work consists of the files geometry.dtx and
 the derived files: geometry.{sty,ins,drv}, geometry-samples.tex.

Modified: trunk/Master/texmf-dist/tex/latex/geometry/geometry.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/geometry/geometry.sty	2018-03-25 19:57:47 UTC (rev 47105)
+++ trunk/Master/texmf-dist/tex/latex/geometry/geometry.sty	2018-03-25 21:23:05 UTC (rev 47106)
@@ -8,6 +8,8 @@
 %% 
 %% Copyright (C) 1996-2010
 %% by Hideo Umeki <latexgeometry at gmail.com>
+%% Copyright (C) 2018
+%% by Hideo Umeki and David Carlisle https://github.com/davidcarlisle/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
@@ -18,7 +20,7 @@
 %% version 2005/12/01 or later.
 %% 
 %% This work is "maintained" (as per the LPPL maintenance status)
-%% by Hideo Umeki.
+%% by David Carlisle.
 %% 
 %% This work consists of the files geometry.dtx and
 %% the derived files: geometry.{sty,ins,drv}, geometry-samples.tex.
@@ -25,7 +27,7 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{geometry}
-  [2010/09/12 v5.6 Page Geometry]
+  [2018/03/24 v5.7 Page Geometry]
 \RequirePackage{keyval}%
 \RequirePackage{ifpdf}%
 \RequirePackage{ifvtex}%
@@ -72,6 +74,7 @@
 \def\Gm at dvips{dvips}%
 \def\Gm at dvipdfm{dvipdfm}%
 \def\Gm at pdftex{pdftex}%
+\def\Gm at luatex{luatex}%
 \def\Gm at xetex{xetex}%
 \def\Gm at vtex{vtex}%
 \def\Gm at true{true}%
@@ -592,6 +595,8 @@
   \Gm at doifelse{dvipdfm}{#1}{\Gm at setdriver{dvipdfm}}{\Gm at unsetdriver{dvipdfm}}}}%
 \define at key{Gm}{pdftex}[true]{\ifGm at preamble{pdftex}{%
   \Gm at doifelse{pdftex}{#1}{\Gm at setdriver{pdftex}}{\Gm at unsetdriver{pdftex}}}}%
+\define at key{Gm}{luatex}[true]{\ifGm at preamble{luatex}{%
+  \Gm at doifelse{luatex}{#1}{\Gm at setdriver{luatex}}{\Gm at unsetdriver{luatex}}}}%
 \define at key{Gm}{xetex}[true]{\ifGm at preamble{xetex}{%
   \Gm at doifelse{xetex}{#1}{\Gm at setdriver{xetex}}{\Gm at unsetdriver{xetex}}}}%
 \define at key{Gm}{vtex}[true]{\ifGm at preamble{vtex}{%
@@ -809,7 +814,11 @@
   \ifx\Gm at driver\@empty
     \typeout{*geometry* driver: auto-detecting}%
     \ifpdf
-      \Gm at setdriver{pdftex}%
+      \ifx\pdfextension\@undefined
+        \Gm at setdriver{pdftex}%
+      \else
+        \Gm at setdriver{luatex}%
+      \fi
     \else
       \Gm at setdriver{dvips}%
     \fi
@@ -1030,7 +1039,7 @@
       \setlength\pdfpagewidth{\Gm at pw}%
       \setlength\pdfpageheight{\Gm at ph}}%
     \ifnum\mag=\@m\else
-      \@tempdima=\mag sp%
+      \@tempdima=\mag sp
       \@ifundefined{pdfhorigin}{}{%
         \divide\pdfhorigin\@tempdima
         \multiply\pdfhorigin\@m
@@ -1042,6 +1051,23 @@
       \fi
     \fi
   \fi
+  \ifx\Gm at driver\Gm at luatex
+    \setlength\pagewidth{\Gm at pw}%
+    \setlength\pageheight{\Gm at ph}%
+    \ifnum\mag=\@m\else
+      \@tempdima=\mag sp
+        \edef\Gm at horigin{\pdfvariable horigin}%
+        \edef\Gm at vorigin{\pdfvariable vorigin}%
+        \divide\Gm at horigin\@tempdima
+        \multiply\Gm at horigin\@m
+        \divide\Gm at vorigin\@tempdima
+        \multiply\Gm at vorigin\@m
+      \ifx\Gm at truedimen\Gm at true
+        \setlength\paperwidth{\Gm at pw}%
+        \setlength\paperheight{\Gm at ph}%
+      \fi
+    \fi
+  \fi
   \ifx\Gm at driver\Gm at vtex
     \@ifundefined{mediawidth}{}{%
       \mediawidth=\paperwidth



More information about the tex-live-commits mailing list