From 9444430d73ece7ecf9adaf5b3f4ee373896f95be Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 21 Sep 2018 21:06:46 +0000 Subject: platex-tools (21sep18) git-svn-id: svn://tug.org/texlive/trunk@48722 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/latex/platex-tools/plarray.sty | 16 ++---- .../tex/latex/platex-tools/plextarray.sty | 16 ++++-- .../tex/latex/platex-tools/plextdelarray.sty | 2 +- .../tex/latex/platex-tools/pxatbegshi.sty | 66 +++++++++++++++------- 4 files changed, 62 insertions(+), 38 deletions(-) (limited to 'Master/texmf-dist/tex/latex') diff --git a/Master/texmf-dist/tex/latex/platex-tools/plarray.sty b/Master/texmf-dist/tex/latex/platex-tools/plarray.sty index 62221391eb3..4dd658f2cf6 100644 --- a/Master/texmf-dist/tex/latex/platex-tools/plarray.sty +++ b/Master/texmf-dist/tex/latex/platex-tools/plarray.sty @@ -14,15 +14,15 @@ \NeedsTeXFormat{pLaTeX2e} \ProvidesPackage{plarray} - [2018/09/18 v0.1f Tabular extension package for pLaTeX/upLaTeX] + [2018/09/20 v0.1g Tabular extension package for pLaTeX/upLaTeX] \RequirePackage{array} %% patching internal code for array.sty % %% remove extra \xkanjiskip (pLaTeX2e 2016/04/17) \@ifl@t@r{\pfmtversion}{2016/04/17} - {\expandafter\@firstoftwo} - {\expandafter\@secondoftwo} + {\expandafter\@firstofone} + {\expandafter\@gobble} {% = for pLaTeX2e 2016/04/17 or newer \def\@tabular{% \leavevmode \null @@ -32,14 +32,11 @@ \def\endtabular{\endarray $\egroup\null} \expandafter \let \csname endtabular*\endcsname = \endtabular }% = -{% = for pLaTeX2e 2006/11/10 or older -% nothing to be done -}% = % %% inhibit JFM glue around tabular cell components (pLaTeX2e 2018/03/09) \@ifl@t@r{\pfmtversion}{2017/07/29} - {\expandafter\@firstoftwo} - {\expandafter\@secondoftwo} + {\expandafter\@firstofone} + {\expandafter\@gobble} {% = for pLaTeX2e 2017/07/29 or newer % first, provide old definition; there are some known incompatibility % compared to LaTeX, pLaTeX or array @@ -59,9 +56,6 @@ \fi \fi }% = -{% = for pLaTeX2e 2017/05/05 or older -% nothing to be done -}% = % %% done diff --git a/Master/texmf-dist/tex/latex/platex-tools/plextarray.sty b/Master/texmf-dist/tex/latex/platex-tools/plextarray.sty index cc837edc6c5..3e1f3c207c6 100644 --- a/Master/texmf-dist/tex/latex/platex-tools/plextarray.sty +++ b/Master/texmf-dist/tex/latex/platex-tools/plextarray.sty @@ -9,24 +9,30 @@ % * array.sty in latex-tools % (2016/10/06 v2.4d -- 2018/09/13 v2.4i) % * plext.sty in platex -% (2001/09/26 v1.2 -- 2018/09/09 v1.2i) +% (2001/09/26 v1.2 -- 2018/09/20 v1.2j) % Largely based on lltjext.sty from LuaTeX-ja project. % \NeedsTeXFormat{pLaTeX2e} \ProvidesPackage{plextarray} - [2018/09/18 v1.1b Tabular extension package for plext and array] + [2018/09/20 v1.1c Tabular extension package for plext and array] \RequirePackage{plext} \RequirePackage{plarray} %% save definitions from array.sty +% the option will be handled later in \@tabarray \def\array{\col@sep\arraycolsep \def\d@llarbegin{$}\let\d@llarend\d@llarbegin\def\@halignto{}% \@tabarray} \def\tabular{\def\@halignto{}\@tabular} -\expandafter\def\csname tabular*\endcsname#1{% - \setlength\dimen@{#1}% - \edef\@halignto{to\the\dimen@}\@tabular} +%% merged definitions from array.sty and plext.sty +% take option first as in plext.sty, +% which will be passed to \@tabarray +\@namedef{tabular*}{\@ifnextchar<%> + {\p@stabular}{\p@stabular}} +\def\p@stabular<#1>#2{% + \setlength\dimen@{#2}% + \edef\@halignto{to\the\dimen@}\@tabular<#1>} %% patching internal code for array.sty and plext.sty % diff --git a/Master/texmf-dist/tex/latex/platex-tools/plextdelarray.sty b/Master/texmf-dist/tex/latex/platex-tools/plextdelarray.sty index 57682c7fd83..03b6a1ccfff 100644 --- a/Master/texmf-dist/tex/latex/platex-tools/plextdelarray.sty +++ b/Master/texmf-dist/tex/latex/platex-tools/plextdelarray.sty @@ -9,7 +9,7 @@ % * delarray.sty in latex-tools % (2014/10/28 v1.01) % * plext.sty in platex -% (2001/09/26 v1.2 -- 2018/09/09 v1.2i) +% (2001/09/26 v1.2 -- 2018/09/20 v1.2j) % \NeedsTeXFormat{pLaTeX2e} diff --git a/Master/texmf-dist/tex/latex/platex-tools/pxatbegshi.sty b/Master/texmf-dist/tex/latex/platex-tools/pxatbegshi.sty index 91e107dc790..577bfed6370 100644 --- a/Master/texmf-dist/tex/latex/platex-tools/pxatbegshi.sty +++ b/Master/texmf-dist/tex/latex/platex-tools/pxatbegshi.sty @@ -1,17 +1,19 @@ % % pxatbegshi.sty -% based on H. Kitagawa's code on GitHub:texjporg/tex-jp-build#21 -% and modified by Hironobu Yamashita +% written by Hironobu Yamashita (@aminophen) % -% This package is distributed as part of the platex-tools bundle -% maintained by Hironobu Yamashita +% 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. +% %% package declaration \NeedsTeXFormat{pLaTeX2e} \ProvidesPackage{pxatbegshi} - [2017/11/04 v0.2 Patch to atbegshi for (u)pLaTeX] + [2018/09/21 v0.4 Patch to atbegshi for (u)pLaTeX] %% preparations \def\pxabgs@pkgname{pxatbegshi} @@ -43,34 +45,56 @@ %--------------------------------------- -% concept: execute all hooks inside yoko direction \vbox - +%% patch \AtBegShi@Output +% concept: execute all hooks in temporary yoko direction, +% by prepending \yoko and switching back to the original +% % prepare \let\pxabgs@AtBegShi@Output\AtBegShi@Output -% try first patch +% first, check hooks inserted by bxpapersize.sty +% -> if detected, nothing to do \pxabgs@patch@cmd\pxabgs@AtBegShi@Output - {\let\AtBegShi@OrgProtect\protect}% - {\setbox8\vbox\bgroup\yoko\let\AtBegShi@OrgProtect\protect} -\ifx\pxabgs@fragment\relax % failure - \let\pxabgs@AtBegShi@Output\relax -\else % success, try second patch + {\bxpr@ABS@prehook}{\bxpr@ABS@prehook}% +\ifx\pxabgs@fragment\relax\else % found \pxabgs@patch@cmd\pxabgs@AtBegShi@Output - {\AtBeginShipoutOriginalShipout\box\AtBeginShipoutBox}% - {\AtBeginShipoutOriginalShipout\box\AtBeginShipoutBox\egroup} - \ifx\pxabgs@fragment\relax % failure + {\bxpr@ABS@posthook}{\bxpr@ABS@posthook}% + \ifx\pxabgs@fragment\relax\else % found \let\pxabgs@AtBegShi@Output\relax \fi \fi -% commit the change only when successful -\ifx\pxabgs@AtBegShi@Output\relax - \pxabgs@warn{Failed in patching \string\AtBegShi@Output} -\else +% -> if not detected, prepend/append hooks +\ifx\pxabgs@AtBegShi@Output\relax\else + \expandafter\def\expandafter\pxabgs@AtBegShi@Output\expandafter{% + \expandafter\pxabgs@ABS@prehook + \pxabgs@AtBegShi@Output + \pxabgs@ABS@posthook + } + % adjust for atbegshi.sty on non-e-TeX ... + % (for e-TeX, this patch should fail but does nothing!) + \pxabgs@patch@cmd\pxabgs@AtBegShi@Output + {\pxabgs@ABS@prehook\egroup\endgroup} + {\egroup\endgroup\pxabgs@ABS@prehook}% + % commit the change \global\let\AtBegShi@Output\pxabgs@AtBegShi@Output \fi +% +%% done + +%--------------------------------------- done \endgroup %% internal macros are no longer effective -%--------------------------------------- done +%% hooks +\let\pxabgs@restore@dir\relax +\def\pxabgs@ABS@prehook{% + \iftdir + \yoko + \let\pxabgs@restore@dir\tate + \else + \let\pxabgs@restore@dir\relax + \fi} +\def\pxabgs@ABS@posthook{\pxabgs@restore@dir} + \endinput %% EOF -- cgit v1.2.3