diff options
author | Karl Berry <karl@freefriends.org> | 2020-09-27 21:26:36 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-09-27 21:26:36 +0000 |
commit | d6491c6ee0bd7716c5f337ebd577c4964dc43c0c (patch) | |
tree | f0e97315d38ef586ce616dbc52930a4991f6c4d1 /Master/texmf-dist/tex | |
parent | 7e94d861f2b24f29d8fad18a7160e8f3644fe2ea (diff) |
plautopatch (27sep20)
git-svn-id: svn://tug.org/texlive/trunk@56452 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
10 files changed, 247 insertions, 30 deletions
diff --git a/Master/texmf-dist/tex/latex/plautopatch/plarydshln.sty b/Master/texmf-dist/tex/latex/plautopatch/plarydshln.sty index d9c26a2c7f1..b84c27df01a 100644 --- a/Master/texmf-dist/tex/latex/plautopatch/plarydshln.sty +++ b/Master/texmf-dist/tex/latex/plautopatch/plarydshln.sty @@ -9,7 +9,7 @@ % * arydshln.sty % (2004/08/31 v1.71 -- 2019/02/21 v1.76) % * plcore.ltx in platex -% (2001/09/26 v1.2a -- 2019/02/08 v1.3b) +% (2001/09/26 v1.2a -- 2020/03/05 v1.3e) % %% package declaration diff --git a/Master/texmf-dist/tex/latex/plautopatch/plautopatch.sty b/Master/texmf-dist/tex/latex/plautopatch/plautopatch.sty index 30707cb8b4d..f77c4e0b8a8 100644 --- a/Master/texmf-dist/tex/latex/plautopatch/plautopatch.sty +++ b/Master/texmf-dist/tex/latex/plautopatch/plautopatch.sty @@ -8,7 +8,7 @@ \NeedsTeXFormat{LaTeX2e}% not pLaTeX2e on purpose! \ProvidesPackage{plautopatch} - [2020/05/25 v0.9g Automated patches for pLaTeX/upLaTeX] + [2020/09/27 v0.9j Automated patches for pLaTeX/upLaTeX] \ifx\pfmtname\@undefined \PackageWarningNoLine{plautopatch}{% @@ -23,7 +23,21 @@ \def\platpc@warn{\PackageWarningNoLine\platpc@pkgname} \def\platpc@info{\PackageInfo\platpc@pkgname} -\RequirePackage{filehook} +%% Since LaTeX2e 2020-10-01, most of features in filehook.sty +%% is available in ltfilehook.dtx. +%% The new code defines \declare@file@substitution, +%% so we can detect it! + +\ifx\declare@file@substitution\@undefined + % LaTeX2e 2020-02-02 PL5 or older + \RequirePackage{filehook} + \let\platpc@ExecuteAfterPackage=\AtEndOfPackageFile + \let\platpc@ExecuteBeforePackage=\AtBeginOfPackageFile +\else + % LaTeX2e 2020-10-01 or newer + \def\platpc@ExecuteAfterPackage#1{\AddToHook{package/after/#1}} + \def\platpc@ExecuteBeforePackage#1{\AddToHook{package/before/#1}} +\fi % low-level helpers @@ -67,7 +81,7 @@ \@ifpackageloaded{#1}{% \csname platpc@end@#1\endcsname }{% - \AtEndOfPackageFile{#1}{\csname platpc@end@#1\endcsname}% + \platpc@ExecuteAfterPackage{#1}{\csname platpc@end@#1\endcsname}% }% } \@onlypreamble\platpc@patch@after @@ -84,16 +98,16 @@ \@ifpackageloaded{#2}{% \csname platpc@end@#1+#2\endcsname }{% - \AtEndOfPackageFile{#2}{\csname platpc@end@#1+#2\endcsname}% + \platpc@ExecuteAfterPackage{#2}{\csname platpc@end@#1+#2\endcsname}% }% }{% \@ifpackageloaded{#2}{% - \AtEndOfPackageFile{#1}{\csname platpc@end@#1+#2\endcsname}% + \platpc@ExecuteAfterPackage{#1}{\csname platpc@end@#1+#2\endcsname}% }{% - \AtEndOfPackageFile{#1}{% + \platpc@ExecuteAfterPackage{#1}{% \@ifpackageloaded{#2}{\csname platpc@end@#1+#2\endcsname}{}% }% - \AtEndOfPackageFile{#2}{% + \platpc@ExecuteAfterPackage{#2}{% \@ifpackageloaded{#1}{\csname platpc@end@#1+#2\endcsname}{}% }% }% @@ -119,13 +133,7 @@ % load the <patch> package \RequirePackage{#2}\platpc@addtolist{#2}% % avoid loading <orig> twice by discarding "\@@input <orig>" (*!) - \let\platpc@filehook@@atbegin\filehook@@atbegin - \def\filehook@@atbegin\@@input####1\filehook@atend{% - \let\filehook@@atbegin\platpc@filehook@@atbegin - % avoid infinite loop even when \AtEndOfPackageFile used - \expandafter\let\csname filehook@atend@#1.sty\endcsname\relax - \filehook@@atbegin - \filehook@atend}% + \platpc@discard@input{#1}% % all done }% }% @@ -134,11 +142,30 @@ \@ifpackageloaded{#1}{% \platpc@err@toolate{#1}% }{% else - \AtBeginOfPackageFile{#1}{\csname platpc@begin@#1\endcsname}% + \platpc@ExecuteBeforePackage{#1}{\csname platpc@begin@#1\endcsname}% }% } \@onlypreamble\platpc@patch@before +\ifx\declare@file@substitution\@undefined + % LaTeX2e 2020-02-02 PL5 or older + \def\platpc@discard@input#1{% + \let\platpc@filehook@@atbegin\filehook@@atbegin + \def\filehook@@atbegin\@@input##1\filehook@atend{% + \let\filehook@@atbegin\platpc@filehook@@atbegin + % avoid infinite loop even when \AtEndOfPackageFile used + \expandafter\let\csname filehook@atend@#1.sty\endcsname\relax + \filehook@@atbegin + \filehook@atend}} +\else + % LaTeX2e 2020-10-01 or newer + \def\platpc@discard@input#1{% + \let\platpc@InputIfFileExists\InputIfFileExists + \def\InputIfFileExists##1##2##3{% + \let\InputIfFileExists\platpc@InputIfFileExists}} +\fi +\@onlypreamble\platpc@discard@input + % interface for users who want don't patches %% \plautopatchdisable{<orig 1>,<orig 2>,...} @@ -186,12 +213,24 @@ % --- in most cases, pxeverysel can be safely loaded even after everysel % --- but it can fail when \AtBeginDocument{everysel} is involved \platpc@patch@before{everysel}{pxeverysel}% platex-tools -\platpc@patch@after{everyshi}{pxeveryshi}% platex-tools -\platpc@patch@after{atbegshi}{pxatbegshi}% platex-tools +% --- since LaTeX2e 2020-10-01, everyshi.sty is merely +% --- an emulation by everyshi-ltx.sty from ltshipout.dtx, +% --- which is supported by pLaTeX2e kernel natively +\@ifl@t@r{\fmtversion}{2020/10/01}{}% + {\platpc@patch@after{everyshi}{pxeveryshi}}% platex-tools +% --- since LaTeX2e 2020-10-01, atbegshi.sty is merely +% --- an emulation by atbegshi-ltx.sty from ltshipout.dtx, +% --- which is supported by pLaTeX2e kernel natively +\@ifl@t@r{\fmtversion}{2020/10/01}{}% + {\platpc@patch@after{atbegshi}{pxatbegshi}}% platex-tools \platpc@patch@before{ftnright}{pxftnright}% platex-tools \platpc@patch@after{multicol}{pxmulticol}% platex-tools \platpc@patch@after{xspace}{pxxspace}% platex-tools \platpc@patch@after{textpos}{pxtextpos}% (maintained here!) +% --- until LaTeX2e 2020-10-01, patching eso-pic automatically +% --- is not supported by pxesopic +\@ifl@t@r{\fmtversion}{2020/10/01}% + {\platpc@patch@before{eso-pic}{pxesopic}}{}% (maintained here!) \platpc@patch@after{pdfpages}{pxpdfpages}% (maintained here!) \platpc@patch@before{stfloats}{pxstfloats}% pxsttools -- (!!) % --- in most cases, pxjahyper works without explicit options @@ -213,6 +252,6 @@ % special case, mainly for problematic packages % --- mdwtab forbids loading array % --- so plarray should also be forbidden -\AtEndOfPackageFile{mdwtab}{\@namedef{ver@plarray.sty}{}} +\platpc@ExecuteAfterPackage{mdwtab}{\@namedef{ver@plarray.sty}{}} \endinput diff --git a/Master/texmf-dist/tex/latex/plautopatch/pldocverb.sty b/Master/texmf-dist/tex/latex/plautopatch/pldocverb.sty index fc36b14ccd1..bd1dcb9c84b 100644 --- a/Master/texmf-dist/tex/latex/plautopatch/pldocverb.sty +++ b/Master/texmf-dist/tex/latex/plautopatch/pldocverb.sty @@ -7,9 +7,9 @@ % % This package is expected to be compatible with % * doc.sty -% (2004/02/09 v2.1b -- 2018/09/25 v2.1i) +% (2004/02/09 v2.1b -- 2020/06/15 v2.1m) % * plcore.ltx in platex -% (2001/09/26 v1.2a -- 2019/02/08 v1.3b) +% (2001/09/26 v1.2a -- 2020/03/05 v1.3e) % %% package declaration diff --git a/Master/texmf-dist/tex/latex/plautopatch/plextarydshln.sty b/Master/texmf-dist/tex/latex/plautopatch/plextarydshln.sty index ac0059c5e46..2ccdc865edc 100644 --- a/Master/texmf-dist/tex/latex/plautopatch/plextarydshln.sty +++ b/Master/texmf-dist/tex/latex/plautopatch/plextarydshln.sty @@ -9,7 +9,7 @@ % * arydshln.sty % (2004/08/31 v1.71 -- 2019/02/21 v1.76) % * plext.sty in platex -% (2001/09/26 v1.2 -- 2018/10/07 v1.2k) +% (2001/09/26 v1.2 -- 2019/09/29 v1.2l) % %% package declaration diff --git a/Master/texmf-dist/tex/latex/plautopatch/plextcolortbl.sty b/Master/texmf-dist/tex/latex/plautopatch/plextcolortbl.sty index 08ae5bd82dc..4519b99e24f 100644 --- a/Master/texmf-dist/tex/latex/plautopatch/plextcolortbl.sty +++ b/Master/texmf-dist/tex/latex/plautopatch/plextcolortbl.sty @@ -7,9 +7,9 @@ % % This package is expected to be compatible with % * colortbl.sty -% (2012/06/21 v1.0b -- 2018/12/12 v1.0d) +% (2012/06/21 v1.0b -- 2020/01/04 v1.0e) % * plext.sty in platex -% (2001/09/26 v1.2 -- 2018/10/07 v1.2k) +% (2001/09/26 v1.2 -- 2019/09/29 v1.2l) % %% package declaration diff --git a/Master/texmf-dist/tex/latex/plautopatch/pxesopic.sty b/Master/texmf-dist/tex/latex/plautopatch/pxesopic.sty new file mode 100644 index 00000000000..f020501e947 --- /dev/null +++ b/Master/texmf-dist/tex/latex/plautopatch/pxesopic.sty @@ -0,0 +1,177 @@ +% +% pxesopic.sty +% written by Hironobu Yamashita (@aminophen) +% +% This package is part of the plautopatch bundle. +% https://github.com/aminophen/plautopatch +% +% This package is expected to be compatible with +% * eso-pic.sty +% ????/??/?? v?.? -- 2018/04/12 v2.0h +% +% -------------------------------------------------------------- +% [Note] +% The package ``pxesopic.sty'' relies heavily on internals +% of ``plautopatch.sty'' +% -------------------------------------------------------------- +% + +%% package declaration +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{pxesopic} + [2020/09/27 v0.2a Patch to eso-pic for tombow] + +%% preparations +\def\pxesop@pkgname{pxesopic} +\def\pxesop@error{\PackageError\pxesop@pkgname} +\def\pxesop@warn{\PackageWarningNoLine\pxesop@pkgname} +\let\pxesop@debug\@gobble +\def\pxesop@debug#1{\typeout{\pxesop@pkgname: [DEBUG] #1}}% for debug + +%% hooks +\ifx\declare@file@substitution\@undefined + % LaTeX2e 2020-02-02 PL5 or older + \RequirePackage{filehook} + \let\pxesop@ExecuteAfterPackage=\AtEndOfPackageFile + \let\pxesop@ExecuteBeforePackage=\AtBeginOfPackageFile +\else + % LaTeX2e 2020-10-01 or newer + \def\pxesop@ExecuteAfterPackage#1{\AddToHook{package/after/#1}} + \def\pxesop@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 +\pxesop@ExecuteBeforePackage{eso-pic}{\pxesop@before} +\pxesop@ExecuteAfterPackage{eso-pic}{\pxesop@after} +% +\def\pxesop@before{% + \let\pxesop@AtBeginShipout\AtBeginShipout + \def\AtBeginShipout##1{\def\pxesop@hook{##1}}% hide it + \pxesop@debug{\noexpand\AtBeginShipout disabled}% + \let\pxesop@before\relax +} +\def\pxesop@after{% + \let\AtBeginShipout\pxesop@AtBeginShipout % restore + \let\pxesop@AtBeginShipout\relax + \pxesop@debug{\noexpand\AtBeginShipout restored}% + \let\@unknownoptionerror\relax %% avoid an error + \pxesop@debug{\noexpand\@unknownoptionerror disabled}% + \let\pxesop@after\relax +} +%% + +%% load it; be careful not to cause unknown option error! +\expandafter\ifx\csname @unknownoptionerror\endcsname + \pxesop@error{Failed to save \noexpand\@unknownoptionerror}\@ehc +\fi +\let\pxesop@unknownoptionerror\@unknownoptionerror +% +\chardef\pxesop@status\z@ +\@ifpackageloaded{plautopatch}{% + \expandafter\ifx\csname platpc@begin@eso-pic\endcsname\relax + % ``plautopatch.sty'' is loaded but the macro is \relax + % => means that ``pxesopic.sty'' is automatically loaded + \chardef\pxesop@status\@ne + \fi +}{} +% +%% pass all options to keyval-style ``eso-pic.sty'' +\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{eso-pic}} +\ProcessOptions\relax +\RequirePackage{eso-pic} +% +%% recover the error +\ifnum\pxesop@status>\z@ % auto + \def\pxesop@pkgtohook{eso-pic}% + % note that ``plautopatch.sty'' discards the hook + % on LaTeX2e 2020-02-02 PL5 or older + \ifx\declare@file@substitution\@undefined + \let\pxesop@pkgtohook\pxesop@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@error{Try loading \pxesop@pkgname\space by hand}\@ehc + \fi +\else + \let\pxesop@pkgtohook\pxesop@pkgname +\fi +\pxesop@ExecuteAfterPackage\pxesop@pkgtohook{% + \let\@unknownoptionerror\pxesop@unknownoptionerror + \pxesop@debug{\noexpand\@unknownoptionerror restored}% +} +%% + +%% delayed to detect \iftombow status +\AtBeginDocument{% + \ifx\tombowtrue\@undefined + \pxesop@warn{Tombow feature unavailable, aborting}% + \fi + \iftombow \pxesop@new \else \pxesop@orig \fi}% +% +%% for \iftombow is FALSE => restore from ``eso-pic.sty'' +\expandafter\def\expandafter\pxesop@orig\expandafter{% + \expandafter\AtBeginShipout\expandafter{\pxesop@hook}} +% +%% for \iftombow is TRUE => redefine by ``pxesopic.sty'' +\def\pxesop@new{% + %% \AtStockLowerLeft: based on TRUE of \ESO@isMEMOIR + \renewcommand\AtStockLowerLeft[1]{% + \begingroup + \@tempdima=-\stockwidth + \advance\@tempdima\paperwidth + \@tempdimb=-\stockheight + \advance\@tempdimb\paperheight + %% specific BEGIN + \advance\@tempdima 1in\relax + \advance\@tempdimb 1in\relax + %% specific END + \AtPageLowerLeft{% + \put(\LenToUnit{\@tempdima},\LenToUnit{\@tempdimb}){##1}% + }% + \endgroup + }% === + %% \AtStockUpperLeft: based on TRUE of \ESO@isMEMOIR + \renewcommand\AtStockUpperLeft[1]{% + \AtStockLowerLeft{% + \put(0,\LenToUnit{\stockheight}){##1}% + }% + }% === + %% \AtStockCenter: based on TRUE of \ESO@isMEMOIR + \renewcommand\AtStockCenter[1]{% + \AtStockLowerLeft{% + \put(\LenToUnit{.5\stockwidth},\LenToUnit{.5\stockheight}){##1}% + }% + }% + %% \AtTextUpperLeft: same as FALSE of \ESO@isMEMOIR + % (no change) + % + %% \AtBeginShipout: based on TRUE of \ESO@isMEMOIR + \AtBeginShipout{% + \@tempdima=\dimexpr(\stockwidth-\paperwidth)/2\relax + \@tempdimb=-\dimexpr(\stockheight+\paperheight)/2\relax + \ifESO@texcoord + \advance\@tempdimb\paperheight % [FIXME] not sure! + \fi + \nointerlineskip + \AtBeginShipoutUpperLeft{% + \put(\LenToUnit{\@tempdima},\LenToUnit{\@tempdimb}){% + \ESO@HookIIIBG\ESO@HookIBG\ESO@HookIIBG + \global\let\ESO@HookIIBG\@empty + }% + }% + \AtBeginShipoutUpperLeftForeground{% + \put(\LenToUnit{\@tempdima},\LenToUnit{\@tempdimb}){% + \ESO@HookIFG\ESO@HookIIFG\ESO@HookIIIFG + \global\let\ESO@HookIIFG\@empty + }% + }% + }% === +} +%% + +\endinput +%% EOF diff --git a/Master/texmf-dist/tex/latex/plautopatch/pxpdfpages.sty b/Master/texmf-dist/tex/latex/plautopatch/pxpdfpages.sty index 43c8b274e8e..36b796cf28a 100644 --- a/Master/texmf-dist/tex/latex/plautopatch/pxpdfpages.sty +++ b/Master/texmf-dist/tex/latex/plautopatch/pxpdfpages.sty @@ -7,9 +7,9 @@ % % This package is expected to be compatible with % * pdfpages.sty -% (2015/07/19 v0.5a -- 2017/10/31 v0.5l) +% (2015/07/19 v0.5a -- 2020/01/28 v0.5q) % * plcore.ltx in platex -% (2001/09/26 v1.2a -- 2018/09/02 v1.3) +% (2001/09/26 v1.2a -- 2020/03/05 v1.3e) % %% package declaration diff --git a/Master/texmf-dist/tex/latex/plautopatch/pxpgfrcs.sty b/Master/texmf-dist/tex/latex/plautopatch/pxpgfrcs.sty index 578e26de0b6..b5508dcf476 100644 --- a/Master/texmf-dist/tex/latex/plautopatch/pxpgfrcs.sty +++ b/Master/texmf-dist/tex/latex/plautopatch/pxpgfrcs.sty @@ -9,7 +9,7 @@ %% package declaration \NeedsTeXFormat{pLaTeX2e} \ProvidesPackage{pxpgfrcs} - [2018/09/21 v0.1] + [2018/09/21 v0.1 shadings etc in tate class] \RequirePackage{pgfrcs} % Note: I chose the name "pxpgfrcs.sty" diff --git a/Master/texmf-dist/tex/latex/plautopatch/pxstfloats.sty b/Master/texmf-dist/tex/latex/plautopatch/pxstfloats.sty index fe199749312..2698407f1f3 100644 --- a/Master/texmf-dist/tex/latex/plautopatch/pxstfloats.sty +++ b/Master/texmf-dist/tex/latex/plautopatch/pxstfloats.sty @@ -6,8 +6,9 @@ % for now distributed as part of the plautopatch bundle. % https://github.com/aminophen/plautopatch % -% This package `pxstfloats.sty' is based on: -% * stfloats.sty in sttools (2016/06/28 v3.2) +% This package is expected to be compatible with +% * stfloats.sty in sttools +% 2012/05/29 v1.1 -- 2017/03/27 v3.3 % Many thanks to lltjp-stfloats.sty in LuaTeX-ja project. % diff --git a/Master/texmf-dist/tex/latex/plautopatch/pxtextpos.sty b/Master/texmf-dist/tex/latex/plautopatch/pxtextpos.sty index 439005987ef..c6e7cf5fe0f 100644 --- a/Master/texmf-dist/tex/latex/plautopatch/pxtextpos.sty +++ b/Master/texmf-dist/tex/latex/plautopatch/pxtextpos.sty @@ -13,7 +13,7 @@ %% package declaration \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{pxtextpos} - [2019/11/17 v0.2a Patch to textpos for (u)pLaTeX] + [2019/11/17 v0.2a Patch to textpos for tombow] %% preparations \def\pxtxtpos@pkgname{pxtextpos} |