diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/platex-tools/pxatbegshi.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/platex-tools/pxatbegshi.sty | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/platex-tools/pxatbegshi.sty b/Master/texmf-dist/tex/latex/platex-tools/pxatbegshi.sty index 3c8a8304154..856b95eb44d 100644 --- a/Master/texmf-dist/tex/latex/platex-tools/pxatbegshi.sty +++ b/Master/texmf-dist/tex/latex/platex-tools/pxatbegshi.sty @@ -30,29 +30,42 @@ %% package declaration \NeedsTeXFormat{pLaTeX2e} \ProvidesPackage{pxatbegshi} - [2020/09/25 v0.7 Patch to atbegshi for (u)pLaTeX] - -%% preparations -\def\pxabgs@pkgname{pxatbegshi} -\def\pxabgs@warn{\PackageWarningNoLine\pxabgs@pkgname} - -%% load it -\RequirePackage{atbegshi} + [2021/02/13 v0.7b Patch to atbegshi for (u)pLaTeX] %% Since LaTeX2e 2020-10-01, atbegshi.sty is merely %% an emulation by atbegshi-ltx.sty from ltshipout.dtx. -%% The new code does NOT define \AtBegShi@Output, -%% so we can detect it! -\ifx\AtBegShi@Output\@undefined - %% pLaTeX2e 2020-10-01 natively supports the situation - \PackageInfo{pxatbegshi}{This package is no longer needed} +\chardef\pxabgs@status=\z@ +\ifx\IfHookExistsTF\@undefined\else % >= LaTeX2e 2020-10-01 + \IfHookExistsTF{shipout/before}{% % >= LaTeX2e 2020-10-01 + \chardef\pxabgs@status=\@ne + }{} +\fi +\ifnum\pxabgs@status=\@ne + % if LaTeX2e and pLaTeX2e are inconsistent, raise an error! + \@ifl@t@r\pfmtversion{2020/10/01}{% + \PackageInfo{pxatbegshi}{This package is no longer needed}% + }{% + \PackageError{pxatbegshi}{Inconsistent LaTeX2e/pLaTeX2e combination}\@ehc + }% + \RequirePackage{atbegshi}% input anyway \expandafter\endinput \fi %% The rest of this package is meant for %% LaTeX2e 2020-02-02 PL5 or older. +\RequirePackage{atbegshi} + +\ifx\AtBegShi@Output\@undefined + \PackageError{pxatbegshi}{This should not happen}\@ehc + \expandafter\endinput +\fi + +%% preparations +\def\pxabgs@pkgname{pxatbegshi} +\def\pxabgs@warn{\PackageWarningNoLine\pxabgs@pkgname} + %% internal macros are locally effective \begingroup |