texlive[52049] Master/texmf-dist: platex-tools (7sep19)
commits+karl at tug.org
commits+karl at tug.org
Sat Sep 7 23:23:14 CEST 2019
Revision: 52049
http://tug.org/svn/texlive?view=revision&revision=52049
Author: karl
Date: 2019-09-07 23:23:14 +0200 (Sat, 07 Sep 2019)
Log Message:
-----------
platex-tools (7sep19)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/platex-tools/README.md
trunk/Master/texmf-dist/doc/latex/platex-tools/pxatbegshi.pdf
trunk/Master/texmf-dist/doc/latex/platex-tools/pxatbegshi.tex
trunk/Master/texmf-dist/tex/latex/platex-tools/pxatbegshi.sty
Removed Paths:
-------------
trunk/Master/texmf-dist/source/latex/platex-tools/
Modified: trunk/Master/texmf-dist/doc/latex/platex-tools/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/platex-tools/README.md 2019-09-07 21:22:56 UTC (rev 52048)
+++ trunk/Master/texmf-dist/doc/latex/platex-tools/README.md 2019-09-07 21:23:14 UTC (rev 52049)
@@ -83,6 +83,6 @@
## Release Date
-2019-09-05
+2019-09-07
Hironobu Yamashita
Modified: trunk/Master/texmf-dist/doc/latex/platex-tools/pxatbegshi.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/platex-tools/pxatbegshi.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/platex-tools/pxatbegshi.tex 2019-09-07 21:22:56 UTC (rev 52048)
+++ trunk/Master/texmf-dist/doc/latex/platex-tools/pxatbegshi.tex 2019-09-07 21:23:14 UTC (rev 52049)
@@ -60,12 +60,12 @@
\section*{謝辞}
-本パッケージの実装には、Takayuki Yato (ZR) 氏による
-\textsf{bxpapersize}パッケージを参考にしました
-\footnote{2018/09/21 v0.3までは北川さん (Hironori Kitagawa) による
+本パッケージの実装は、北川さん(Hironori Kitagawa)さんによる
「\verb+\AtBegShi at Output+の処理を強引に横組でやらせるコード」
-をベースにしていましたが、v0.4で\verb+\AtBeginShipoutDiscard+へ
-対応させる改修を機に、書き直しました。}。
+をベースにしています\footnote{2018/09/21 v0.4では
+Takayuki Yato (ZR) 氏による\textsf{bxpapersize}パッケージを参考に
+していましたが、\textsf{multicol}パッケージで問題が起きるようなので
+v0.3以前と同様に北川さんのコードベースに戻しました。}。
\section*{References}
Modified: trunk/Master/texmf-dist/tex/latex/platex-tools/pxatbegshi.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/platex-tools/pxatbegshi.sty 2019-09-07 21:22:56 UTC (rev 52048)
+++ trunk/Master/texmf-dist/tex/latex/platex-tools/pxatbegshi.sty 2019-09-07 21:23:14 UTC (rev 52049)
@@ -5,15 +5,26 @@
% This package is part of the platex-tools bundle.
% https://github.com/aminophen/platex-tools
%
-% Largely based on bxpapersize.sty by T. Yato.
-% Previous versions were largely based on H. Kitagawa's
-% code on GitHub:texjporg/tex-jp-build#21.
+% --------------------------------------------------------------------
+% [Note]
+% Previous version (2018/09/21 v0.4) was largely based on
+% "cope with tate-direction"
+% of bxpapersize.sty 2017/05/02 v0.3a by T. Yato.
+% -- concept: execute all hooks in temporary yoko direction,
+% -- by prepending \yoko and switching back to the original
+% However, it was problematic when used with multicol.sty.
%
+% Thus, in newer version (2019/09/07 v0.5), I reverted back to
+% the original code (2018/09/21 v0.3), which was largely based on
+% H. Kitagawa's on GitHub:texjporg/tex-jp-build#21.
+% -- concept: execute all hooks inside yoko direction \vbox
+% --------------------------------------------------
+%
%% package declaration
\NeedsTeXFormat{pLaTeX2e}
\ProvidesPackage{pxatbegshi}
- [2018/09/21 v0.4 Patch to atbegshi for (u)pLaTeX]
+ [2019/09/07 v0.5 Patch to atbegshi for (u)pLaTeX]
%% preparations
\def\pxabgs at pkgname{pxatbegshi}
@@ -45,56 +56,51 @@
%---------------------------------------
-%% patch \AtBegShi at Output
-% concept: execute all hooks in temporary yoko direction,
-% by prepending \yoko and switching back to the original
-%
+% concept: execute all hooks inside yoko direction \vbox
+
% prepare
\let\pxabgs at AtBegShi@Output\AtBegShi at Output
-% first, check hooks inserted by bxpapersize.sty
-% -> if detected, nothing to do
+% try first patch
\pxabgs at patch@cmd\pxabgs at AtBegShi@Output
- {\bxpr at ABS@prehook}{\bxpr at ABS@prehook}%
-\ifx\pxabgs at fragment\relax\else % found
+ {\let\AtBegShi at OrgProtect\protect}%
+ {\setbox8\vbox\bgroup\yoko\let\AtBegShi at OrgProtect\protect}
+\ifx\pxabgs at fragment\relax % failure
+ \let\pxabgs at AtBegShi@Output\relax
+\else % success, try second patch
\pxabgs at patch@cmd\pxabgs at AtBegShi@Output
- {\bxpr at ABS@posthook}{\bxpr at ABS@posthook}%
- \ifx\pxabgs at fragment\relax\else % found
+ {\AtBeginShipoutOriginalShipout\box\AtBeginShipoutBox}%
+ {\AtBeginShipoutOriginalShipout\box\AtBeginShipoutBox\egroup}
+ \ifx\pxabgs at fragment\relax % failure
\let\pxabgs at AtBegShi@Output\relax
+ \else % success, try third patch
+ \pxabgs at patch@cmd\pxabgs at AtBegShi@Output{%
+ \begingroup
+ \setbox\AtBeginShipoutBox\box\AtBeginShipoutBox
+ \endgroup
+ \let\protect\AtBegShi at OrgProtect
+ }{%
+ \begingroup
+ \setbox\AtBeginShipoutBox\box\AtBeginShipoutBox
+ \endgroup
+ \let\protect\AtBegShi at OrgProtect
+ \egroup
+ }
+ \ifx\pxabgs at fragment\relax % failure
+ \let\pxabgs at AtBegShi@Output\relax
+ \fi
\fi
\fi
-% -> if not detected, prepend/append hooks
-\ifx\pxabgs at AtBegShi@Output\relax\else
- \expandafter\def\expandafter\pxabgs at AtBegShi@Output\expandafter{%
- \expandafter\pxabgs at ABS@prehook
- \pxabgs at AtBegShi@Output
- \pxabgs at ABS@posthook
- }
- % adjust for atbegshi.sty on non-e-TeX ...
- % (for e-TeX, this patch should fail but does nothing!)
- \pxabgs at patch@cmd\pxabgs at AtBegShi@Output
- {\pxabgs at ABS@prehook\egroup\endgroup}
- {\egroup\endgroup\pxabgs at ABS@prehook}%
- % commit the change
+% commit the change only when successful
+\ifx\pxabgs at AtBegShi@Output\relax
+ \pxabgs at warn{Failed in patching \string\AtBegShi at Output}
+\else
\global\let\AtBegShi at Output\pxabgs at AtBegShi@Output
\fi
-%
-%% done
-%--------------------------------------- done
-
\endgroup
%% internal macros are no longer effective
-%% hooks
-\let\pxabgs at restore@dir\relax
-\def\pxabgs at ABS@prehook{%
- \iftdir
- \yoko
- \let\pxabgs at restore@dir\tate
- \else
- \let\pxabgs at restore@dir\relax
- \fi}
-\def\pxabgs at ABS@posthook{\pxabgs at restore@dir}
+%--------------------------------------- done
\endinput
%% EOF
More information about the tex-live-commits
mailing list