texlive[56665] Master/texmf-dist: gentombow (14oct20)

commits+karl at tug.org commits+karl at tug.org
Wed Oct 14 23:46:12 CEST 2020


Revision: 56665
          http://tug.org/svn/texlive?view=revision&revision=56665
Author:   karl
Date:     2020-10-14 23:46:12 +0200 (Wed, 14 Oct 2020)
Log Message:
-----------
gentombow (14oct20)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/gentombow/README.md
    trunk/Master/texmf-dist/doc/latex/gentombow/bounddvi-en.pdf
    trunk/Master/texmf-dist/doc/latex/gentombow/bounddvi.pdf
    trunk/Master/texmf-dist/doc/latex/gentombow/gentombow-ja.pdf
    trunk/Master/texmf-dist/doc/latex/gentombow/gentombow-ja.tex
    trunk/Master/texmf-dist/doc/latex/gentombow/gentombow.pdf
    trunk/Master/texmf-dist/doc/latex/gentombow/gentombow.tex
    trunk/Master/texmf-dist/doc/latex/gentombow/pxgentombow.pdf
    trunk/Master/texmf-dist/tex/latex/gentombow/bounddvi.sty
    trunk/Master/texmf-dist/tex/latex/gentombow/gentombow.sty
    trunk/Master/texmf-dist/tex/latex/gentombow/pxgentombow.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/tex/latex/gentombow/pxesopic.sty
    trunk/Master/texmf-dist/tex/latex/gentombow/pxpdfpages.sty
    trunk/Master/texmf-dist/tex/latex/gentombow/pxtextpos.sty

Modified: trunk/Master/texmf-dist/doc/latex/gentombow/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/gentombow/README.md	2020-10-14 21:45:46 UTC (rev 56664)
+++ trunk/Master/texmf-dist/doc/latex/gentombow/README.md	2020-10-14 21:46:12 UTC (rev 56665)
@@ -3,7 +3,17 @@
 This bundle provides a LaTeX package for generating Japanese-style
 crop marks (called 'tombow' in Japanese) for practical use in
 self-publishing.
+The core feature of "gentombow.sty" is based on pLaTeX kernel.
 
+## Supported engines
+
+All packages except bounddvi.sty works with the followings:
+- LaTeX + dvips/dvipdfmx
+- pLaTeX/upLaTeX + dvips/dvipdfmx
+- pdfLaTeX
+- LuaLaTeX
+- XeLaTeX
+
 ## Bundle contents
 
 - gentombow.sty:
@@ -16,12 +26,24 @@
     Set papersize special to DVI file.
     Can be used on LaTeX/pLaTeX/upLaTeX (with DVI output mode)
     with dvips or dvipdfmx drivers.
-    Old version (v6.0) of this package, written by Koichi INOUE
-    in 2004, is available at
-    https://www.ma.ns.tcu.ac.jp/Pages/TeX/bounddvi.sty.html
-    (dead link).
-    Now it is maintained by Hironobu Yamashita by his courtesy.
+    Old version (v6.0) was written by Koichi INOU in 2004
+    (https://www.ma.ns.tcu.ac.jp/Pages/TeX/bounddvi.sty.html),
+    and incorporated into this bundle by his courtesy.
 
+## Miscellaneous patches
+
+Some packages are unaware of crop marks defined in "gentombow";
+to cope with those packages, patches are provided here.
+- pxtextpos.sty:
+    Patch for textpos.sty (by Norman Gray).
+- pxesopic.sty:
+    Patch for eso-pic.sty (by Rolf Niepraschk).
+- pxpdfpages.sty:
+    Patch for pdfpages.sty (by Andreas Matthias).
+
+These patches can also be used independent of "gentombow",
+to avoid problems with crop marks on pLaTeX and upLaTeX.
+
 ## Character encoding
 
 All the package files (.sty) contain ASCII characters only.
@@ -44,6 +66,6 @@
 
 ## Release Date
 
-2020-09-25
+2020-10-14
 
 Hironobu Yamashita

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

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

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

Modified: trunk/Master/texmf-dist/doc/latex/gentombow/gentombow-ja.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/gentombow/gentombow-ja.tex	2020-10-14 21:45:46 UTC (rev 56664)
+++ trunk/Master/texmf-dist/doc/latex/gentombow/gentombow-ja.tex	2020-10-14 21:46:12 UTC (rev 56665)
@@ -3,14 +3,10 @@
   \epTeXinputencoding utf8    % ensure utf-8 encoding for platex
 \fi
 
+\RequirePackage{plautopatch}% pldocverb
 \documentclass[a4paper,dvipdfmx]{jsarticle}
 \usepackage{doc}
 \makeatletter
-%%% import from jltxdoc.cls
-\def\verb{\relax\ifmmode\hbox\else\leavevmode\vadjust{}\fi
-  \bgroup \let\do\do at noligs \verbatim at nolig@list
-    \ttfamily \verb at eol@error \let\do\@makeother \dospecials
-    \@ifstar{\@sverb}{\@vobeyspaces \frenchspacing \@sverb}}
 \xspcode"5C=3 %% \
 \xspcode"22=3 %% "
 %%% dangerous bend
@@ -207,7 +203,11 @@
 なお、ここでも用紙サイズが横長の場合は自動的に出力も横長になり、
 縦長の場合は自動的に縦長になります。
 
-オプションは\jMeta{トンボ形式}\texttt{-}\jMeta{出力サイズ}の書式で与えます。
+オプションは\jMeta{トンボ形式}\texttt{-}\jMeta{出力サイズ}の書式
+\footnote{他のパッケージで見られるようなkey=value形式ではないので
+注意してください。このような特殊なオプション書式を用いているのは、
+オプション名が他のクラスファイルやパッケージと衝突する可能性を
+小さくするためです。}で与えます。
 トンボ形式は、p\LaTeX の標準クラスと同じで
 \verb+tombow+, \verb+tombo+, \verb+mentuke+のいずれかを選びます
 (\verb+tombow+はジョブ情報を表示し、\verb+tombo+は表示しません。
@@ -453,6 +453,7 @@
                          \verb+\settombowbleed+が\verb+/TrimBox+に反映されな
                          かったバグの修正
   \item 2019/07/21 v0.9k \textsf{pdfx}パッケージとの整合性をとる改良
+  \item 2020/10/14 v0.9l \textsf{plautopatch}からトンボ対策パッチを取り込み
 \end{itemize}
 
 \end{document}

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

Modified: trunk/Master/texmf-dist/doc/latex/gentombow/gentombow.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/gentombow/gentombow.tex	2020-10-14 21:45:46 UTC (rev 56664)
+++ trunk/Master/texmf-dist/doc/latex/gentombow/gentombow.tex	2020-10-14 21:46:12 UTC (rev 56665)
@@ -301,6 +301,7 @@
                          Fix a bug that \verb+\settombowbleed+ is not
                          considered by \verb+/TrimBox+.
   \item 2019/07/21 v0.9k Support \textsf{pdfx} package.
+  \item 2020/10/14 v0.9l Import tombow-related patches from \textsf{plautopatch}.
 \end{itemize}
 
 \end{document}

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

Modified: trunk/Master/texmf-dist/tex/latex/gentombow/bounddvi.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/gentombow/bounddvi.sty	2020-10-14 21:45:46 UTC (rev 56664)
+++ trunk/Master/texmf-dist/tex/latex/gentombow/bounddvi.sty	2020-10-14 21:46:12 UTC (rev 56665)
@@ -1,6 +1,6 @@
 %
 % bounddvi.sty
-% 2020/09/25 v8.0-v7.0 h.y.acetaminophen [at] gmail.com
+% 2020/10/08 v8.2-v7.0 h.y.acetaminophen [at] gmail.com
 % 2004/12/15 v6.0-v1.0 inoue [at] ma.ns.tcu.ac.jp
 %
 % This package, originally written by Koichi Inoue
@@ -10,16 +10,8 @@
 %
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{bounddvi}[2020/09/25 v8.0 bounddvi]
+\ProvidesPackage{bounddvi}[2020/10/08 v8.2 bounddvi]
 
-% catcode trick to hide \iftombow ... \else ... \fi
-% since \iftombow is defined only in pLaTeX.
-\ifx\pfmtname\@undefined
-  \catcode`\Q=14\relax
-\else
-  \catcode`\Q=9\relax
-\fi
-
 % Note: graphics/color drivers
 %  - dvips.def 2016/07/10 v3.1a or later
 %  - dvipdfmx.def 2016/07/10 v4.12 or later
@@ -28,51 +20,67 @@
 % setpagesize option (= default since 2016) and \mag equals
 % to 1000, we can exploit its routine.
 % (they are using \AtBeginDocument{\AtBeginDvi{...}})
-% However, these .def files do _not_ care about tombow by pLaTeX;
-% so, we set \stock{width,height} to invoke stock test in those
+% However, these .def files do _not_ care about tombow; so,
+% we set \stock{width,height} to invoke stock test in those
 % files (probably meant for memoir.cls).
-Q \iftombow
-Q   % if \stockwidth/\stockheight are not available,
-Q   % define them now
-Q   \ifx\stockwidth\@undefined \newdimen\stockwidth \fi
-Q   \ifx\stockheight\@undefined \newdimen\stockheight \fi
-Q   % if \stockwidth already has effective value, do nothing;
-Q   % otherwise assume pLaTeX-style tombow and set it to
-Q   % \paperwidth + 2in (similar for \stockheight)
-Q   \ifdim\stockwidth>\z@\else
-Q     \stockwidth\paperwidth \advance\stockwidth2in
-Q   \fi
-Q   \ifdim\stockheight>\z@\else
-Q     \stockheight\paperheight \advance\stockheight2in
-Q   \fi
-Q \fi
 
-% reset catcode trick
-\catcode`\Q=11\relax
+% detection of \iftombow status is delayed until \AtBeginDocument,
+% to support both (u)pLaTeX kernel and ``gentombow.sty''
+\def\bddv at maybe@ensure at stock{%
+  \ifx\tombowtrue\@undefined
+    \let\bddv at ensure@stock\relax % skip if-tokens
+  \fi
+  \bddv at ensure@stock}
 
+% when \iftombow == \iftrue, we also need \stock{width,height}
+\def\bddv at ensure@stock{%
+  \iftombow
+    % if \stockwidth/\stockheight are not available,
+    % define them now
+    \ifx\stockwidth\@undefined \newdimen\stockwidth \fi
+    \ifx\stockheight\@undefined \newdimen\stockheight \fi
+    % if \stockwidth already has effective value, do nothing;
+    % otherwise assume pLaTeX-style tombow and set it to
+    % \paperwidth + 2in (similar for \stockheight)
+    \ifdim\stockwidth>\z@\else
+      \stockwidth\paperwidth \advance\stockwidth2in
+    \fi
+    \ifdim\stockheight>\z@\else
+      \stockheight\paperheight \advance\stockheight2in
+    \fi
+  \fi
+}
+
+% prepare actual papersize special
+\def\bddv at emit@papersize{%
+  \begingroup
+    % if \stockwidth/\stockheight are defined & have effective
+    % values, copy them to \paperwidth/\paperheight
+    % for current group
+    \ifx\stockwidth\@undefined\else \ifdim\stockwidth>\z@
+      \paperwidth\stockwidth
+    \fi\fi
+    \ifx\stockheight\@undefined\else \ifdim\stockheight>\z@
+      \paperheight\stockheight
+    \fi\fi
+    % adjust for \mag and emit papersize special
+    \divide\paperwidth\@m\multiply\paperwidth\mag
+    \divide\paperheight\@m\multiply\paperheight\mag
+    \special{papersize=\the\paperwidth,\the\paperheight}%
+  \endgroup
+}
+
 %% Since LaTeX2e 2020-10-01, \@begindocumenthook is deprecated
 %% and \UseHook{begindocument} etc. are used.
 %% This code appends papersize special to the _end_ of the hook.
 %% (Note: support for old dvips is removed.)
-\ifx\AddToHook\@undefined\else
-  \AtBeginDocument{\AtBeginDvi{%
-    \begingroup
-      % if \stockwidth/\stockheight are defined & have effective
-      % values, copy them to \paperwidth/\paperheight
-      % for current group
-      \ifx\stockwidth\@undefined\else \ifdim\stockwidth>\z@
-        \paperwidth\stockwidth
-      \fi\fi
-      \ifx\stockheight\@undefined\else \ifdim\stockheight>\z@
-        \paperheight\stockheight
-      \fi\fi
-      % adjust for \mag and emit papersize special
-      \divide\paperwidth\@m\multiply\paperwidth\mag
-      \divide\paperheight\@m\multiply\paperheight\mag
-      \special{papersize=\the\paperwidth,\the\paperheight}%
-    \endgroup}}
-  \expandafter\endinput
-\fi
+\providecommand\IfFormatAtLeastTF{\@ifl at t@r\fmtversion}
+\IfFormatAtLeastTF{2020-10-01}{%
+  \AtBeginDocument{%
+    \bddv at maybe@ensure at stock
+    \AtBeginDvi{\bddv at emit@papersize}}%
+  \endinput
+}{}
 
 %% The rest of this package is meant for
 %% LaTeX2e 2020-02-02 PL5 or older.
@@ -79,23 +87,17 @@
 
 % following code is almost equivalent to
 %   \AtBeginDocument{\AtBeginDvi{...}}
-% however, we append the specification to the _beginning_ of
-% \@begindocumenthook; this ensures proper papersize when
-% dvips (TeX Live 2016 or earlier) is used.
+% however, we put into the _beginning_ of \@begindocumenthook;
+% this ensures proper papersize when old dvips
+% (TeX Live 2016 or earlier) is used.
+% also, note that old pLaTeX (before 2016/07/01) needs \yoko
+% at the beginning of \AtBeginDvi.
 \begingroup
-\def\@prependto at begindocumenthook{\global\setbox\@begindvibox
-  \vbox{\csname yoko\endcsname\unvbox\@begindvibox
-    \begingroup
-      \ifx\stockwidth\@undefined\else \ifdim\stockwidth>\z@
-        \paperwidth\stockwidth
-      \fi\fi
-      \ifx\stockheight\@undefined\else \ifdim\stockheight>\z@
-        \paperheight\stockheight
-      \fi\fi
-      \divide\paperwidth\@m\multiply\paperwidth\mag
-      \divide\paperheight\@m\multiply\paperheight\mag
-      \special{papersize=\the\paperwidth,\the\paperheight}%
-    \endgroup}}
+\def\@prependto at begindocumenthook{%
+  \bddv at maybe@ensure at stock
+  \global\setbox\@begindvibox\vbox{%
+    \csname yoko\endcsname\unvbox\@begindvibox
+    \bddv at emit@papersize}}
 \toks@\expandafter\expandafter\expandafter
   {\expandafter\@prependto at begindocumenthook\@begindocumenthook}
 \xdef\@begindocumenthook{\the\toks@}

Modified: trunk/Master/texmf-dist/tex/latex/gentombow/gentombow.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/gentombow/gentombow.sty	2020-10-14 21:45:46 UTC (rev 56664)
+++ trunk/Master/texmf-dist/tex/latex/gentombow/gentombow.sty	2020-10-14 21:46:12 UTC (rev 56665)
@@ -8,7 +8,7 @@
 
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{gentombow}
-    [2019/07/21 v0.9k Generate crop mark 'tombow']
+    [2020/10/14 v0.9l Generate crop mark 'tombow']
 \def\pxgtmb at pkgname{gentombow}
 \@namedef{ver at pxgentombow.sty}{}% fake
 
@@ -19,7 +19,8 @@
 % case 2: pdfLaTeX etc.
 % case 1: pLaTeX2e <2018-04-01>+2 or older
 % case 0: pLaTeX2e <2018-05-20> or newer
-\ifx\pfmtversion\@undefined
+% --- checked plcore.ltx in platex 2020/09/28 v1.3g
+\ifx\pfmtname\@undefined
   \@ifpackageloaded{luatexja}{}{\chardef\pxgtmb at errlevel=\tw@}
 \fi
 \ifnum\pxgtmb at errlevel<\tw@
@@ -615,12 +616,15 @@
     \def\pxgtmb at driver{x}
   \fi
   % required for putting \special to every page
-  \ifx\pfmtname\@undefined
-    \RequirePackage{atbegshi}
-  \else
-    \IfFileExists{pxatbegshi.sty}
-                 {\RequirePackage{pxatbegshi}}
-                 {\RequirePackage{atbegshi}}
+  \RequirePackage{atbegshi}
+  \ifx\pfmtname\@undefined\else
+    \ifx\AtBegShi at Output\@undefined
+      % LaTeX2e 2020-10-01: an emulation by ``atbegshi-ltx.sty''
+      % => pLaTeX2e 2020-10-01 natively supports it
+    \else
+      % older: the real ``atbegshi.sty'' is loaded
+      \IfFileExists{pxatbegshi.sty}{\RequirePackage{pxatbegshi}}{}
+    \fi
   \fi
   % do it
   \if x\pxgtmb at driver
@@ -732,34 +736,8 @@
 \@onlypreamble\settombowbleed
 
 %% patch internal of pdfpages.sty to work with tombow
-%% (tested on pdfpages 2017/10/31 v0.5l)
-%% Note the code is the same as that of pxpdfpages.sty,
-%% but reserved here since gentombow.sty can be used on
-%% any LaTeX format
-%% (cf. pxpdfpages.sty is restricted to (u)pLaTeX)
 \def\pxgtmb at patch@pdfpages{%
-  \RequirePackage{etoolbox}
-  \patchcmd{\AM at output}{%
-    \setlength{\@tempdima}{\AM at xmargin}%
-    \edef\AM at xmargin{\the\@tempdima}%
-    \setlength{\@tempdima}{\AM at ymargin}%
-    \edef\AM at ymargin{\the\@tempdima}%
-  }{%
-    \setlength{\@tempdima}{\AM at xmargin\iftombow+1in\fi}%
-    \edef\AM at xmargin{\the\@tempdima}%
-    \setlength{\@tempdima}{\AM at ymargin\iftombow-1in\fi}%
-    \edef\AM at ymargin{\the\@tempdima}%
-  }
-  {\PackageInfo{\pxgtmb at pkgname}{Patch for pdfpages applied}}
-  {\PackageWarningNoLine{\pxgtmb at pkgname}{Patch for pdfpages failed}}%
-}
-%% however, if running (u)pLaTeX, use pxpdfpages.sty if available
-\ifx\pfmtname\@undefined\else
-  \IfFileExists{pxpdfpages.sty}{%
-    \def\pxgtmb at patch@pdfpages{\RequirePackage{pxpdfpages}}%
-  }{}
-\fi
-%% do it
+  \IfFileExists{pxpdfpages.sty}{\RequirePackage{pxpdfpages}}{}}
 \AtBeginDocument{\@ifpackageloaded{pdfpages}{\pxgtmb at patch@pdfpages}{}}
 
 %% patch pdfx.sty

Added: trunk/Master/texmf-dist/tex/latex/gentombow/pxesopic.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/gentombow/pxesopic.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/gentombow/pxesopic.sty	2020-10-14 21:46:12 UTC (rev 56665)
@@ -0,0 +1,239 @@
+%
+% pxesopic.sty
+% written by Hironobu Yamashita (@aminophen)
+%
+% This package is part of the gentombow bundle.
+% https://github.com/aminophen/gentombow
+%
+% This package is expected to be compatible with
+%   * eso-pic.sty
+%     2015/07/21 v2.0g -- 2020/09/27 v2.0i
+%
+% --------------------------------------------------------------
+% [Note]
+% The package ``pxesopic.sty'' relies heavily on internals
+% of ``plautopatch.sty''.
+% Also, ``pxesopic.sty'' is incompatible with ``memoir.cls''.
+% --------------------------------------------------------------
+%
+
+%% package declaration
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{pxesopic}
+    [2020/10/11 v0.4c Patch to eso-pic for tombow]
+
+%% preparations
+\def\pxesop at pkgname{pxesopic}
+\def\pxesop at error{\PackageError\pxesop at pkgname}
+\def\pxesop at warn{\PackageWarningNoLine\pxesop at pkgname}
+\let\pxesop at debug\@gobble
+%\def\pxesop at debug#1{\typeout{\pxesop at pkgname: [DEBUG] #1}}% for debug
+
+\@ifclassloaded{memoir}{%
+  \pxesop at warn{This package should not be loaded with memoir.cls}}{}
+
+\@ifpackageloaded{eso-pic}{%
+  \pxesop at error{%
+    Package eso-pic is already loaded!\MessageBreak
+    Load pxesopic earlier}\@ehc
+}{}
+
+%% hooks
+\ifx\declare at file@substitution\@undefined
+  % LaTeX2e 2020-02-02 PL5 or older
+  \RequirePackage{filehook}
+  \let\pxesop at ExecuteAfterPackage=\AtEndOfPackageFile
+  \let\pxesop at ExecuteBeforePackage=\AtBeginOfPackageFile
+\else
+  % LaTeX2e 2020-10-01 or newer
+  \def\pxesop at ExecuteAfterPackage#1{\AddToHook{package/after/#1}}
+  \def\pxesop at ExecuteBeforePackage#1{\AddToHook{package/before/#1}}
+\fi
+
+%% the contents of \AtBeginShipout is dependent on \iftombow;
+%% delay execution of \AtBeginShipout inside ``eso-pic.sty''
+%% until \AtBeginDocument, to support both (u)pLaTeX kernel
+%% and ``gentombow.sty''
+\RequirePackage{atbegshi}% eso-pic requires atbegshi
+\ifx\pfmtname\@undefined\else
+  \ifx\AtBegShi at Output\@undefined
+    % LaTeX2e 2020-10-01: an emulation by ``atbegshi-ltx.sty''
+    % => pLaTeX2e 2020-10-01 natively supports it
+  \else
+    % older: the real ``atbegshi.sty'' is loaded
+    \IfFileExists{pxatbegshi.sty}{\RequirePackage{pxatbegshi}}{}
+  \fi
+\fi
+%
+\pxesop at ExecuteBeforePackage{eso-pic}{\pxesop at before}
+\pxesop at ExecuteAfterPackage{eso-pic}{\pxesop at after}
+%
+\def\pxesop at before{%
+  \let\pxesop at AtBeginShipout\AtBeginShipout
+  \def\AtBeginShipout##1{\def\pxesop at hook{##1}}% hide it
+  \pxesop at debug{\noexpand\AtBeginShipout disabled}%
+  \let\pxesop at before\relax
+}
+\def\pxesop at after{%
+  \let\AtBeginShipout\pxesop at AtBeginShipout    % restore
+  \let\pxesop at AtBeginShipout\relax
+  \pxesop at debug{\noexpand\AtBeginShipout restored}%
+  \let\@unknownoptionerror\relax %% avoid an error
+  \pxesop at debug{\noexpand\@unknownoptionerror disabled}%
+  \let\pxesop at after\relax
+}
+%%
+
+%% load it; be careful not to cause unknown option error!
+\expandafter\ifx\csname @unknownoptionerror\endcsname
+  \pxesop at error{Failed to save \noexpand\@unknownoptionerror}\@ehc
+\fi
+\let\pxesop at unknownoptionerror\@unknownoptionerror
+%
+\chardef\pxesop at status\z@
+\@ifpackageloaded{plautopatch}{%
+  \expandafter\ifx\csname platpc at begin@eso-pic\endcsname\relax
+    % ``plautopatch.sty'' is loaded but the macro is \relax
+    % => means that ``pxesopic.sty'' is automatically loaded
+    \@ifl at t@r{\fmtversion}{2020/10/01}{%
+      \chardef\pxesop at status\@ne
+    }{}%
+  \fi
+}{}
+%
+%% pass all options to keyval-style ``eso-pic.sty''
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{eso-pic}}
+\ProcessOptions\relax
+\RequirePackage{eso-pic}
+%
+%% ensure internal dimensions added in ``eso-pic.sty'' v2.0i
+\ifx\ESO at tempdima\@undefined \newdimen\ESO at tempdima \fi
+\ifx\ESO at tempdimb\@undefined \newdimen\ESO at tempdimb \fi
+%
+%% recover the error
+\ifnum\pxesop at status>\z@ % auto
+  \def\pxesop at pkgtohook{eso-pic}%
+  % note that ``plautopatch.sty'' discards the hook
+  % on LaTeX2e 2020-02-02 PL5 or older
+  \ifx\declare at file@substitution\@undefined
+    \let\pxesop at pkgtohook\pxesop at pkgname
+    % throw an error for unsupported usage
+    % [FIXME] the error below is actually unnecessary when
+    % none of ``eso-pic.sty'' options is used; how to detect that?
+    \pxesop at error{Try loading \pxesop at pkgname\space by hand}\@ehc
+  \fi
+\else
+  \let\pxesop at pkgtohook\pxesop at pkgname
+\fi
+\pxesop at ExecuteAfterPackage\pxesop at pkgtohook{%
+  \let\@unknownoptionerror\pxesop at unknownoptionerror
+  \pxesop at debug{\noexpand\@unknownoptionerror restored}%
+}
+%%
+
+%% do it
+%-- similar to bounddvi.sty (checked 2020/10/08 v8.2)
+% detection of \iftombow availability is delayed until \AtBeginDocument,
+% to support both (u)pLaTeX kernel and ``gentombow.sty''
+% Note: this package does not consider changing \iftombow status
+% in the middle of a single document.
+\AtBeginDocument{\pxesop at do}
+\def\pxesop at do{%
+  \ifx\tombowtrue\@undefined
+    \pxesop at debug{Tombow feature unavailable, no patch applied}%
+    \let\pxesop at switch\pxesop at orig % skip if-tokens and restore
+  \fi
+  \pxesop at switch}
+%
+\def\pxesop at switch{%
+  \iftombow \pxesop at ensure@stock \pxesop at new
+  \else \pxesop at orig \fi}
+%
+\def\pxesop at ensure@stock{%
+  %\iftombow
+    % if \stockwidth/\stockheight are not available,
+    % define them now
+    \ifx\stockwidth\@undefined \newdimen\stockwidth \fi
+    \ifx\stockheight\@undefined \newdimen\stockheight \fi
+    % if \stockwidth already has effective value, do nothing;
+    % otherwise assume pLaTeX-style tombow and set it to
+    % \paperwidth + 2in (similar for \stockheight)
+    \ifdim\stockwidth>\z@\else
+      \stockwidth\paperwidth \advance\stockwidth2in
+    \fi
+    \ifdim\stockheight>\z@\else
+      \stockheight\paperheight \advance\stockheight2in
+    \fi
+  %\fi
+}
+%--
+%
+%% for \iftombow is FALSE => restore from ``eso-pic.sty''
+\expandafter\def\expandafter\pxesop at orig\expandafter{%
+  \expandafter\AtBeginShipout\expandafter{\pxesop at hook}}
+%
+%% for \iftombow is TRUE => redefine by ``pxesopic.sty''
+\def\pxesop at new{%
+  %% \AtStockLowerLeft: based on TRUE of \ESO at isMEMOIR
+  \renewcommand\AtStockLowerLeft[1]{%
+    \begingroup
+      \ESO at tempdima=-\stockwidth
+      \advance\ESO at tempdima\paperwidth
+      \ESO at tempdimb=-\stockheight
+      \advance\ESO at tempdimb\paperheight
+      %% specific BEGIN
+      \advance\ESO at tempdima 1in\relax
+      \advance\ESO at tempdimb 1in\relax
+      \advance\ESO at tempdima \hoffset\relax
+      \advance\ESO at tempdimb \voffset\relax
+      %% specific END
+      \AtPageLowerLeft{%
+        \put(\LenToUnit{\ESO at tempdima},\LenToUnit{\ESO at tempdimb}){##1}%
+      }%
+    \endgroup
+  }% ===
+  %% \AtStockUpperLeft: based on TRUE of \ESO at isMEMOIR
+  \renewcommand\AtStockUpperLeft[1]{%
+    \AtStockLowerLeft{%
+      \put(0,\LenToUnit{\stockheight}){##1}%
+    }%
+  }% ===
+  %% \AtStockCenter: based on TRUE of \ESO at isMEMOIR
+  \renewcommand\AtStockCenter[1]{%
+    \AtStockLowerLeft{%
+      \put(\LenToUnit{.5\stockwidth},\LenToUnit{.5\stockheight}){##1}%
+    }%
+  }%
+  %% \AtTextUpperLeft: same as FALSE of \ESO at isMEMOIR
+  %  (no change)
+  %
+  %% \AtBeginShipout: based on TRUE of \ESO at isMEMOIR
+  \AtBeginShipout{%
+    \ESO at tempdima=\dimexpr(\stockwidth-\paperwidth)/2\relax
+    \ESO at tempdimb=-\dimexpr(\stockheight+\paperheight)/2\relax
+    \ifESO at texcoord
+      \advance\ESO at tempdimb\paperheight % [FIXME] not sure!
+    \fi
+    %% specific BEGIN
+    \advance\ESO at tempdima -\hoffset\relax
+    \advance\ESO at tempdimb \voffset\relax
+    %% specific END
+    \nointerlineskip
+    \AtBeginShipoutUpperLeft{%
+      \put(\LenToUnit{\ESO at tempdima},\LenToUnit{\ESO at tempdimb}){%
+        \ESO at HookIIIBG\ESO at HookIBG\ESO at HookIIBG
+        \global\let\ESO at HookIIBG\@empty
+      }%
+    }%
+    \AtBeginShipoutUpperLeftForeground{%
+      \put(\LenToUnit{\ESO at tempdima},\LenToUnit{\ESO at tempdimb}){%
+        \ESO at HookIFG\ESO at HookIIFG\ESO at HookIIIFG
+        \global\let\ESO at HookIIFG\@empty
+      }%
+    }%
+  }% ===
+}
+%%
+
+\endinput
+%% EOF


Property changes on: trunk/Master/texmf-dist/tex/latex/gentombow/pxesopic.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/gentombow/pxgentombow.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/gentombow/pxgentombow.sty	2020-10-14 21:45:46 UTC (rev 56664)
+++ trunk/Master/texmf-dist/tex/latex/gentombow/pxgentombow.sty	2020-10-14 21:46:12 UTC (rev 56665)
@@ -8,7 +8,7 @@
 
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{pxgentombow}
-    [2018/05/17 v0.9g Generate crop mark 'tombow']
+    [2020/10/14 v0.9l Generate crop mark 'tombow']
 \PackageWarningNoLine{pxgentombow}{%
   Package `pxgentombow' is now superseded by\MessageBreak
   `gentombow', use `gentombow' instead}

Added: trunk/Master/texmf-dist/tex/latex/gentombow/pxpdfpages.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/gentombow/pxpdfpages.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/gentombow/pxpdfpages.sty	2020-10-14 21:46:12 UTC (rev 56665)
@@ -0,0 +1,72 @@
+%
+% pxpdfpages.sty
+% written by Hironobu Yamashita (@aminophen)
+%
+% This package is part of the gentombow bundle.
+% https://github.com/aminophen/gentombow
+%
+% This package is expected to be compatible with
+%   * pdfpages.sty
+%     (2015/07/19 v0.5a -- 2020/01/28 v0.5q)
+%
+
+%% package declaration
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{pxpdfpages}
+  [2020/10/11 v0.4c Patch to pdfpages for tombow]
+
+%% preparations
+\def\pxpdpg at pkgname{pxpdfpages}
+\def\pxpdpg at warn{\PackageWarningNoLine\pxpdpg at pkgname}
+\def\pxpdpg at info{\PackageInfo\pxpdpg at pkgname}
+\let\pxpdpg at debug\@gobble
+%\def\pxpdpg at debug#1{\typeout{\pxpdpg at pkgname: [DEBUG] #1}}% for debug
+
+%% load it
+\RequirePackageWithOptions{pdfpages}% pdfpages requires atbegshi
+\ifx\pfmtname\@undefined\else
+  \ifx\AtBegShi at Output\@undefined
+    % LaTeX2e 2020-10-01: an emulation by ``atbegshi-ltx.sty''
+    % => pLaTeX2e 2020-10-01 natively supports it
+  \else
+    % older: the real ``atbegshi.sty'' is loaded
+    \IfFileExists{pxatbegshi.sty}{\RequirePackage{pxatbegshi}}{}
+  \fi
+\fi
+
+%% do it
+%-- similar to bounddvi.sty (checked 2020/10/08 v8.2)
+% detection of \iftombow availability is delayed until \AtBeginDocument,
+% to support both (u)pLaTeX kernel and ``gentombow.sty''
+\AtBeginDocument{\pxpdpg at do}
+\def\pxpdpg at do{%
+  \ifx\tombowtrue\@undefined
+    \pxpdpg at debug{Tombow feature unavailable, no patch applied}%
+    \let\pxpdpg at switch\relax % do nothing
+  \fi
+  \pxpdpg at switch}
+%
+\def\pxpdpg at switch{\pxpdpg at patch@pdfpages}
+
+%% patch internal for pdfpages to work with tombow
+%-- Note: this code should be copied to gentombow.sty!
+\def\pxpdpg at patch@pdfpages{%
+  \RequirePackage{etoolbox}
+  \patchcmd{\AM at output}{%
+    \setlength{\@tempdima}{\AM at xmargin}%
+    \edef\AM at xmargin{\the\@tempdima}%
+    \setlength{\@tempdima}{\AM at ymargin}%
+    \edef\AM at ymargin{\the\@tempdima}%
+  }{%
+    \setlength{\@tempdima}{\AM at xmargin\iftombow+1in\fi}%
+    \edef\AM at xmargin{\the\@tempdima}%
+    \setlength{\@tempdima}{\AM at ymargin\iftombow-1in\fi}%
+    \edef\AM at ymargin{\the\@tempdima}%
+  }%
+  {\pxpdpg at info{Patch for pdfpages applied}}%
+  {\pxpdpg at warn{Patch for pdfpages failed}}%
+}
+
+%% all done
+
+\endinput


Property changes on: trunk/Master/texmf-dist/tex/latex/gentombow/pxpdfpages.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/gentombow/pxtextpos.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/gentombow/pxtextpos.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/gentombow/pxtextpos.sty	2020-10-14 21:46:12 UTC (rev 56665)
@@ -0,0 +1,108 @@
+%
+% pxtextpos.sty
+% written by Hironobu Yamashita (@aminophen)
+%
+% This package is part of the gentombow bundle.
+% https://github.com/aminophen/gentombow
+%
+% This package is expected to be compatible with
+%   * textpos.sty
+%     2005/10/13 v1.6a -- 2019/04/15 v1.9.1
+%
+
+%% package declaration
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{pxtextpos}
+    [2020/10/11 v0.4b Patch to textpos for tombow]
+
+%% preparations
+\def\pxtxtpos at pkgname{pxtextpos}
+\def\pxtxtpos at warn{\PackageWarningNoLine\pxtxtpos at pkgname}
+\let\pxtxtpos at debug\@gobble
+%\def\pxtxtpos at debug#1{\typeout{\pxtxtpos at pkgname: [DEBUG] #1}}% for debug
+
+%% load it
+\RequirePackageWithOptions{textpos}
+% textpos requires everyshi, only if both conditions are met:
+%  (1) \fmtversion is **older** than 2020/10/01
+%  (2) \ifTP at abspos == \iftrue
+% [TODO] tate-mode support is incomplete!
+\ifx\pfmtname\@undefined\else
+  \ifx\@EveryShipout at Output\@undefined
+    % LaTeX2e 2020-10-01: an emulation by ``everyshi-ltx.sty''
+    % => pLaTeX2e 2020-10-01 natively supports it
+  \else
+    % older: the real ``everyshi.sty'' is loaded
+    \IfFileExists{pxeveryshi.sty}{\RequirePackage{pxeveryshi}}{}
+  \fi
+\fi
+
+%% do it
+%-- similar to bounddvi.sty (checked 2020/10/08 v8.2)
+% detection of \iftombow availability is delayed until \AtBeginDocument,
+% to support both (u)pLaTeX kernel and ``gentombow.sty''
+\AtBeginDocument{\pxtxtpos at do}
+\def\pxtxtpos at do{%
+  \ifx\tombowtrue\@undefined
+    \pxtxtpos at debug{Tombow feature unavailable, no patch applied}%
+    \let\pxtxtpos at switch\relax % do nothing
+  \fi
+  \pxtxtpos at switch}
+%
+\def\pxtxtpos at switch{%
+  \let\textblockorigin\pxtxtpos at textblockorigin
+  \ifTP at abspos\textblockorigin{0pt}{0pt}\fi %% reset
+}
+
+%% known definition
+\def\pxtxtpos at textblockorigin#1#2{%
+  \ifTP at abspos
+    \TP at ox=-1in    \addtolength\TP at ox{#1}
+    \TP at oy=-1in    \addtolength\TP at oy{#2}
+    \ifTP at chatter\typeout{TextBlockOrigin set to #1 x #2}\fi
+  \else
+    \PackageError{textpos}
+      {The \protect\textblockorigin\space command\MessageBreak
+       may only be used if the package was given\MessageBreak
+       the`absolute' option when it was invoked}
+      {If you want to use the \protect\textblockorigin\space command, then
+         \MessageBreak
+       invoke the package with the syntax\MessageBreak
+       \protect\usepackage[absolute]{textpos}}
+  \fi
+}
+\@onlypreamble\pxtxtpos at textblockorigin
+
+%% check definition
+\ifx\textblockorigin\pxtxtpos at textblockorigin\else
+  \pxtxtpos at warn{%
+    Command \noexpand\textblockorigin is beyond my knowledge.\MessageBreak
+    I will apply the patch anyway, but it may break:\MessageBreak
+    Please report to the author of `\pxtxtpos at pkgname.sty'}
+\fi
+
+%% new definition
+\def\pxtxtpos at textblockorigin#1#2{%
+  \ifTP at abspos
+    \TP at ox=-1in    \addtolength\TP at ox{#1}
+    \TP at oy=-1in    \addtolength\TP at oy{#2}
+    %%% addition
+    \iftombow
+      \addtolength\TP at ox{1in}\addtolength\TP at oy{1in}
+    \fi
+    %%%
+    \ifTP at chatter\typeout{TextBlockOrigin set to #1 x #2}\fi
+  \else
+    \PackageError{textpos}
+      {The \protect\textblockorigin\space command\MessageBreak
+       may only be used if the package was given\MessageBreak
+       the`absolute' option when it was invoked}
+      {If you want to use the \protect\textblockorigin\space command, then
+         \MessageBreak
+       invoke the package with the syntax\MessageBreak
+       \protect\usepackage[absolute]{textpos}}
+  \fi
+}
+
+\endinput
+%% EOF


Property changes on: trunk/Master/texmf-dist/tex/latex/gentombow/pxtextpos.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property


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