texlive[53762] Master/texmf-dist: gridset (12feb20)

commits+karl at tug.org commits+karl at tug.org
Wed Feb 12 23:21:37 CET 2020


Revision: 53762
          http://tug.org/svn/texlive?view=revision&revision=53762
Author:   karl
Date:     2020-02-12 23:21:36 +0100 (Wed, 12 Feb 2020)
Log Message:
-----------
gridset (12feb20)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/gridset/gridset.pdf
    trunk/Master/texmf-dist/source/latex/gridset/gridset.dtx
    trunk/Master/texmf-dist/tex/latex/gridset/gridset.sty

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

Removed Paths:
-------------
    trunk/Master/texmf-dist/source/latex/gridset/README
    trunk/Master/texmf-dist/source/latex/gridset/gridset.ins

Added: trunk/Master/texmf-dist/doc/latex/gridset/LICENSE.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/gridset/LICENSE.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/gridset/LICENSE.md	2020-02-12 22:21:36 UTC (rev 53762)
@@ -0,0 +1,19 @@
+----------------------------------------------------------------------------
+
+This work may be distributed and/or modified under the conditions of the
+LaTeX Project Public License, version 1.3c of the license. 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 2005/12/01
+or later. This work has the LPPL maintenance status “maintained”.
+The current maintainer and author of this work is Markus Kohm.
+
+----------------------------------------------------------------------------
+
+Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz
+in der Version 1.3c, verteilt und/oder verändert werden. Die aktuelle 
+Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und 
+Version 1.3c oder später ist Teil aller Verteilungen von LaTeX 2005/12/01 
+oder später. Dieses Werk hat den LPPL-Verwaltungs-Status „maintained” 
+Der aktuelle Verwalter und Autor dieses Werks ist Markus Kohm.
+
+----------------------------------------------------------------------------


Property changes on: trunk/Master/texmf-dist/doc/latex/gridset/LICENSE.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/gridset/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/gridset/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/gridset/README.md	2020-02-12 22:21:36 UTC (rev 53762)
@@ -0,0 +1,50 @@
+# gridset
+
+An experimental LaTeX package for semi-manual grid (a.k.a. in-register) setting
+
+------------------------------------------------------------------------------
+
+LaTeX package `gridset`  
+Copyright (c) 2008—2020 Markus Kohm  
+Release: 2020-02-12 v0.3  
+License: LPPL 1.3c (see LICENSE.md)  
+CTAN Location: https://ctan.org/pkg/gridset
+
+------------------------------------------------------------------------------
+
+## Summary
+
+This package provides commands to save positions to and restore positions from
+`aux`-file. This may be used for grid setting (a.k.a. strict in-register
+setting).
+
+## Status Note
+
+This package should not have been released, because it was only a very
+quick implementation of an idea. You should not use it for any productive
+purpose.  It has been made for testing only.  I would prefer to retire it
+from any distribution.  Nevertheless I know few persons using the package.
+So it will be still there but without any support!
+
+## Installation
+
+The package is part of [TeX Live](https://tug.org/texlive) (and therefore
+also [MacTeX](https://tug.org/mactex)) and [MiKTeX](http://miktex.org). Users
+should use the packages provided by their TeX distribution.
+
+However, manual extraction can be used to try out the developer version.
+
+To extract the package use:
+
+```bash
+tex gridset.dtx
+```
+
+To create the manual use:
+
+```bash
+pdflatex gridset.dtx
+mkindex gridset
+pdflatex gridset.dtx
+pdflatex gridset.dtx
+```


Property changes on: trunk/Master/texmf-dist/doc/latex/gridset/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/gridset/gridset.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/source/latex/gridset/README
===================================================================
--- trunk/Master/texmf-dist/source/latex/gridset/README	2020-02-12 00:47:42 UTC (rev 53761)
+++ trunk/Master/texmf-dist/source/latex/gridset/README	2020-02-12 22:21:36 UTC (rev 53762)
@@ -1,50 +0,0 @@
-----------------------------------------------------------------------------
-Package gridset
-Copyright (c) Markus Kohm, 2008
-Licence: LPPL
-Version: 2008/11/12 v0.1
-----------------------------------------------------------------------------
-This package provides commands to save positions to and restore positions
-from aux-file.  This may be used for grid setting (aka strict in-register
-setting).  The package needs pdfTeX at least version 1.40.
-----------------------------------------------------------------------------
-If you have a distribution of gridset with an archive containing the files
-
-   doc/
-   doc/latex/gridset
-   doc/latex/gridset/gridset.pdf
-   source/
-   source/latex/
-   source/latex/gridset/
-   source/latex/gridset/gridset.dtx
-   source/latex/gridset/README
-   tex/
-   tex/latex/
-   tex/latex/gridset
-   tex/latex/gridset/gridset.sty
-   tex/latex/gridset/gridsetexample.tex
-
-you may simply extract this archive at your local texmf tree (local TDS tree)
-that may be e.g. C:\localtexmf or /usr/local/share/texmf or
-/usr/TeX/texmf-local.  On some systems you may ask for the local TDS tree
-using: `kpsewhich -var-value=TEXMFLOCAL'. After extraction you should update
-your File Name DataBase e.g. using the MiKTeX Options dialog or texhash.
-
-If the files are at a root directory gridset the distributor has changed my
-original distribution archive and you have to copy the files yourself into
-the appropriate directories at one of your texmf trees and update your File
-Name DataBase.
-
-If you instead of this have only the files gridset.dtx, README, and
-gridset.pdf (optional), you have to call:
-   tex gridset.dtx
-and follow the instructions.
-
-Notes: 
-- If you only want to test gridset without installation, you may simply use
-  a copy of gridset.dtx renamed to gridset.sty.
-- README is not a user documentation file, but only needed until 
-  installation has been done.  Because of this, I declare it to be a 
-  source file.  Nevertheless distrbutors may install it as an additional 
-  documentation file.
-----------------------------------------------------------------------------

Modified: trunk/Master/texmf-dist/source/latex/gridset/gridset.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/gridset/gridset.dtx	2020-02-12 00:47:42 UTC (rev 53761)
+++ trunk/Master/texmf-dist/source/latex/gridset/gridset.dtx	2020-02-12 22:21:36 UTC (rev 53762)
@@ -1,26 +1,27 @@
-% \CheckSum{416}
 % \iffalse meta-comment
 %
 % gridset.dtx
 %
+%% Copyright (C) 2008-2020 Markus Kohm
+%%
 %% This work may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3
+%% 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.3 or later is part of all distributions of LaTeX
-%% version 2003/12/01 or later.
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
 %%
 %% This work has the LPPL maintenance status "maintained".
 %%
-%% The author of the initial version of these work was
-%% Markus Kohm <komascript at gmx.info>
+%% The author and current maintainer of this work is
+%% Markus Kohm <komascript at gmx.info>.
 %%
-%% This work consists of the files gridset.dtx and README.
+%% This work consists of the files gridset.dtx and README.md.
 %%
 %% Important Recommendation:
-%%   The LPPL requires that distributions of the Work contain all the files of
-%%   the Work (see ``Important Recommendations'' at lppl.txt).
+%% The LPPL requires that distributions of the Work contain all the files of
+%% the Work (see ``Important Recommendations'' at lppl.txt).
 %%
 %
 %<*dtx>
@@ -31,23 +32,18 @@
     % Give me the documentation
     \ProvidesFile{gridset.dtx}
 %</dtx>
-%<*dtx|tex|package|example>
+%<*dtx|package|example>
 %<package>\ProvidesPackage{gridset}
-%<tex>\ProvidesFile{gridset.tex}
 %<example>\ProvidesFile{gridsetexample.tex}
-                 [2008/11/12 v0.1 grid - aka in-register - setting]
-%</dtx|tex|package|example>
-%<*dtx|tex>
+                 [2020-02-12 v0.3 grid - a.k.a. in-register - setting]
+%</dtx|package|example>
+%<*dtx>
     \documentclass{ltxdoc}
     \begin{document}
     \RecordChanges
-%<*!tex>
     \GetFileInfo{gridset.dtx}
-%</!tex>
-%<tex>    \GetFileInfo{gridset.tex}
     \DocInput{gridset.dtx}
-%<tex>\end{document}
-%</dtx|tex>
+%</dtx>
 %<*dtx>
     \expandafter\expandafter\expandafter\enddocument
   \fi
@@ -60,14 +56,10 @@
 %<ins>\def\batchfile{gridset.ins}
   \input docstrip.tex
 
-  \ifToplevel{%
-    \let\ifalpha\iffalse
-  }
   \keepsilent
   \askforoverwritefalse
   \usedir{tex/latex/gridset}
   \preamble
-Copyright (c) Markus Kohm 2008
 
 IMPORTANT NOTE:
 
@@ -78,9 +70,8 @@
 \endpreamble
 
   \generate{%
-    \file{gridset.tex}{\from{gridset.dtx}{tex}}%
     \file{gridset.ins}{\from{gridset.dtx}{ins}}%
-    \file{gridsetx.sty}{\from{gridset.dtx}{package}}%
+    \file{gridset.sty}{\from{gridset.dtx}{package}}%
     \file{gridsetexample.tex}{\from{gridset.dtx}{example}}%
   }
 
@@ -90,11 +81,9 @@
     \Msg{* gridset}
     \Msg{* =======}
     \Msg{*}
-    \ifalpha% ALPHA
-      \Msg{* THIS IS AN ALPHA VERSION!}
-      \Msg{* DON'T USE IT ONLY TEST IT!}
-      \Msg{*}
-    \fi
+    \Msg{* THIS IS AN ALPHA VERSION!}
+    \Msg{* DON'T USE IT ONLY TEST IT!}
+    \Msg{*}
     \Msg{* To finish the installation run}
     \Msg{* \space\space latex gridset.dtx}
     \Msg{* or}
@@ -108,21 +97,19 @@
     \Msg{* \space\space kpsewhich -var-value=TEXMFLOCAL}
     \Msg{*}
     \Msg{*********************************************************************}
-%<*!ins>
-    \csname fi\endcsname\csname fi\endcsname\endinput
-%</!ins>
   }
 
 %</ins>
 %<*dtx>
 \fi
+\csname fi\endcsname
 \csname batchendinput\endcsname
 %</dtx>
 % \fi ^^A meta-comment
 %
-% \title{Semi-Manual Grid Setting Using \textsf{gridset}\iftrue^^A ALPHA
+% \title{Semi-Manual Grid Setting Using \textsf{gridset}%
 %   \footnote{This is an alpha version! Don't use it! Only test it! There's no
-%     support and everything may change!}\fi
+%     support and everything may change!}%
 % }
 % \author{Markus Kohm}
 % \date{\filedate~\fileversion}
@@ -136,6 +123,13 @@
 %   position.  This may be enough under some circumstances.  In other
 %   circumstances it may fail.  So \textsf{gridset} is only one more step for
 %   grid setting not a complete solution.
+%
+%   \paragraph*{Important Note:} This package should have been never released,
+%   because it was only a very quick implementation of an idea. You should not
+%   use it for any productive purpose. It has been made for testing only. I
+%   would prefer to retire it from any distribution. Nevertheless I know few
+%   persons using the package. So it will be still there but without any
+%   support!
 % \end{abstract}
 % \tableofcontents
 % \section{User Manual}
@@ -163,12 +157,16 @@
 % Because of this, it doesn't matter, that changing them is not really user
 % friendly.
 %
+% \DescribeMacro{\SavePos}%
 % \DescribeMacro{\savepos}%
-% \cs{savepos}\marg{unique name} saves informations about the current position
+% \cs{SavePos}\marg{unique name} saves informations about the current position
 % to the \texttt{aux}-file.  These informations are read at next \LaTeX{} run
 % and may be used (see \cs{the\dots} commands below) then. The \meta{unique
 % name} has to be a position name, that is unique for all saved position
-% informations of the current document.
+% informations of the current document. Note that the command has been renamed
+% from \cs{savepos} to \cs{SavePos} in release~0.2, because Lua\TeX{} since
+% 0.85 uses \cs{savepos} as a new primitive. On other engines the old name
+% \cs{savepos} is still available.
 %
 % \DescribeMacro{\vskipnextgrid}
 % This command moves to the next grid position.  To achieve this, a position
@@ -214,17 +212,62 @@
 % \iffalse meta-comment
 %<*package>
 % \fi ^^A meta-comment
+%
+% \begin{macro}{gridset at luaorpdf}
+% \changes{v0.2}{2017/06/05}{new internal because of Lua\TeX~0.85}
+% \begin{macro}{\gridset at pageheight}
+% \changes{v0.2}{2017/06/05}{new internal because of Lua\TeX~0.85}
+% \begin{macro}{\gridset at pagewidth}
+% \changes{v0.2}{2017/06/05}{new internal because of Lua\TeX~0.85}
+% \begin{macro}{\gridset at savepos}
+% \changes{v0.2}{2017/06/05}{new internal because of Lua\TeX~0.85}
+% \begin{macro}{\gridset at lastxpos}
+% \changes{v0.2}{2017/06/05}{new internal because of Lua\TeX~0.85}
+% \begin{macro}{\gridset at lastypos}
+% \changes{v0.2}{2017/06/05}{new internal because of Lua\TeX~0.85}
+% We need some locals because Lua\TeX{} changed the names of several
+% primitives inherited from PDF\TeX.
 %    \begin{macrocode}
-%<package>\ProvidesPackage{gridset}[\fileversion\space (package)]
+\newcommand*{\gridset at luaorpdf}[1]{%
+  \expandafter\newcommand\csname gridset@#1\endcsname{}%
+  \ifcsname pdf#1\endcsname
+    \expandafter\let\csname gridset@#1\expandafter\endcsname
+    \csname pdf#1\endcsname
+  \else
+    \ifcsname #1\endcsname
+      \expandafter\let\csname gridset@#1\expandafter\endcsname
+      \csname #1\endcsname
+    \else
+      \PackageError{gridset}{%
+        neither \expandafter\string\csname #1\endcsname\space 
+        nor \xpandafter\string\csname pdf#1\endcsname\space
+        defined%
+      }{This package needs either PDFTeX or LuaTeX or XeTeX.}%
+    \fi
+  \fi
+}
+\gridset at luaorpdf{pageheight}
+\gridset at luaorpdf{pagewidth}
+\gridset at luaorpdf{savepos}
+\gridset at luaorpdf{lastxpos}
+\gridset at luaorpdf{lastypos}
 %    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
 %
 % \begin{macro}{\gridbase}
+% \changes{v0.2}{2017/06/05}{prepared for Lua\TeX~0.85}
 % \begin{macro}{\gridinterval}
-%   These contain the grid information.  \cs{gridbase} is a integer number
-%   representing the absolute y coordinate of the upper end of the
-%   grid relative to the same reference point \cs{pdfsavepos}
-%   uses.  \cs{gridinterval} is a integer number representing the distance of
-%   two grid lines.  The unit is `scaled point' (sp) both time.
+% \changes{v0.2}{2017/06/05}{prepared for Lua\TeX~0.85}
+% These contain the grid information.  \cs{gridbase} is a integer number
+% representing the absolute y coordinate of the upper end of the
+% grid relative to the same reference point \cs{pdfsavepos}
+% uses.  \cs{gridinterval} is a integer number representing the distance of
+% two grid lines.  The unit is `scaled point' (sp) both time.
 %    \begin{macrocode}
 \newcommand*{\gridbase}{}
 \newcommand*{\gridinterval}{}
@@ -235,14 +278,14 @@
 %   \cs{pdfpagewidth} if this hasn't been done already.
 %    \begin{macrocode}
 \AtBeginDocument{%
-  \ifdim\pdfpageheight=\z@
-    \pdfpageheight=\pageheight
+  \ifdim\gridset at pageheight=\z@
+    \gridset at pageheight=\paperheight
   \fi
-  \ifdim\pdfpagewidth=\z@
-    \pdfpagewidth=\pagewidth
+  \ifdim\gridset at pagewidth=\z@
+    \gridset at pagewidth=\paperwidth
   \fi
   \begingroup
-    \@tempdima=\dimexpr \pdfpageheight - \topmargin - 1in 
+    \@tempdima=\dimexpr \gridset at pageheight - \topmargin - 1in 
                       - \headheight - \headsep 
                       - \topskip \relax
     \@tempcnta=\@tempdima
@@ -256,31 +299,47 @@
 % \end{macro}
 %
 % \begin{macro}{\savepos}
-%   Save current position on the page to the \texttt{aux}-file.  The argument
-%   is a unique name for the position.  The saved informations are:
-%   \begin{itemize}
-%   \item the name of the position,
-%   \item the arabic page number of the page with the position,
-%   \item the grid base, that was valid for this position,
-%   \item the grid interval, that was valid for this position,
-%   \item the x-coordinate of the absolute position,
-%   \item the y-coordinate of the absolute position.
-%   \end{itemize}
+% \changes{v0.2}{2017/06/05}{macro renamed}
+% \begin{macro}{\SavePos}
+% \changes{v0.2}{2017/06/05}{new name}
+% \changes{v0.2}{2017/06/05}{prepared for Lua\TeX~0.85}
+% Save current position on the page to the \texttt{aux}-file.  The argument
+% is a unique name for the position.  The saved informations are:
+% \begin{itemize}
+% \item the name of the position,
+% \item the arabic page number of the page with the position,
+% \item the grid base, that was valid for this position,
+% \item the grid interval, that was valid for this position,
+% \item the x-coordinate of the absolute position,
+% \item the y-coordinate of the absolute position.
+% \end{itemize}
 %    \begin{macrocode}
-\newcommand*{\savepos}[1]{%
+\newcommand*{\SavePos}[1]{%
   \begingroup
-    \pdfsavepos
+    \gridset at savepos
     \protected at write\@auxout{}{%
       \protect\newpos{#1}{\the\count\z@}{\gridbase}{\gridinterval}{%
-        \noexpand\number\pdflastxpos
+        \noexpand\number\gridset at lastxpos
       }{%
-        \noexpand\number\pdflastypos
+        \noexpand\number\gridset at lastypos
       }%
     }%
   \endgroup
 }
+\ifx\savepos\gridset at savepos
+  \PackageInfo{gridset}{LuaTeX detected.\MessageBreak
+    Note, gridset command is \string\SavePos\MessageBreak
+    but not \string\savepos, which is\MessageBreak
+    a LuaTeX primitive
+  }%
+\else
+  \PackageInfo{gridset}{\string\savepos\space defined as an alias of
+    \string\SavePos}%
+  \newcommand*{\savepos}{\SavePos}%
+\fi
 %    \end{macrocode}
 % \end{macro}
+% \end{macro}
 %
 % \begin{macro}{\newpos}
 %   This is the command, that has been written to the \texttt{aux}-file.
@@ -377,10 +436,10 @@
 %
 % \begin{macro}{\vskipnextgrid}
 % \begin{macro}{gridcnt}
-%   Move to next grid position.  The counter \texttt{gridcnt} is used to give
-%   every move to position a unique position name.  The names are
-%   `\texttt{vp!\meta{number of the move to position}}'.  You may use this to
-%   get informations e.g. about the last move to position.
+% Move to next grid position.  The counter \texttt{gridcnt} is used to give
+% every move to position a unique position name.  The names are
+% `\texttt{vp!\meta{number of the move to position}}'.  You may use this to
+% get informations e.g. about the last move to position.
 %    \begin{macrocode}
 \newcounter{gridcnt}
 \newcommand*{\vskipnextgrid}{%
@@ -388,13 +447,13 @@
     \stepcounter{gridcnt}\edef\@tempa{vp!\thegridcnt}%
     \ifvmode
 %    \end{macrocode}
-%   \cs{pdfsavepos} in vertical mode is a problem, because the base line
-%   alignment will be done at least at paragraph breaking.  Because of this,
-%   we have to leave the vertical mode and do it then.  But remark: If you
-%   change the base line skip e.g. changing the font size, the next line would
-%   not be grid aligned!
+% \cs{pdfsavepos} in vertical mode is a problem, because the base line
+% alignment will be done at least at paragraph breaking.  Because of this,
+% we have to leave the vertical mode and do it then.  But remark: If you
+% change the base line skip e.g. changing the font size, the next line would
+% not be grid aligned!
 %    \begin{macrocode}
-      \leavevmode\savepos{\@tempa}%
+      \leavevmode\SavePos{\@tempa}%
       \expandafter\ifx\csname pos@\@tempa @vskip\endcsname\relax
       \else
         \expandafter\ifnum \csname pos@\@tempa @vskip\endcsname =\z@\else
@@ -407,30 +466,49 @@
       \fi
     \else
 %    \end{macrocode}
-%   \cs{pdfsavepos} in horizontal mode is a problem too, because we have to
-%   enter the vertical mode to do vertical skips. Because of this, the remark
-%   is  the same like the vertical mode remark.
+% \cs{pdfsavepos} in horizontal mode is a problem too, because we have to
+% enter the vertical mode to do vertical skips. Because of this, the remark
+% is  the same like the vertical mode remark.
 %    \begin{macrocode}
       \parskip=\z@
-      \savepos{vp!\thegridcnt}%
+      \SavePos{vp!\thegridcnt}%
       \expandafter\ifx\csname pos@\@tempa @vskip\endcsname\relax
       \else
         \expandafter\ifnum \csname pos@\@tempa @vskip\endcsname =\z@\else
-         \PackageInfo{gridset}{%
+          \PackageInfo{gridset}{%
             hmode \string\vskip\csname pos@\@tempa @vskip\endcsname sp%
           }%
-          \vskip -\baselineskip
-          \expandafter\vskip\csname pos@\@tempa @vskip\endcsname sp\relax
+          \vskip \dimexpr -\baselineskip
+                          + \csname pos@\@tempa @vskip\endcsname sp\relax
+%    \end{macrocode}
+% \changes{v0.3}{2020/02/12}{support for twocolumn mode}
+% In twocolumn mode we have to take care that in the second column we reduce
+% the horizontal movement by the width of the first column plus the column
+% separation.
+% Note: This may fail, because the column information may be wrong
+%       outside the output routine. Maybe we should add this information to
+%       \cs{SavePos} or correct the x-pos there.
+%    \begin{macrocode}
+          \leavevmode
           \if at twoside
             \expandafter\ifodd\csname pos@\@tempa @page\endcsname\relax
-              \leavevmode\hskip \dimexpr - 1in - \oddsidemargin - \parindent
+              \hskip \dimexpr -1in - \oddsidemargin - \parindent
+                            \if at twocolumn\if at firstcolumn\else
+                              - \columnwidth - \columnsep
+                            \fi\fi
                               + \csname pos@\@tempa @x\endcsname sp\relax
             \else
-              \leavevmode\hskip \dimexpr - 1in - \evensidemargin - \parindent
+              \hskip \dimexpr -1in - \evensidemargin - \parindent
+                            \if at twocolumn\if at firstcolumn\else
+                              - \columnwidth - \columnsep
+                            \fi\fi
                               + \csname pos@\@tempa @x\endcsname sp\relax
             \fi
           \else
-            \leavevmode\hskip \dimexpr - 1in - \oddsidemargin - \parindent 
+            \hskip \dimexpr -1in - \oddsidemargin - \parindent 
+                            \if at twocolumn\if at firstcolumn\else
+                              - \columnwidth - \columnsep
+                            \fi\fi
                             + \csname pos@\@tempa @x\endcsname sp\relax
           \fi
         \fi
@@ -475,7 +553,7 @@
 \csname endinput\endcsname
 %</FALSE>
 %</package>
-% \fi ^^A meta-comment
+% \fi
 %
 % \section{Example}
 %
@@ -483,7 +561,7 @@
 % runs until no new rerun warning occurs.
 % \iffalse meta-comment
 %<*example>
-% \fi ^^A meta-comment
+% \fi
 %    \begin{macrocode}
 \documentclass[a4paper,12pt]{article}
 \usepackage{gridset}
@@ -499,7 +577,7 @@
 \@whilenum \value{Zeile}<40\do {%
   \stepcounter{Zeile}%
   \theZeile. Zeile:
-  \savepos{\thepage.\theZeile}\thegridinfo{\thepage.\theZeile}\par
+  \SavePos{\thepage.\theZeile}\thegridinfo{\thepage.\theZeile}\par
 }%
 \makeatother
 \clearpage
@@ -508,7 +586,7 @@
 \@whilenum \value{Zeile}<20\do {%
   \stepcounter{Zeile}%
   \theZeile. Zeile:
-  \savepos{\thepage.\theZeile}\theposinfo{\thepage.\theZeile}\par 
+  \SavePos{\thepage.\theZeile}\theposinfo{\thepage.\theZeile}\par 
 }%
 \makeatother
 \clearpage
@@ -518,7 +596,7 @@
 \@whilenum \value{Zeile}<20\do {%
   \stepcounter{Zeile}%
   \theZeile. Zeile:
-  \savepos{\thepage.\theZeile}\theposinfo{\thepage.\theZeile}\par 
+  \SavePos{\thepage.\theZeile}\theposinfo{\thepage.\theZeile}\par 
 }%
 \makeatother
 \clearpage
@@ -556,7 +634,7 @@
 %    \end{macrocode}
 % \iffalse meta-comment
 %</example>
-% \fi ^^A meta-comment
+% \fi
 %
 % \Finale
 %
@@ -564,9 +642,7 @@
 %
 % end of `gridset.dtx'
 %
-% \iffalse meta-comment
 %%% Local Variables:
 %%% mode: docTeX
 %%% TeX-master: t
 %%% End:
-% \fi ^^A meta-comment

Deleted: trunk/Master/texmf-dist/source/latex/gridset/gridset.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/gridset/gridset.ins	2020-02-12 00:47:42 UTC (rev 53761)
+++ trunk/Master/texmf-dist/source/latex/gridset/gridset.ins	2020-02-12 22:21:36 UTC (rev 53762)
@@ -1,90 +0,0 @@
-%%
-%% This is file `gridset.ins',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% gridset.dtx  (with options: `ins')
-%% Copyright (c) Markus Kohm 2008
-%% 
-%% IMPORTANT NOTE:
-%% 
-%% This is a generated file and you are not allowed to distribute it
-%% without the source ot the work.  See below about more informations
-%% about the files the work consists of.
-%% 
-%% This work may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3
-%% 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.3 or later is part of all distributions of LaTeX
-%% version 2003/12/01 or later.
-%%
-%% This work has the LPPL maintenance status "maintained".
-%%
-%% The author of the initial version of these work was
-%% Markus Kohm <komascript at gmx.info>
-%%
-%% This work consists of the files gridset.dtx and README.
-%%
-%% Important Recommendation:
-%%   The LPPL requires that distributions of the Work contain all the files of
-%%   the Work (see ``Important Recommendations'' at lppl.txt).
-%%
-\def\batchfile{gridset.ins}
-  \input docstrip.tex
-
-  \ifToplevel{%
-    \let\ifalpha\iffalse
-  }
-  \keepsilent
-  \askforoverwritefalse
-  \usedir{tex/latex/gridset}
-  \preamble
-Copyright (c) Markus Kohm 2008
-
-IMPORTANT NOTE:
-
-This is a generated file and you are not allowed to distribute it
-without the source ot the work.  See below about more informations
-about the files the work consists of.
-
-\endpreamble
-
-  \generate{%
-    \file{gridset.tex}{\from{gridset.dtx}{tex}}%
-    \file{gridset.ins}{\from{gridset.dtx}{ins}}%
-    \file{gridsetx.sty}{\from{gridset.dtx}{package}}%
-    \file{gridsetexample.tex}{\from{gridset.dtx}{example}}%
-  }
-
-  \ifToplevel{%
-    \Msg{*********************************************************************}
-    \Msg{*}
-    \Msg{* gridset}
-    \Msg{* =======}
-    \Msg{*}
-    \ifalpha% ALPHA
-      \Msg{* THIS IS AN ALPHA VERSION!}
-      \Msg{* DON'T USE IT ONLY TEST IT!}
-      \Msg{*}
-    \fi
-    \Msg{* To finish the installation run}
-    \Msg{* \space\space latex gridset.dtx}
-    \Msg{* or}
-    \Msg{* \space\space pdflatex gridset.dtx}
-    \Msg{* and then copy}
-    \Msg{* \space\space gridset.sty to .../tex/latex/gridset/}
-    \Msg{* \space\space gridset.dvi or gridset.pdf to .../doc/latex/gridset/}
-    \Msg{* \space\space gridset.dtx and README to .../source/latex/gridset/}
-    \Msg{* where .../ is your local TDS tree.}
-    \Msg{* On some systems you'll get the local TDS tree using:}
-    \Msg{* \space\space kpsewhich -var-value=TEXMFLOCAL}
-    \Msg{*}
-    \Msg{*********************************************************************}
-  }
-
-\endinput
-%%
-%% End of file `gridset.ins'.

Modified: trunk/Master/texmf-dist/tex/latex/gridset/gridset.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/gridset/gridset.sty	2020-02-12 00:47:42 UTC (rev 53761)
+++ trunk/Master/texmf-dist/tex/latex/gridset/gridset.sty	2020-02-12 22:21:36 UTC (rev 53762)
@@ -1,249 +1,75 @@
-% \CheckSum{416}
-% \iffalse meta-comment
-%
-% gridset.dtx
-%
+%%
+%% This is file `gridset.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% gridset.dtx  (with options: `package')
+%% 
+%% IMPORTANT NOTE:
+%% 
+%% This is a generated file and you are not allowed to distribute it
+%% without the source ot the work.  See below about more informations
+%% about the files the work consists of.
+%% 
+%% Copyright (C) 2008-2020 Markus Kohm
+%%
 %% This work may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3
+%% 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.3 or later is part of all distributions of LaTeX
-%% version 2003/12/01 or later.
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
 %%
 %% This work has the LPPL maintenance status "maintained".
 %%
-%% The author of the initial version of these work was
-%% Markus Kohm <komascript at gmx.info>
+%% The author and current maintainer of this work is
+%% Markus Kohm <komascript at gmx.info>.
 %%
-%% This work consists of the files gridset.dtx and README.
+%% This work consists of the files gridset.dtx and README.md.
 %%
 %% Important Recommendation:
-%%   The LPPL requires that distributions of the Work contain all the files of
-%%   the Work (see ``Important Recommendations'' at lppl.txt).
+%% The LPPL requires that distributions of the Work contain all the files of
+%% the Work (see ``Important Recommendations'' at lppl.txt).
 %%
-%
-%<*dtx>
-\def\FmtName{LaTeX2e}
-\ifx\FmtName\fmtname
-  % Give me the package or the documentation
-  \ifnum \catcode`\@=12\relax
-    % Give me the documentation
-    \ProvidesFile{gridset.dtx}
-%</dtx>
-%<*dtx|tex|package|example>
-%<package>\ProvidesPackage{gridset}
-%<tex>\ProvidesFile{gridset.tex}
-%<example>\ProvidesFile{gridsetexample.tex}
-                 [2008/11/12 v0.1 grid - aka in-register - setting]
-%</dtx|tex|package|example>
-%<*dtx|tex>
-    \documentclass{ltxdoc}
-    \begin{document}
-    \RecordChanges
-%<*!tex>
-    \GetFileInfo{gridset.dtx}
-%</!tex>
-%<tex>    \GetFileInfo{gridset.tex}
-    \DocInput{gridset.dtx}
-%<tex>\end{document}
-%</dtx|tex>
-%<*dtx>
-    \expandafter\expandafter\expandafter\enddocument
+\ProvidesPackage{gridset}
+                 [2020-02-12 v0.3 grid - a.k.a. in-register - setting]
+\newcommand*{\gridset at luaorpdf}[1]{%
+  \expandafter\newcommand\csname gridset@#1\endcsname{}%
+  \ifcsname pdf#1\endcsname
+    \expandafter\let\csname gridset@#1\expandafter\endcsname
+    \csname pdf#1\endcsname
+  \else
+    \ifcsname #1\endcsname
+      \expandafter\let\csname gridset@#1\expandafter\endcsname
+      \csname #1\endcsname
+    \else
+      \PackageError{gridset}{%
+        neither \expandafter\string\csname #1\endcsname\space
+        nor \xpandafter\string\csname pdf#1\endcsname\space
+        defined%
+      }{This package needs either PDFTeX or LuaTeX or XeTeX.}%
+    \fi
   \fi
-\else
-  % Make the package
-  \def\batchfile{gridset.dtx}
-  \let\batchendinput\endinput
-%</dtx>
-%<*ins>
-%<ins>\def\batchfile{gridset.ins}
-  \input docstrip.tex
-
-  \ifToplevel{%
-    \let\ifalpha\iffalse
-  }
-  \keepsilent
-  \askforoverwritefalse
-  \usedir{tex/latex/gridset}
-  \preamble
-Copyright (c) Markus Kohm 2008
-
-IMPORTANT NOTE:
-
-This is a generated file and you are not allowed to distribute it
-without the source ot the work.  See below about more informations
-about the files the work consists of.
-
-\endpreamble
-
-  \generate{%
-    \file{gridset.tex}{\from{gridset.dtx}{tex}}%
-    \file{gridset.ins}{\from{gridset.dtx}{ins}}%
-    \file{gridsetx.sty}{\from{gridset.dtx}{package}}%
-    \file{gridsetexample.tex}{\from{gridset.dtx}{example}}%
-  }
-
-  \ifToplevel{%
-    \Msg{*********************************************************************}
-    \Msg{*}
-    \Msg{* gridset}
-    \Msg{* =======}
-    \Msg{*}
-    \ifalpha% ALPHA
-      \Msg{* THIS IS AN ALPHA VERSION!}
-      \Msg{* DON'T USE IT ONLY TEST IT!}
-      \Msg{*}
-    \fi
-    \Msg{* To finish the installation run}
-    \Msg{* \space\space latex gridset.dtx}
-    \Msg{* or}
-    \Msg{* \space\space pdflatex gridset.dtx}
-    \Msg{* and then copy}
-    \Msg{* \space\space gridset.sty to .../tex/latex/gridset/}
-    \Msg{* \space\space gridset.dvi or gridset.pdf to .../doc/latex/gridset/}
-    \Msg{* \space\space gridset.dtx and README to .../source/latex/gridset/}
-    \Msg{* where .../ is your local TDS tree.}
-    \Msg{* On some systems you'll get the local TDS tree using:}
-    \Msg{* \space\space kpsewhich -var-value=TEXMFLOCAL}
-    \Msg{*}
-    \Msg{*********************************************************************}
-%<*!ins>
-    \csname fi\endcsname\csname fi\endcsname\endinput
-%</!ins>
-  }
-
-%</ins>
-%<*dtx>
-\fi
-\csname batchendinput\endcsname
-%</dtx>
-% \fi ^^A meta-comment
-%
-% \title{Semi-Manual Grid Setting Using \textsf{gridset}\iftrue^^A ALPHA
-%   \footnote{This is an alpha version! Don't use it! Only test it! There's no
-%     support and everything may change!}\fi
-% }
-% \author{Markus Kohm}
-% \date{\filedate~\fileversion}
-% \maketitle
-% \begin{abstract}
-%   Grid setting\,---\,also known as strict in-register setting\,---\,is
-%   something, that should be done for a lot of documents but is not easy
-%   using \LaTeX{}.  Package \textsf{gridset} helps to get the information
-%   needed for grid setting.  It does not implement auto grid setting, but
-%   there is a command \cs{vskipnextgrid}, that moves to the next grid
-%   position.  This may be enough under some circumstances.  In other
-%   circumstances it may fail.  So \textsf{gridset} is only one more step for
-%   grid setting not a complete solution.
-% \end{abstract}
-% \tableofcontents
-% \section{User Manual}
-%
-% \DescribeMacro{\gridinterval}%
-% This macro contains a number without unit!  The number is the distance
-% between two grid lines in unit `scale points' (sp).  You may set it so
-% another value using, e.g.
-% \begin{flushleft}
-%  |\newlength{\|\meta{name of your length}|}|\\
-%  |\setlength{\|\meta{name of your length}|}{|\meta{new length value}|}|\\
-%  |\newcounter{\|\meta{name of your counter}|}|\\
-%  |\setcounter{\|\meta{name of your counter}|}{\|\meta{name of your
-%        length}|}|\\
-%  |\edef\gridinterval{\|\meta{name of your length}|}|\\
-% \end{flushleft}
-%
-% \DescribeMacro{\gridbase}%
-% This macro contains an integer number, that represents the y-coordinate of
-% the upper start of the grid.  If you want to change it, just save a position
-% and \cs{edef} the \cs{gridbase} to the y-pos of that position.
-%
-% Most time you don't need to change \cs{gridinterval} and \cs{gridposition},
-% because they are initialized to a base line grid at start of first page.
-% Because of this, it doesn't matter, that changing them is not really user
-% friendly.
-%
-% \DescribeMacro{\savepos}%
-% \cs{savepos}\marg{unique name} saves informations about the current position
-% to the \texttt{aux}-file.  These informations are read at next \LaTeX{} run
-% and may be used (see \cs{the\dots} commands below) then. The \meta{unique
-% name} has to be a position name, that is unique for all saved position
-% informations of the current document.
-%
-% \DescribeMacro{\vskipnextgrid}
-% This command moves to the next grid position.  To achieve this, a position
-% information is saved at this and used at next \LaTeX{} run.  The used name
-% of the position information is \texttt{vb!\meta{number of
-% skip}}. \meta{number of skip} is the number of the current
-% \cs{vskipnextgrid} usage.  Counter \texttt{gridcnt} is used to number the
-% usage of \cs{vskipnextgrid}.
-%
-% \DescribeMacro{\thegridinfo}
-% \cs{thegridinfo}\marg{name} outputs
-% \begin{itemize}
-% \item arabic page number of the named position,
-% \item grid base, that was valid saving the information of the named
-%   position,
-% \item grid interval, that was valid saving the information of the named
-%   position,
-% \item x-coordinate of the named position,
-% \item y-coordinate of the named position.
-% \end{itemize}
-% The coordinates and intervals are numbers without units.  The unit is `scale
-% points' (sp).
-%
-% \DescribeMacro{\theposinfo}
-% \cs{theposinfo}\marg{name} outputs
-% \begin{itemize}
-% \item y-coordinate of the named position,
-% \item grid line number (first is 0) of the next grid position,
-% \item offset of the next grid position from grid base,
-% \item distance to the next grid position.
-% \end{itemize}
-% The coordinates, offsets and distances are numbers without units.  The unit
-% is `scale points' (sp).
-%
-% \DescribeMacro{\theypos}
-% \cs{theypos}\marg{name} outputs the y-coordinate of the named position.
-%
-%
-% \StopEventually{\PrintIndex\PrintChanges}
-%
-% \section{Implementation}
-%
-% \iffalse meta-comment
-%<*package>
-% \fi ^^A meta-comment
-%    \begin{macrocode}
-%<package>\ProvidesPackage{gridset}[\fileversion\space (package)]
-%    \end{macrocode}
-%
-% \begin{macro}{\gridbase}
-% \begin{macro}{\gridinterval}
-%   These contain the grid information.  \cs{gridbase} is a integer number
-%   representing the absolute y coordinate of the upper end of the
-%   grid relative to the same reference point \cs{pdfsavepos}
-%   uses.  \cs{gridinterval} is a integer number representing the distance of
-%   two grid lines.  The unit is `scaled point' (sp) both time.
-%    \begin{macrocode}
+}
+\gridset at luaorpdf{pageheight}
+\gridset at luaorpdf{pagewidth}
+\gridset at luaorpdf{savepos}
+\gridset at luaorpdf{lastxpos}
+\gridset at luaorpdf{lastypos}
 \newcommand*{\gridbase}{}
 \newcommand*{\gridinterval}{}
-%    \end{macrocode}
-%   \cs{gridbase} and \cs{gridinterval} need to be initialized at the start of
-%   the first page (fixme: shouldn't this be done at the start of every
-%   page?).  We use this occasion to also initialize \cs{pdfpageheight} and
-%   \cs{pdfpagewidth} if this hasn't been done already.
-%    \begin{macrocode}
 \AtBeginDocument{%
-  \ifdim\pdfpageheight=\z@
-    \pdfpageheight=\pageheight
+  \ifdim\gridset at pageheight=\z@
+    \gridset at pageheight=\paperheight
   \fi
-  \ifdim\pdfpagewidth=\z@
-    \pdfpagewidth=\pagewidth
+  \ifdim\gridset at pagewidth=\z@
+    \gridset at pagewidth=\paperwidth
   \fi
   \begingroup
-    \@tempdima=\dimexpr \pdfpageheight - \topmargin - 1in 
-                      - \headheight - \headsep 
+    \@tempdima=\dimexpr \gridset at pageheight - \topmargin - 1in
+                      - \headheight - \headsep
                       - \topskip \relax
     \@tempcnta=\@tempdima
     \xdef\gridbase{\the\@tempcnta}%
@@ -251,67 +77,29 @@
     \xdef\gridinterval{\the\@tempcnta}%
   \endgroup
 }
-%    \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\savepos}
-%   Save current position on the page to the \texttt{aux}-file.  The argument
-%   is a unique name for the position.  The saved informations are:
-%   \begin{itemize}
-%   \item the name of the position,
-%   \item the arabic page number of the page with the position,
-%   \item the grid base, that was valid for this position,
-%   \item the grid interval, that was valid for this position,
-%   \item the x-coordinate of the absolute position,
-%   \item the y-coordinate of the absolute position.
-%   \end{itemize}
-%    \begin{macrocode}
-\newcommand*{\savepos}[1]{%
+\newcommand*{\SavePos}[1]{%
   \begingroup
-    \pdfsavepos
+    \gridset at savepos
     \protected at write\@auxout{}{%
       \protect\newpos{#1}{\the\count\z@}{\gridbase}{\gridinterval}{%
-        \noexpand\number\pdflastxpos
+        \noexpand\number\gridset at lastxpos
       }{%
-        \noexpand\number\pdflastypos
+        \noexpand\number\gridset at lastypos
       }%
     }%
   \endgroup
 }
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newpos}
-%   This is the command, that has been written to the \texttt{aux}-file.
-%   Reading the \texttt{aux}-file it defines several position dependant macros
-%   to store the position information.  Reading the \texttt{aux}-file while
-%   \cs{begin{document}} a double definition test is done.  Reading the
-%   \texttt{aux}-file while \cs{end{document}} a test is done, if the position
-%   has been changed and notes the user about needed additional \LaTeX{} runs.
-%   (fixme: shouldn't the test be done with the x- and the y-coordinate
-%   instead of the vskip only?)
-%   The defined macros are:
-%   \begin{description}
-%   \item[\cs{pos@\meta{position name}@page}] the arabic page number of the
-%     position
-%   \item[\cs{pos@\meta{position name}@base}] the valid grid base while
-%     saving the position
-%   \item[\cs{pos@\meta{position name}@interval}] the valid grid interval
-%     while saving the position
-%   \item[\cs{pos@\meta{position name}@x}] the x-coordinate of the position
-%   \item[\cs{pos@\meta{position name}@y}] the y-coordinate of the postion
-%   \item[\cs{pos@\meta{position name}@line}] the number of the next grid line
-%     for the position (first grid line has number 0)
-%   \item[\cs{pos@\meta{position name}@offset}] distance of the next grid line
-%     from the grid base
-%   \item[\cs{pos@\meta{position name}@vskip}] distance to the next grid line
-%     for the position
-%   \end{description}
-%   All values are integers. The unit to all values is `scaled points'
-%   (sp). See \cs{pdfsavepos} at the pdf\TeX{} user manual for more
-%   information.
-%    \begin{macrocode}
+\ifx\savepos\gridset at savepos
+  \PackageInfo{gridset}{LuaTeX detected.\MessageBreak
+    Note, gridset command is \string\SavePos\MessageBreak
+    but not \string\savepos, which is\MessageBreak
+    a LuaTeX primitive
+  }%
+\else
+  \PackageInfo{gridset}{\string\savepos\space defined as an alias of
+    \string\SavePos}%
+  \newcommand*{\savepos}{\SavePos}%
+\fi
 \newcommand*{\newpos}[6]{%
   \grid at unique@test{#1}{#2}%
   \expandafter\global\@namedef{pos@#1 at page}{#2}%
@@ -326,7 +114,7 @@
     \expandafter\xdef\csname pos@#1 at line\endcsname{\the\@tempcnta}%
     \@tempcnta=\numexpr \@tempcnta * \@nameuse{pos@#1 at interval}\relax
     \expandafter\xdef\csname pos@#1 at offset\endcsname{\the\@tempcnta}%
-    \@tempcnta=\numexpr \@nameuse{pos@#1 at y} 
+    \@tempcnta=\numexpr \@nameuse{pos@#1 at y}
                       - ( \@nameuse{pos@#1 at base} - \@tempcnta )\relax
     \expandafter\let\expandafter\@tempa\csname pos@#1 at vskip\endcsname%
     \expandafter\xdef\csname pos@#1 at vskip\endcsname{\the\@tempcnta}%
@@ -335,10 +123,6 @@
     \fi
   \endgroup
 }
-%    \end{macrocode}
-% \begin{macro}{\grid at unique@test}
-%   A very simple test to warn if a position name isn't unique.
-%    \begin{macrocode}
 \newcommand*{\grid at unique@test}[2]{%
   \expandafter\ifx\csname pos@#1 at page\endcsname\relax\else
     \PackageError{gridset}{position `#1' is not unique.\@gobble}{%
@@ -355,13 +139,6 @@
 \AtBeginDocument{%
   \global\let\grid at unique@test\@gobble
 }
-%    \end{macrocode}
-% \end{macro}
-% \begin{macro}{\grid at ReRunMessage}
-%   The change test will be done for each \cs{newpos} but one user information
-%   at the end of the document should be enough.  So we use a message macro,
-%   that destroys itself after first usage.
-%    \begin{macrocode}
 \newcommand*\grid at ReRunMessage{}
 \AtBeginDocument{%
   \renewcommand*\grid at ReRunMessage{%
@@ -371,30 +148,12 @@
     \global\let\grid at ReRunMessage\relax
   }%
 }
-%    \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\vskipnextgrid}
-% \begin{macro}{gridcnt}
-%   Move to next grid position.  The counter \texttt{gridcnt} is used to give
-%   every move to position a unique position name.  The names are
-%   `\texttt{vp!\meta{number of the move to position}}'.  You may use this to
-%   get informations e.g. about the last move to position.
-%    \begin{macrocode}
 \newcounter{gridcnt}
 \newcommand*{\vskipnextgrid}{%
   \begingroup
     \stepcounter{gridcnt}\edef\@tempa{vp!\thegridcnt}%
     \ifvmode
-%    \end{macrocode}
-%   \cs{pdfsavepos} in vertical mode is a problem, because the base line
-%   alignment will be done at least at paragraph breaking.  Because of this,
-%   we have to leave the vertical mode and do it then.  But remark: If you
-%   change the base line skip e.g. changing the font size, the next line would
-%   not be grid aligned!
-%    \begin{macrocode}
-      \leavevmode\savepos{\@tempa}%
+      \leavevmode\SavePos{\@tempa}%
       \expandafter\ifx\csname pos@\@tempa @vskip\endcsname\relax
       \else
         \expandafter\ifnum \csname pos@\@tempa @vskip\endcsname =\z@\else
@@ -406,31 +165,36 @@
         \fi
       \fi
     \else
-%    \end{macrocode}
-%   \cs{pdfsavepos} in horizontal mode is a problem too, because we have to
-%   enter the vertical mode to do vertical skips. Because of this, the remark
-%   is  the same like the vertical mode remark.
-%    \begin{macrocode}
       \parskip=\z@
-      \savepos{vp!\thegridcnt}%
+      \SavePos{vp!\thegridcnt}%
       \expandafter\ifx\csname pos@\@tempa @vskip\endcsname\relax
       \else
         \expandafter\ifnum \csname pos@\@tempa @vskip\endcsname =\z@\else
-         \PackageInfo{gridset}{%
+          \PackageInfo{gridset}{%
             hmode \string\vskip\csname pos@\@tempa @vskip\endcsname sp%
           }%
-          \vskip -\baselineskip
-          \expandafter\vskip\csname pos@\@tempa @vskip\endcsname sp\relax
+          \vskip \dimexpr -\baselineskip
+                          + \csname pos@\@tempa @vskip\endcsname sp\relax
+          \leavevmode
           \if at twoside
             \expandafter\ifodd\csname pos@\@tempa @page\endcsname\relax
-              \leavevmode\hskip \dimexpr - 1in - \oddsidemargin - \parindent
+              \hskip \dimexpr -1in - \oddsidemargin - \parindent
+                            \if at twocolumn\if at firstcolumn\else
+                              - \columnwidth - \columnsep
+                            \fi\fi
                               + \csname pos@\@tempa @x\endcsname sp\relax
             \else
-              \leavevmode\hskip \dimexpr - 1in - \evensidemargin - \parindent
+              \hskip \dimexpr -1in - \evensidemargin - \parindent
+                            \if at twocolumn\if at firstcolumn\else
+                              - \columnwidth - \columnsep
+                            \fi\fi
                               + \csname pos@\@tempa @x\endcsname sp\relax
             \fi
           \else
-            \leavevmode\hskip \dimexpr - 1in - \oddsidemargin - \parindent 
+            \hskip \dimexpr -1in - \oddsidemargin - \parindent
+                            \if at twocolumn\if at firstcolumn\else
+                              - \columnwidth - \columnsep
+                            \fi\fi
                             + \csname pos@\@tempa @x\endcsname sp\relax
           \fi
         \fi
@@ -438,19 +202,6 @@
     \fi
   \endgroup
 }
-%    \end{macrocode}
-%   (fixme: A better solution would be to first move and then set the
-%   position.  But that solution needs some more tests and maybe some more
-%   ideas, because after moving the position is on grid and so the saved x-pos
-%   would be on grid.)
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\thegridinfo}
-% \begin{macro}{\theposinfo}
-% \begin{macro}{\theypos}
-% Some informations about the grid (valid for a position) or the position.
-%    \begin{macrocode}
 \newcommand*{\thegridinfo}[1]{%
   page=\@nameuse{pos@#1 at page},
   base=\@nameuse{pos@#1 at base},
@@ -465,108 +216,6 @@
   movedown=\@nameuse{pos@#1 at vskip}%
 }
 \newcommand*{\theypos}[1]{\@nameuse{pos@#1 at y}}
-%    \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \iffalse meta-comment
-%<*FALSE>
-\csname endinput\endcsname
-%</FALSE>
-%</package>
-% \fi ^^A meta-comment
-%
-% \section{Example}
-%
-% You may try the following example document.  You have to do several \LaTeX{}
-% runs until no new rerun warning occurs.
-% \iffalse meta-comment
-%<*example>
-% \fi ^^A meta-comment
-%    \begin{macrocode}
-\documentclass[a4paper,12pt]{article}
-\usepackage{gridset}
-\usepackage{blindtext}
-\raggedbottom
-
-\pagestyle{myheadings}
-
-\begin{document}
-\markright{gridbase=\gridbase, gridinterval=\gridinterval\ without move down}%
-\newcounter{Zeile}%
-\makeatletter
-\@whilenum \value{Zeile}<40\do {%
-  \stepcounter{Zeile}%
-  \theZeile. Zeile:
-  \savepos{\thepage.\theZeile}\thegridinfo{\thepage.\theZeile}\par
-}%
-\makeatother
-\clearpage
-\setcounter{Zeile}{0}
-\makeatletter
-\@whilenum \value{Zeile}<20\do {%
-  \stepcounter{Zeile}%
-  \theZeile. Zeile:
-  \savepos{\thepage.\theZeile}\theposinfo{\thepage.\theZeile}\par 
-}%
-\makeatother
-\clearpage
-\parskip=.5\baselineskip
-\setcounter{Zeile}{0}
-\makeatletter
-\@whilenum \value{Zeile}<20\do {%
-  \stepcounter{Zeile}%
-  \theZeile. Zeile:
-  \savepos{\thepage.\theZeile}\theposinfo{\thepage.\theZeile}\par 
-}%
-\makeatother
-\clearpage
-\markright{gridbase=\gridbase, gridinterval=\gridinterval\ with real move down
-at vmode}%
-\parskip=.5\baselineskip
-\setcounter{Zeile}{0}
-\makeatletter
-\@whilenum \value{Zeile}<25\do {%
-  \stepcounter{Zeile}%
-  \vskipnextgrid\theZeile. Zeile: \theposinfo{vp!\thegridcnt}\par
-}%
-\makeatother
-\clearpage
-\markright{gridbase=\gridbase, gridinterval=\gridinterval\ with real move down
-at hmode}%
-\parskip=.5\baselineskip
-\setcounter{Zeile}{0}
-\makeatletter
-\@whilenum \value{Zeile}<25\do {%
-  \stepcounter{Zeile}%
-  \theZeile. Zeile: \vskipnextgrid\theposinfo{vp!\thegridcnt}\par
-}%
-\makeatother
-\clearpage
-\parskip=0pt
-\blindtext
-\begin{itemize}
-\item Test
-\item Test
-\end{itemize}
-\vskipnextgrid\theposinfo{vp!\thegridcnt}\blindtext
-
-\end{document}
-%    \end{macrocode}
-% \iffalse meta-comment
-%</example>
-% \fi ^^A meta-comment
-%
-% \Finale
-%
 \endinput
-%
-% end of `gridset.dtx'
-%
-% \iffalse meta-comment
-%%% Local Variables:
-%%% mode: docTeX
-%%% TeX-master: t
-%%% End:
-% \fi ^^A meta-comment
+%%
+%% End of file `gridset.sty'.



More information about the tex-live-commits mailing list.