summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/platex-tools/pxeveryshi.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/platex-tools/pxeveryshi.sty')
-rw-r--r--Master/texmf-dist/tex/latex/platex-tools/pxeveryshi.sty32
1 files changed, 24 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/latex/platex-tools/pxeveryshi.sty b/Master/texmf-dist/tex/latex/platex-tools/pxeveryshi.sty
index 23bbd8abe0e..0b7144a53af 100644
--- a/Master/texmf-dist/tex/latex/platex-tools/pxeveryshi.sty
+++ b/Master/texmf-dist/tex/latex/platex-tools/pxeveryshi.sty
@@ -15,25 +15,41 @@
% --------------------------------------------------------------------
%
-\NeedsTeXFormat{pLaTeX2e}
+%% package declaration
+\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{pxeveryshi}
- [2020/09/25 v0.2 everyshi package for pLaTeX]
-\RequirePackageWithOptions{everyshi}
+ [2021/02/13 v0.2b everyshi package for (u)pLaTeX]
%% Since LaTeX2e 2020-10-01, everyshi.sty is merely
%% an emulation by everyshi-ltx.sty from ltshipout.dtx.
-%% The new code does NOT define \@EveryShipout@Output,
-%% so we can detect it!
-\ifx\@EveryShipout@Output\@undefined
- %% pLaTeX2e 2020-10-01 natively supports the situation
- \PackageInfo{pxeveryshi}{This package is no longer needed}
+\chardef\pxevsh@status=\z@
+\ifx\IfHookExistsTF\@undefined\else % >= LaTeX2e 2020-10-01
+ \IfHookExistsTF{shipout/before}{% % >= LaTeX2e 2020-10-01
+ \chardef\pxevsh@status=\@ne
+ }{}
+\fi
+\ifnum\pxevsh@status=\@ne
+ % if LaTeX2e and pLaTeX2e are inconsistent, raise an error!
+ \@ifl@t@r\pfmtversion{2020/10/01}{%
+ \PackageInfo{pxeveryshi}{This package is no longer needed}%
+ }{%
+ \PackageError{pxeveryshi}{Inconsistent LaTeX2e/pLaTeX2e combination}\@ehc
+ }%
+ \RequirePackageWithOptions{everyshi}% input anyway
\expandafter\endinput
\fi
%% The rest of this package is meant for
%% LaTeX2e 2020-02-02 PL5 or older.
+\RequirePackageWithOptions{everyshi}
+
+\ifx\@EveryShipout@Output\@undefined
+ \PackageError{pxeveryshi}{This should not happen}\@ehc
+ \expandafter\endinput
+\fi
+
\def\@EveryShipout@Output{%
\setbox8\vbox{%
\yoko