texlive[56464] Master/texmf-dist: filehook (28sep20)

commits+karl at tug.org commits+karl at tug.org
Mon Sep 28 22:58:16 CEST 2020


Revision: 56464
          http://tug.org/svn/texlive?view=revision&revision=56464
Author:   karl
Date:     2020-09-28 22:58:16 +0200 (Mon, 28 Sep 2020)
Log Message:
-----------
filehook (28sep20)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/filehook/README
    trunk/Master/texmf-dist/doc/latex/filehook/filehook.pdf
    trunk/Master/texmf-dist/source/latex/filehook/filehook.dtx
    trunk/Master/texmf-dist/source/latex/filehook/filehook.ins
    trunk/Master/texmf-dist/tex/latex/filehook/filehook.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/tex/latex/filehook/filehook-2019.sty
    trunk/Master/texmf-dist/tex/latex/filehook/filehook-2020.sty

Modified: trunk/Master/texmf-dist/doc/latex/filehook/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/filehook/README	2020-09-28 20:57:56 UTC (rev 56463)
+++ trunk/Master/texmf-dist/doc/latex/filehook/README	2020-09-28 20:58:16 UTC (rev 56464)
@@ -1,7 +1,7 @@
 LaTeX package 'filehook'
 ~~~~~~~~~~~~~~~~~~~~~~~~
 Copyright (c) 2010-2020 by Martin Scharrer <martin at scharrer-online.de>
-Code repository: https://bitbucket.org/martin_scharrer/filehook
+Code repository: ssh://hth@helixteamhub.cloud/scharrer/projects/filehook/
 
 Provides several file hooks for files read by \input, \include and \InputIfFileExists.
 

Modified: trunk/Master/texmf-dist/doc/latex/filehook/filehook.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/filehook/filehook.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/filehook/filehook.dtx	2020-09-28 20:57:56 UTC (rev 56463)
+++ trunk/Master/texmf-dist/source/latex/filehook/filehook.dtx	2020-09-28 20:58:16 UTC (rev 56464)
@@ -26,15 +26,17 @@
 %<*driver>
 \ProvidesFile{filehook.dtx}[%
 %<=*DATE>
-    2020/02/03
+    2020/09/27
 %<=/DATE>
 %<=*VERSION>
-    v0.7
+    v0.8
 %<=/VERSION>
     Hooks for input files]
 \documentclass{ydoc}
 \GetFileInfo{filehook.dtx}
 \usepackage{filehook}[\filedate]
+\usepackage[utf8]{inputenc}
+\usepackage[TS1,T1]{fontenc}
 \EnableCrossrefs
 \CodelineIndex
 \RecordChanges
@@ -55,7 +57,7 @@
 %</driver>
 % \fi
 %
-% \CheckSum{1011}
+% \CheckSum{1478}
 %
 % \CharacterTable
 %  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -526,6 +528,37 @@
 %
 % \subsection{Options}
 %    \begin{macrocode}
+\DeclareOption{force}{\PassOptionsToPackage{forse}{filehook-2019}}
+\ProcessOptions\relax
+%    \end{macrocode}
+%
+% \subsection{Load actual package}
+%    \begin{macrocode}
+\@ifl at t@r\fmtversion{2020/10/01}{\RequirePackage{filehook-2020}}{\RequirePackage{filehook-2019}}
+%    \end{macrocode}
+%
+% \iffalse
+%</filehook.sty>
+% \fi
+%
+% \iffalse
+%<*filehook-2019.sty>
+% \fi
+%    \begin{macrocode}
+%<!COPYRIGHT>
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesPackage{filehook-2019}[%
+%<!DATE>
+%<!VERSION>
+%<*DRIVER>
+    2099/01/01 develop
+%</DRIVER>
+    Hooks for input files]
+%    \end{macrocode}
+%
+%
+% \subsection{Options}
+%    \begin{macrocode}
 \newif\iffilehook at force
 \DeclareOption{force}{\filehook at forcetrue}
 \ProcessOptions\relax
@@ -1311,10 +1344,657 @@
 %    \end{macrocode}
 %
 % \iffalse
-%</filehook.sty>
+%</filehook-2019.sty>
 % \fi
 %
 % \iffalse
+%<*filehook-2020.sty>
+% \fi
+%    \begin{macrocode}
+%<!COPYRIGHT>
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesPackage{filehook-2020}[%
+%<!DATE>
+%<!VERSION>
+%<*DRIVER>
+    2099/01/01 develop
+%</DRIVER>
+    Hooks for input files]
+%    \end{macrocode}
+%
+%
+% \subsection{Options}
+%    \begin{macrocode}
+\DeclareOption{force}{}
+\ProcessOptions\relax
+%    \end{macrocode}
+%
+% \subsection{General stuff}
+%
+% \subsection{Initialisation of Hooks}
+% The general hooks are initialised to call the file specific hooks.
+%
+% \begin{macro}{\filehook at csuse}
+%    \begin{macrocode}
+\begingroup
+\gdef\filehook at csuse#1{\ifcsname #1\endcsname\csname #1\expandafter\endcsname\fi}
+\expandafter\ifx\csname csuse\endcsname\relax
+    \expandafter\ifx\csname ifcsname\endcsname\relax
+        \gdef\filehook at csuse#1{\expandafter\ifx\csname #1\endcsname\relax\else\csname #1\expandafter\endcsname\fi}
+    \fi
+\else
+    \global\let\filehook at csuse\csuse
+\fi
+\endgroup
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\filehook at include@atbegin}
+%    \begin{macrocode}
+\def\filehook at include@atbegin#1{%
+  \filehook at csuse{\filehook at include@atbegin@#1}%
+  \filehook at include@@atbegin
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\filehook at include@@atbegin}
+%    \begin{macrocode}
+\def\filehook at include@@atbegin{}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\filehook at include@atend}
+%    \begin{macrocode}
+\def\filehook at include@atend#1{%
+  \filehook at include@@atend
+  \filehook at csuse{\filehook at include@atend@#1}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\filehook at include@@atend}
+%    \begin{macrocode}
+\def\filehook at include@@atend{}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\filehook at include@after}
+%    \begin{macrocode}
+\def\filehook at include@after#1{%
+  \filehook at include@@after
+  \filehook at csuse{\filehook at include@after@#1}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\filehook at include@@after}
+%    \begin{macrocode}
+\def\filehook at include@@after{}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\filehook at input@atbegin}
+%    \begin{macrocode}
+\def\filehook at input@atbegin#1{%
+  \filehook at csuse{\filehook at input@atbegin@\filehook at ensureext{#1}}%
+  \filehook at input@@atbegin
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\filehook at input@@atbegin}
+%    \begin{macrocode}
+\def\filehook at input@@atbegin{}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\filehook at input@atend}
+%    \begin{macrocode}
+\def\filehook at input@atend#1{%
+  \filehook at input@@atend
+  \filehook at csuse{\filehook at input@atend@\filehook at ensureext{#1}}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\filehook at input@@atend}
+%    \begin{macrocode}
+\def\filehook at input@@atend{}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\filehook at atbegin}
+%    \begin{macrocode}
+\def\filehook at atbegin#1{%
+  \filehook at csuse{\filehook at atbegin@\filehook at ensureext{#1}}%
+  \filehook@@atbegin
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\filehook@@atbegin}
+%    \begin{macrocode}
+\def\filehook@@atbegin{}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\filehook at atend}
+%    \begin{macrocode}
+\def\filehook at atend#1{%
+  \filehook@@atend
+  \filehook at csuse{\filehook at atend@\filehook at ensureext{#1}}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\filehook@@atend}
+%    \begin{macrocode}
+\def\filehook@@atend{}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\filehook at every@atbegin}
+%    \begin{macrocode}
+\def\filehook at every@atbegin#1{%
+    \filehook at every@@atbegin
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\filehook at every@@atbegin}
+%    \begin{macrocode}
+\def\filehook at every@@atbegin{}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\filehook at every@atend}
+%    \begin{macrocode}
+\def\filehook at every@atend#1{%
+    \filehook at every@@atend
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\filehook at every@@atend}
+%    \begin{macrocode}
+\def\filehook at every@@atend{}
+%    \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{Hook Modification Macros}
+% The following macros are used to modify the hooks, i.e.\ to prefix or append code to them.
+%
+%
+% \subsubsection*{Internal Macros}
+%
+% The macro prefixes for the file specific hooks are stored in macros to reduce the number of
+% tokens in the following macro definitions.
+%    \begin{macrocode}
+\def\filehook at include@atbegin@{filehook at include@atbegin@}
+\def\filehook at include@atend@{filehook at include@atend@}
+\def\filehook at include@after@{filehook at include@after@}
+\def\filehook at input@atbegin@{filehook at input@atbegin@}
+\def\filehook at input@atend@{filehook at input@atend@}
+\def\filehook at input@after@{filehook at input@after@}
+\def\filehook at atbegin@{filehook at atbegin@}
+\def\filehook at atend@{filehook at atend@}
+\def\filehook at after@{filehook at after@}
+%    \end{macrocode}
+%
+%
+% \begin{macro}{\filehook at append}
+% Uses default \LaTeX{} macro.
+%    \begin{macrocode}
+\def\filehook at append{\g at addto@macro}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\filehook at appendwarg}
+% Appends code with one macro argument. The |\@tempa| intermediate step is required because of the
+% included |##1| which wouldn't correctly expand otherwise.
+%    \begin{macrocode}
+\long\def\filehook at appendwarg#1#2{%
+  \begingroup
+    \toks@\expandafter{#1{##1}#2}%
+    \edef\@tempa{\the\toks@}%
+    \expandafter\gdef\expandafter#1\expandafter##\expandafter1\expandafter{\@tempa}%
+  \endgroup
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\filehook at prefix}
+% Prefixes code to a hook.
+%    \begin{macrocode}
+\long\def\filehook at prefix#1#2{%
+  \begingroup
+    \@temptokena{#2}%
+    \toks@\expandafter{#1}%
+    \xdef#1{\the\@temptokena\the\toks@}%
+  \endgroup
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\filehook at prefixwarg}
+% Prefixes code with an argument to a hook.
+%    \begin{macrocode}
+\long\def\filehook at prefixwarg#1#2{%
+  \begingroup
+    \@temptokena{#2}%
+    \toks@\expandafter{#1{##1}}%
+    \edef\@tempa{\the\@temptokena\the\toks@}%
+    \expandafter\gdef\expandafter#1\expandafter##\expandafter1\expandafter{\@tempa}%
+  \endgroup
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\filehook at addtohook}[3]{Macro which should be used to add the material to the hook}{Macro name prefix}{End of macro name (file name)}
+% The macro first expands the file name (|#3|) to flatten all included macros. An extension is added if missing, as well as the prefix.
+% All modifications of |\@tempa| are made inside a group to keep them local.
+%    \begin{macrocode}
+\def\filehook at addtohook#1#2#3{%
+  \begingroup
+  \edef\@tempa{#3}%
+  \edef\@tempa{#2\filehook at ensureext{\@tempa}}%
+  \@ifundefined{\@tempa}{\global\@namedef{\@tempa}{}}{}%
+  \expandafter\endgroup
+  \expandafter#1\csname\@tempa\endcsname
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \subsubsection*{User Level Macros}
+% The user level macros simple use the above defined macros on the appropriate hook.
+%
+% \begin{macro}{\AtBeginOfIncludes}
+%    \begin{macrocode}
+\newcommand*\AtBeginOfIncludes{%
+  \filehook at append\filehook at include@@atbegin
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AtEndOfIncludes}
+%    \begin{macrocode}
+\newcommand*\AtEndOfIncludes{%
+  \filehook at prefix\filehook at include@@atend
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AfterIncludes}
+%    \begin{macrocode}
+\newcommand*\AfterIncludes{%
+  \filehook at prefix\filehook at include@@after
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AtBeginOfIncludeFile}
+%    \begin{macrocode}
+\newcommand*\AtBeginOfIncludeFile[1]{%
+  \filehook at addtohook\filehook at append\filehook at include@atbegin@{\filehook at ensuretex{#1}}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AtEndOfIncludeFile}
+%    \begin{macrocode}
+\newcommand*\AtEndOfIncludeFile[1]{%
+  \filehook at addtohook\filehook at prefix\filehook at include@atend@{\filehook at ensuretex{#1}}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AfterIncludeFile}
+%    \begin{macrocode}
+\newcommand*\AfterIncludeFile[1]{%
+  \filehook at addtohook\filehook at prefix\filehook at include@after@{\filehook at ensuretex{#1}}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AtBeginOfInputs}
+%    \begin{macrocode}
+\newcommand*\AtBeginOfInputs{%
+  \filehook at append\filehook at input@@atbegin
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AtEndOfInputs}
+%    \begin{macrocode}
+\newcommand*\AtEndOfInputs{%
+  \filehook at prefix\filehook at input@@atend
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AtBeginOfInputFile}
+%    \begin{macrocode}
+\newcommand*\AtBeginOfInputFile{%
+  \filehook at addtohook\filehook at append\filehook at input@atbegin@
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AtEndOfInputFile}
+%    \begin{macrocode}
+\newcommand*\AtEndOfInputFile{%
+  \filehook at addtohook\filehook at prefix\filehook at input@atend@
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AtBeginOfFiles}
+%    \begin{macrocode}
+\newcommand*\AtBeginOfFiles{%
+  \filehook at append\filehook@@atbegin
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AtEndOfFiles}
+%    \begin{macrocode}
+\newcommand*\AtEndOfFiles{%
+  \filehook at prefix\filehook@@atend
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AtBeginOfEveryFile}
+%    \begin{macrocode}
+\newcommand*\AtBeginOfEveryFile{%
+  \filehook at append\filehook at every@@atbegin
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AtEndOfEveryFile}
+%    \begin{macrocode}
+\newcommand*\AtEndOfEveryFile{%
+  \filehook at prefix\filehook at every@@atend
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AtBeginOfFile}
+%    \begin{macrocode}
+\newcommand*\AtBeginOfFile{%
+  \filehook at addtohook\filehook at append\filehook at atbegin@
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AtEndOfFile}
+%    \begin{macrocode}
+\newcommand*\AtEndOfFile{%
+  \filehook at addtohook\filehook at prefix\filehook at atend@
+}
+%    \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\AtBeginOfClassFile}
+%    \begin{macrocode}
+\newcommand*\AtBeginOfClassFile{%
+    \@ifnextchar*
+        {\AtBeginOfXFile at star\@clsextension}%
+        {\AtBeginOfXFile at normal\@clsextension}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AtBeginOfPackageFile}
+%    \begin{macrocode}
+\newcommand*\AtBeginOfPackageFile{%
+    \@ifnextchar*
+        {\AtBeginOfXFile at star\@pkgextension}%
+        {\AtBeginOfXFile at normal\@pkgextension}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AtBeginOfXFile at star}[2]{extension}{name}
+% If the class or package is already loaded the code is executed right away.
+% Otherwise it is installed normally.
+%    \begin{macrocode}
+\def\AtBeginOfXFile at star#1*#2{%
+    \@ifl at aded{#1}{#2}%
+        {\@firstofone}%
+        {\AtBeginOfXFile at normal{#1}{#2}}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AtBeginOfXFile at normal}[2]{extension}{name}
+%    \begin{macrocode}
+\def\AtBeginOfXFile at normal#1#2{%
+    \AtBeginOfFile{#2.#1}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\AtEndOfClassFile}
+%    \begin{macrocode}
+\newcommand*\AtEndOfClassFile{%
+    \@ifnextchar*
+        {\AtEndOfXFile at star\@clsextension}%
+        {\AtEndOfXFile at normal\@clsextension}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AtEndOfPackageFile}
+%    \begin{macrocode}
+\newcommand*\AtEndOfPackageFile{%
+    \@ifnextchar*
+        {\AtEndOfXFile at star\@pkgextension}%
+        {\AtEndOfXFile at normal\@pkgextension}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\AtEndOfXFile at star}[2]{extension}{name}
+% If the class or package is already loaded the code is executed right away.
+% Otherwise it is installed normally.
+%    \begin{macrocode}
+\def\AtEndOfXFile at star#1*#2{%
+    \@ifl at aded{#1}{#2}%
+        {\@firstofone}%
+        {\AtEndOfXFile at normal{#1}{#2}}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AtEndOfXFile at normal}[2]{extension}{name}
+% Note that \Macro\AtEndOfClass is identical to \Macro\AtEndOfPackage, so no
+% differentiation between classes and packages is needed here.
+%    \begin{macrocode}
+\long\def\AtEndOfXFile at normal#1#2#3{%
+    \AtEndOfFile{#2.#1}{\AtEndOfPackage{#3}}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ClearHook}
+% Clears the hook by temporary redefining the prefix and append macros
+% to do a simple definition to empty.
+%    \begin{macrocode}
+\newcommand*\ClearHook{%
+    \begingroup
+    \def\filehook at prefix##1##2{%
+        \gdef##1{}%
+        \endgroup
+    }%
+    \let\filehook at append\filehook at prefix
+}
+%    \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+% \subsection{Installation of Hooks}
+% The \Macro\@input@ and \Macro\@iinput macros from |latex.ltx| are redefined to install the hooks.
+%
+% \begin{macro}{\@input@}
+% This macro is redefined for the \Macro\include file hooks.
+% Checks if the next command is \Macro\clearpage which indicates that we are inside \Macro\@include.
+% If so the hooks are installed, otherwise the original macro is used unchanged.
+% For the `after' hook an own \Macro\clearpage is inserted and the original one is gobbled.
+%
+%    \begin{macrocode}
+\def\DEPRECATED at input@#1{%
+  \@ifnextchar\clearpage
+    {%
+     \filehook at every@atbegin{#1}%
+     \filehook at include@atbegin{#1}%
+     \filehook at orig@@input@{#1}%
+     \filehook at include@atend{#1}%
+     \clearpage
+     \filehook at include@after{#1}%
+     \filehook at every@atend{#1}%
+     \@gobble
+    }%
+    {\filehook at orig@@input@{#1}}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@iinput}
+% This macro is redefined for the \Macro\input file hooks.
+% it simply surrounds the original macro with the hooks.
+%    \begin{macrocode}
+\def\filehook@@iinput#1{%
+  \filehook at every@atbegin{#1}%
+  \filehook at input@atbegin{#1}%
+  \filehook at orig@@iinput{#1}%
+  \filehook at input@atend{#1}%
+  \filehook at every@atend{#1}%
+}
+%\let\@iinput\filehook@@iinput
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\filehook at ensureext}
+% This macro ensures the existence of a file name extension. If non is given `|.tex|' is
+% added.
+%    \begin{macrocode}
+\def\filehook at ensureext#1{%
+    \expandafter\filehook@@ensureext#1\empty.tex\empty\empty
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\filehook@@ensureext}
+%    \begin{macrocode}
+\def\filehook@@ensureext#1.#2\empty#3\empty{#1.#2}
+%    \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\filehook at ensuretex}
+% Ensures a `|.tex|' extension, i.e. adds it if missing, even if there is a different one.
+%    \begin{macrocode}
+\def\filehook at ensuretex#1{%
+    \expandafter\filehook@@ensuretex#1\empty.tex\empty\empty
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\filehook@@ensuretex}
+%    \begin{macrocode}
+\def\filehook@@ensuretex#1.tex\empty#2\empty{#1.tex}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Hook}
+%    \begin{macrocode}
+\AddToHook{include/before}{%
+    \filehook at include@atbegin{\CurrentFile}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Hook}
+%    \begin{macrocode}
+\AddToHook{include/end}{%
+    \filehook at include@atend{\CurrentFile}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Hook}
+%    \begin{macrocode}
+\AddToHook{include/after}{%
+    \filehook at include@after{\CurrentFile}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\filehook at istexfile}
+%    \begin{macrocode}
+\begingroup
+\edef\dottex{\expandafter\expandafter\expandafter\@gobble\expandafter\string\csname.tex\endcsname}
+\expandafter
+\gdef\expandafter\filehook at istexfile\expandafter#\expandafter1\expandafter{%
+    \expandafter\expandafter\expandafter\filehook at istexfile@\expandafter#\expandafter1\expandafter\empty\dottex\empty\empty\@nil
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\filehook at istexfile@}
+%    \begin{macrocode}
+\expandafter\gdef\expandafter\filehook at istexfile@\expandafter#\expandafter1\dottex\empty#2\empty#3\@nil{%
+    \begingroup
+    \def\@tempa{#2}%
+    \ifx\@tempa\empty
+        \endgroup
+        \expandafter\@secondoftwo
+    \else
+        \endgroup
+        \expandafter\@firstoftwo
+    \fi
+}
+\endgroup
+%    \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\Hook}
+%    \begin{macrocode}
+\AddToHook{file/before}{%
+    \filehook at every@atbegin{\CurrentFile}%
+    \filehook at istexfile\CurrentFile{\filehook at input@atbegin{\CurrentFile}}{}%
+    \filehook at atbegin{\CurrentFile}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Hook}
+%    \begin{macrocode}
+\AddToHook{file/after}{%
+    \filehook at atend{\CurrentFile}%
+    \filehook at istexfile\CurrentFile{\filehook at input@atend{\CurrentFile}}{}%
+    \filehook at every@atend{\CurrentFile}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \iffalse
+%</filehook-2020.sty>
+% \fi
+%
+% \iffalse
 %<*filehook-memoir.sty>
 % \fi
 %    \begin{macrocode}

Modified: trunk/Master/texmf-dist/source/latex/filehook/filehook.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/filehook/filehook.ins	2020-09-28 20:57:56 UTC (rev 56463)
+++ trunk/Master/texmf-dist/source/latex/filehook/filehook.ins	2020-09-28 20:58:16 UTC (rev 56464)
@@ -5,6 +5,8 @@
 \askforoverwritefalse
 \generate{%
     \file{filehook.sty}{\nopreamble\from{filehook.dtx}{filehook.sty}}%
+    \file{filehook-2019.sty}{\nopreamble\from{filehook.dtx}{filehook-2019.sty}}%
+    \file{filehook-2020.sty}{\nopreamble\from{filehook.dtx}{filehook-2020.sty}}%
     \file{filehook-scrlfile.sty}{\nopreamble\from{filehook.dtx}{filehook-scrlfile.sty}}%
     \file{filehook-memoir.sty}{\nopreamble\from{filehook.dtx}{filehook-memoir.sty}}%
     \file{filehook-listings.sty}{\nopreamble\from{filehook.dtx}{filehook-listings.sty}}%

Added: trunk/Master/texmf-dist/tex/latex/filehook/filehook-2019.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/filehook/filehook-2019.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/filehook/filehook-2019.sty	2020-09-28 20:58:16 UTC (rev 56464)
@@ -0,0 +1,379 @@
+%% Copyright (C) 2011-2020 by Martin Scharrer <martin at scharrer-online.de>
+%% ----------------------------------------------------------------------
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%%   http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Martin Scharrer.
+%%
+%% This work consists of the files filehook.dtx and filehook.ins
+%% and the derived files filehook.sty, filehook-fink.sty,
+%% filehook-listings.sty, filehook-memoir.sty, filehook-scrlfile.sty
+%% and pgf-filehook.sty
+%%
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesPackage{filehook-2019}[%
+    2020/09/27
+    v0.8
+    Hooks for input files]
+\newif\iffilehook at force
+\DeclareOption{force}{\filehook at forcetrue}
+\ProcessOptions\relax
+\newif\iffilehook at newfmt
+\@ifl at t@r\fmtversion{2019/10/01}{\filehook at newfmttrue}{\filehook at newfmtfalse}
+\def\filehook at let#1#2{%
+  \expandafter\ifx\csname #2\space\endcsname\relax
+    \expandafter\let\csname #1\expandafter\endcsname\csname #2\endcsname
+  \else
+    \expandafter\def\csname #1\expandafter\endcsname\expandafter{\expandafter\protect\csname #1\space\endcsname}%
+    \expandafter\let\csname #1\space\expandafter\endcsname\csname #2\space\endcsname
+  \fi
+}
+\def\filehook at glet#1#2{%
+  \expandafter\ifx\csname #2\space\endcsname\relax
+    \expandafter\global\expandafter\let\csname #1\expandafter\endcsname\csname #2\endcsname
+  \else
+    \expandafter\global\expandafter\def\csname #1\expandafter\endcsname\expandafter{\expandafter\protect\csname #1\space\endcsname}%
+    \expandafter\global\expandafter\let\csname #1\space\expandafter\endcsname\csname #2\space\endcsname
+  \fi
+}
+\def\filehook at cmp#1#2{%
+  \expandafter\ifx\csname #2\space\endcsname\relax
+    \expandafter\ifx\csname #1\expandafter\endcsname\csname #2\endcsname
+      \expandafter\expandafter\expandafter\@firstoftwo
+    \else
+      \expandafter\expandafter\expandafter\@secondoftwo
+    \fi
+  \else
+    \expandafter\ifx\csname #1\space\expandafter\endcsname\csname #2\space\endcsname
+      \expandafter\expandafter\expandafter\@firstoftwo
+    \else
+      \expandafter\expandafter\expandafter\@secondoftwo
+    \fi
+  \fi
+}
+\begingroup
+\gdef\filehook at csuse#1{\ifcsname #1\endcsname\csname #1\expandafter\endcsname\fi}
+\expandafter\ifx\csname csuse\endcsname\relax
+    \expandafter\ifx\csname ifcsname\endcsname\relax
+        \gdef\filehook at csuse#1{\expandafter\ifx\csname #1\endcsname\relax\else\csname #1\expandafter\endcsname\fi}
+    \fi
+\else
+    \global\let\filehook at csuse\csuse
+\fi
+\endgroup
+\def\filehook at include@atbegin#1{%
+  \filehook at let{InputIfFileExists}{filehook@@InputIfFileExists}%
+  \filehook at csuse{\filehook at include@atbegin@#1}%
+  \filehook at include@@atbegin
+}
+\def\filehook at include@@atbegin{}
+\def\filehook at include@atend#1{%
+  \filehook at include@@atend
+  \filehook at csuse{\filehook at include@atend@#1}%
+}
+\def\filehook at include@@atend{}
+\def\filehook at include@after#1{%
+  \filehook at include@@after
+  \filehook at csuse{\filehook at include@after@#1}%
+}
+\def\filehook at include@@after{}
+\def\filehook at input@atbegin#1{%
+  \filehook at let{InputIfFileExists}{filehook@@InputIfFileExists}%
+  \filehook at csuse{\filehook at input@atbegin@\filehook at ensureext{#1}}%
+  \filehook at input@@atbegin
+}
+\def\filehook at input@@atbegin{}
+\def\filehook at input@atend#1{%
+  \filehook at input@@atend
+  \filehook at csuse{\filehook at input@atend@\filehook at ensureext{#1}}%
+}
+\def\filehook at input@@atend{}
+\def\filehook at atbegin#1{%
+  \filehook at csuse{\filehook at atbegin@\filehook at ensureext{#1}}%
+  \filehook@@atbegin
+}
+\def\filehook@@atbegin{}
+\def\filehook at atend#1{%
+  \filehook@@atend
+  \filehook at csuse{\filehook at atend@\filehook at ensureext{#1}}%
+}
+\def\filehook@@atend{}
+\def\filehook at every@atbegin#1{%
+    \filehook at every@@atbegin
+}
+\def\filehook at every@@atbegin{}
+\def\filehook at every@atend#1{%
+    \filehook at every@@atend
+}
+\def\filehook at every@@atend{}
+\def\filehook at include@atbegin@{filehook at include@atbegin@}
+\def\filehook at include@atend@{filehook at include@atend@}
+\def\filehook at include@after@{filehook at include@after@}
+\def\filehook at input@atbegin@{filehook at input@atbegin@}
+\def\filehook at input@atend@{filehook at input@atend@}
+\def\filehook at input@after@{filehook at input@after@}
+\def\filehook at atbegin@{filehook at atbegin@}
+\def\filehook at atend@{filehook at atend@}
+\def\filehook at after@{filehook at after@}
+\def\filehook at append{\g at addto@macro}
+\long\def\filehook at appendwarg#1#2{%
+  \begingroup
+    \toks@\expandafter{#1{##1}#2}%
+    \edef\@tempa{\the\toks@}%
+    \expandafter\gdef\expandafter#1\expandafter##\expandafter1\expandafter{\@tempa}%
+  \endgroup
+}
+\long\def\filehook at prefix#1#2{%
+  \begingroup
+    \@temptokena{#2}%
+    \toks@\expandafter{#1}%
+    \xdef#1{\the\@temptokena\the\toks@}%
+  \endgroup
+}
+\long\def\filehook at prefixwarg#1#2{%
+  \begingroup
+    \@temptokena{#2}%
+    \toks@\expandafter{#1{##1}}%
+    \edef\@tempa{\the\@temptokena\the\toks@}%
+    \expandafter\gdef\expandafter#1\expandafter##\expandafter1\expandafter{\@tempa}%
+  \endgroup
+}
+\def\filehook at addtohook#1#2#3{%
+  \begingroup
+  \edef\@tempa{#3}%
+  \edef\@tempa{#2\filehook at ensureext{\@tempa}}%
+  \@ifundefined{\@tempa}{\global\@namedef{\@tempa}{}}{}%
+  \expandafter\endgroup
+  \expandafter#1\csname\@tempa\endcsname
+}
+\newcommand*\AtBeginOfIncludes{%
+  \filehook at append\filehook at include@@atbegin
+}
+\newcommand*\AtEndOfIncludes{%
+  \filehook at prefix\filehook at include@@atend
+}
+\newcommand*\AfterIncludes{%
+  \filehook at prefix\filehook at include@@after
+}
+\newcommand*\AtBeginOfIncludeFile[1]{%
+  \filehook at addtohook\filehook at append\filehook at include@atbegin@{\filehook at ensuretex{#1}}%
+}
+\newcommand*\AtEndOfIncludeFile[1]{%
+  \filehook at addtohook\filehook at prefix\filehook at include@atend@{\filehook at ensuretex{#1}}%
+}
+\newcommand*\AfterIncludeFile[1]{%
+  \filehook at addtohook\filehook at prefix\filehook at include@after@{\filehook at ensuretex{#1}}%
+}
+\newcommand*\AtBeginOfInputs{%
+  \filehook at append\filehook at input@@atbegin
+}
+\newcommand*\AtEndOfInputs{%
+  \filehook at prefix\filehook at input@@atend
+}
+\newcommand*\AtBeginOfInputFile{%
+  \filehook at addtohook\filehook at append\filehook at input@atbegin@
+}
+\newcommand*\AtEndOfInputFile{%
+  \filehook at addtohook\filehook at prefix\filehook at input@atend@
+}
+\newcommand*\AtBeginOfFiles{%
+  \filehook at append\filehook@@atbegin
+}
+\newcommand*\AtEndOfFiles{%
+  \filehook at prefix\filehook@@atend
+}
+\newcommand*\AtBeginOfEveryFile{%
+  \filehook at append\filehook at every@@atbegin
+}
+\newcommand*\AtEndOfEveryFile{%
+  \filehook at prefix\filehook at every@@atend
+}
+\newcommand*\AtBeginOfFile{%
+  \filehook at addtohook\filehook at append\filehook at atbegin@
+}
+\newcommand*\AtEndOfFile{%
+  \filehook at addtohook\filehook at prefix\filehook at atend@
+}
+\newcommand*\AtBeginOfClassFile{%
+    \@ifnextchar*
+        {\AtBeginOfXFile at star\@clsextension}%
+        {\AtBeginOfXFile at normal\@clsextension}%
+}
+\newcommand*\AtBeginOfPackageFile{%
+    \@ifnextchar*
+        {\AtBeginOfXFile at star\@pkgextension}%
+        {\AtBeginOfXFile at normal\@pkgextension}%
+}
+\def\AtBeginOfXFile at star#1*#2{%
+    \@ifl at aded{#1}{#2}%
+        {\@firstofone}%
+        {\AtBeginOfXFile at normal{#1}{#2}}%
+}
+\def\AtBeginOfXFile at normal#1#2{%
+    \AtBeginOfFile{#2.#1}%
+}
+\newcommand*\AtEndOfClassFile{%
+    \@ifnextchar*
+        {\AtEndOfXFile at star\@clsextension}%
+        {\AtEndOfXFile at normal\@clsextension}%
+}
+\newcommand*\AtEndOfPackageFile{%
+    \@ifnextchar*
+        {\AtEndOfXFile at star\@pkgextension}%
+        {\AtEndOfXFile at normal\@pkgextension}%
+}
+\def\AtEndOfXFile at star#1*#2{%
+    \@ifl at aded{#1}{#2}%
+        {\@firstofone}%
+        {\AtEndOfXFile at normal{#1}{#2}}%
+}
+\long\def\AtEndOfXFile at normal#1#2#3{%
+    \AtEndOfFile{#2.#1}{\AtEndOfPackage{#3}}%
+}
+\newcommand*\ClearHook{%
+    \begingroup
+    \def\filehook at prefix##1##2{%
+        \gdef##1{}%
+        \endgroup
+    }%
+    \let\filehook at append\filehook at prefix
+}
+\let\filehook at orig@@input@\@input@
+\let\filehook at orig@@iinput\@iinput
+\def\@input@#1{%
+  \@ifnextchar\clearpage
+    {%
+     \filehook at every@atbegin{#1}%
+     \filehook at include@atbegin{#1}%
+     \filehook at orig@@input@{#1}%
+     \filehook at include@atend{#1}%
+     \clearpage
+     \filehook at include@after{#1}%
+     \filehook at every@atend{#1}%
+     \@gobble
+    }%
+    {\filehook at orig@@input@{#1}}%
+}
+\def\filehook@@iinput#1{%
+  \filehook at every@atbegin{#1}%
+  \filehook at input@atbegin{#1}%
+  \filehook at orig@@iinput{#1}%
+  \filehook at input@atend{#1}%
+  \filehook at every@atend{#1}%
+}
+\let\@iinput\filehook@@iinput
+\def\filehook at swap#1#2{#2#1}
+\def\filehook at ensureext#1{%
+    \expandafter\filehook@@ensureext#1\empty.tex\empty\empty
+}
+\def\filehook@@ensureext#1.#2\empty#3\empty{#1.#2}
+\def\filehook at ensuretex#1{%
+    \expandafter\filehook@@ensuretex#1\empty.tex\empty\empty
+}
+\def\filehook@@ensuretex#1.tex\empty#2\empty{#1.tex}
+\iffilehook at newfmt
+\expandafter\def\expandafter\latex at InputIfFileExists\expandafter{%
+  \expandafter\protect\csname InputIfFileExists\space\endcsname
+}
+\expandafter\long\expandafter\def\csname latex at InputIfFileExists\space\endcsname#1#2{%
+  \IfFileExists{#1}%
+    {%
+  \expandafter\@swaptwoargs\expandafter
+      {\@filef at und}{#2\@addtofilelist{#1}\@@input}}}
+\else
+\long\def\latex at InputIfFileExists#1#2{%
+  \IfFileExists{#1}%
+    {#2\@addtofilelist{#1}%
+     \@@input\@filef at und
+    }%
+}
+\fi
+\DeclareRobustCommand\filehook at default@InputIfFileExists[2]{%
+  \IfFileExists{#1}%
+    {\expandafter\filehook at swap
+     \expandafter{\@filef at und}%
+     {#2\@addtofilelist{#1}%
+     \filehook at every@atbegin{#1}%
+     \filehook at atbegin{#1}%
+     \@@input}%
+     \filehook at atend{#1}%
+     \filehook at every@atend{#1}%
+    }%
+}
+\filehook at glet{filehook at default@InputIfFileExists}{filehook at default@InputIfFileExists}%
+\DeclareRobustCommand\filehook@@default at InputIfFileExists[2]{%
+  \filehook at let{InputIfFileExists}{filehook at InputIfFileExists}%
+  \IfFileExists{#1}%
+    {\expandafter\filehook at swap
+     \expandafter{\@filef at und}%
+     {#2\@addtofilelist{#1}%
+     \filehook at atbegin{#1}%
+     \@@input}%
+     \filehook at atend{#1}%
+    }%
+}
+\filehook at glet{filehook@@default at InputIfFileExists}{filehook@@default at InputIfFileExists}%
+\AtBeginOfPackageFile{scrlfile}{%
+   \filehook at glet{InputIfFileExists}{latex at InputIfFileExists}%
+}%
+\AtEndOfPackageFile*{scrlfile}{%
+   \RequirePackage{filehook-scrlfile}%
+}%
+\AtBeginOfPackageFile*{fink}{%
+   \RequirePackage{kvoptions}%
+   \begingroup
+   \filehook at let{InputIfFileExists}{latex at InputIfFileExists}%
+}%
+\AtEndOfPackageFile*{fink}{%
+   \edef\@tempa{\noexpand\PassOptionsToPackage{mainext=\fnk at mainext,maindir=\fnk at maindir}{currfile}}%
+   \expandafter\endgroup\@tempa
+   \RequirePackage{filehook-fink}%
+}%
+\AtBeginOfClassFile{memoir}{%
+  \filehook at let{InputIfFileExists}{latex at InputIfFileExists}%
+  \let\@iinput\filehook at orig@@iinput
+}%
+\AtEndOfClassFile*{memoir}{%
+  \let\@iinput\filehook@@iinput
+  \RequirePackage{filehook-memoir}%
+}%
+\filehook at cmp{InputIfFileExists}{filehook at InputIfFileExists}%
+  {}% already set up
+  {%
+    \filehook at cmp{InputIfFileExists}{latex at InputIfFileExists}%
+      {%
+        \filehook at let{filehook at InputIfFileExists}{filehook at default@InputIfFileExists}%
+        \filehook at let{filehook@@InputIfFileExists}{filehook@@default at InputIfFileExists}%
+        \filehook at let{InputIfFileExists}{filehook at InputIfFileExists}%
+      }%
+      {%
+        \iffilehook at force
+          \filehook at let{filehook at InputIfFileExists}{filehook at default@InputIfFileExists}%
+          \filehook at let{filehook@@InputIfFileExists}{filehook@@default at InputIfFileExists}%
+          \filehook at let{InputIfFileExists}{filehook at InputIfFileExists}%
+          \PackageWarning{filehook}{Detected unknown definition of \string\InputIfFileExists.^^J%
+                                    The 'force' option of 'filehook' is in effect. Macro is overwritten with default!}%
+        \else
+          \PackageError{filehook}{Detected unknown definition of \string\InputIfFileExists.^^J%
+                                  Use the 'force' option of 'filehook' to overwrite it.}{}%
+        \fi
+      }%
+  }%
+\AtBeginDocument{%
+    % Check if definition got changed again. For the new LaTeX format we check again \InputIfFileExists<space>,
+    % for the old format to \InputIfFileExists directly.
+    \filehook at cmp{InputIfFileExists}{filehook at InputIfFileExists}{}{%
+        \PackageWarning{filehook}{Macro \string\InputIfFileExists\space got redefined after 'filehook' was loaded.^^J%
+                                  Certain file hooks might now be dysfunctional!}%
+    }%
+}
+\endinput
+%%
+%% End of file `filehook-2019.sty'.


Property changes on: trunk/Master/texmf-dist/tex/latex/filehook/filehook-2019.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/filehook/filehook-2020.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/filehook/filehook-2020.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/filehook/filehook-2020.sty	2020-09-28 20:58:16 UTC (rev 56464)
@@ -0,0 +1,280 @@
+%% Copyright (C) 2011-2020 by Martin Scharrer <martin at scharrer-online.de>
+%% ----------------------------------------------------------------------
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%%   http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Martin Scharrer.
+%%
+%% This work consists of the files filehook.dtx and filehook.ins
+%% and the derived files filehook.sty, filehook-fink.sty,
+%% filehook-listings.sty, filehook-memoir.sty, filehook-scrlfile.sty
+%% and pgf-filehook.sty
+%%
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesPackage{filehook-2020}[%
+    2020/09/27
+    v0.8
+    Hooks for input files]
+\DeclareOption{force}{}
+\ProcessOptions\relax
+\begingroup
+\gdef\filehook at csuse#1{\ifcsname #1\endcsname\csname #1\expandafter\endcsname\fi}
+\expandafter\ifx\csname csuse\endcsname\relax
+    \expandafter\ifx\csname ifcsname\endcsname\relax
+        \gdef\filehook at csuse#1{\expandafter\ifx\csname #1\endcsname\relax\else\csname #1\expandafter\endcsname\fi}
+    \fi
+\else
+    \global\let\filehook at csuse\csuse
+\fi
+\endgroup
+\def\filehook at include@atbegin#1{%
+  \filehook at csuse{\filehook at include@atbegin@#1}%
+  \filehook at include@@atbegin
+}
+\def\filehook at include@@atbegin{}
+\def\filehook at include@atend#1{%
+  \filehook at include@@atend
+  \filehook at csuse{\filehook at include@atend@#1}%
+}
+\def\filehook at include@@atend{}
+\def\filehook at include@after#1{%
+  \filehook at include@@after
+  \filehook at csuse{\filehook at include@after@#1}%
+}
+\def\filehook at include@@after{}
+\def\filehook at input@atbegin#1{%
+  \filehook at csuse{\filehook at input@atbegin@\filehook at ensureext{#1}}%
+  \filehook at input@@atbegin
+}
+\def\filehook at input@@atbegin{}
+\def\filehook at input@atend#1{%
+  \filehook at input@@atend
+  \filehook at csuse{\filehook at input@atend@\filehook at ensureext{#1}}%
+}
+\def\filehook at input@@atend{}
+\def\filehook at atbegin#1{%
+  \filehook at csuse{\filehook at atbegin@\filehook at ensureext{#1}}%
+  \filehook@@atbegin
+}
+\def\filehook@@atbegin{}
+\def\filehook at atend#1{%
+  \filehook@@atend
+  \filehook at csuse{\filehook at atend@\filehook at ensureext{#1}}%
+}
+\def\filehook@@atend{}
+\def\filehook at every@atbegin#1{%
+    \filehook at every@@atbegin
+}
+\def\filehook at every@@atbegin{}
+\def\filehook at every@atend#1{%
+    \filehook at every@@atend
+}
+\def\filehook at every@@atend{}
+\def\filehook at include@atbegin@{filehook at include@atbegin@}
+\def\filehook at include@atend@{filehook at include@atend@}
+\def\filehook at include@after@{filehook at include@after@}
+\def\filehook at input@atbegin@{filehook at input@atbegin@}
+\def\filehook at input@atend@{filehook at input@atend@}
+\def\filehook at input@after@{filehook at input@after@}
+\def\filehook at atbegin@{filehook at atbegin@}
+\def\filehook at atend@{filehook at atend@}
+\def\filehook at after@{filehook at after@}
+\def\filehook at append{\g at addto@macro}
+\long\def\filehook at appendwarg#1#2{%
+  \begingroup
+    \toks@\expandafter{#1{##1}#2}%
+    \edef\@tempa{\the\toks@}%
+    \expandafter\gdef\expandafter#1\expandafter##\expandafter1\expandafter{\@tempa}%
+  \endgroup
+}
+\long\def\filehook at prefix#1#2{%
+  \begingroup
+    \@temptokena{#2}%
+    \toks@\expandafter{#1}%
+    \xdef#1{\the\@temptokena\the\toks@}%
+  \endgroup
+}
+\long\def\filehook at prefixwarg#1#2{%
+  \begingroup
+    \@temptokena{#2}%
+    \toks@\expandafter{#1{##1}}%
+    \edef\@tempa{\the\@temptokena\the\toks@}%
+    \expandafter\gdef\expandafter#1\expandafter##\expandafter1\expandafter{\@tempa}%
+  \endgroup
+}
+\def\filehook at addtohook#1#2#3{%
+  \begingroup
+  \edef\@tempa{#3}%
+  \edef\@tempa{#2\filehook at ensureext{\@tempa}}%
+  \@ifundefined{\@tempa}{\global\@namedef{\@tempa}{}}{}%
+  \expandafter\endgroup
+  \expandafter#1\csname\@tempa\endcsname
+}
+\newcommand*\AtBeginOfIncludes{%
+  \filehook at append\filehook at include@@atbegin
+}
+\newcommand*\AtEndOfIncludes{%
+  \filehook at prefix\filehook at include@@atend
+}
+\newcommand*\AfterIncludes{%
+  \filehook at prefix\filehook at include@@after
+}
+\newcommand*\AtBeginOfIncludeFile[1]{%
+  \filehook at addtohook\filehook at append\filehook at include@atbegin@{\filehook at ensuretex{#1}}%
+}
+\newcommand*\AtEndOfIncludeFile[1]{%
+  \filehook at addtohook\filehook at prefix\filehook at include@atend@{\filehook at ensuretex{#1}}%
+}
+\newcommand*\AfterIncludeFile[1]{%
+  \filehook at addtohook\filehook at prefix\filehook at include@after@{\filehook at ensuretex{#1}}%
+}
+\newcommand*\AtBeginOfInputs{%
+  \filehook at append\filehook at input@@atbegin
+}
+\newcommand*\AtEndOfInputs{%
+  \filehook at prefix\filehook at input@@atend
+}
+\newcommand*\AtBeginOfInputFile{%
+  \filehook at addtohook\filehook at append\filehook at input@atbegin@
+}
+\newcommand*\AtEndOfInputFile{%
+  \filehook at addtohook\filehook at prefix\filehook at input@atend@
+}
+\newcommand*\AtBeginOfFiles{%
+  \filehook at append\filehook@@atbegin
+}
+\newcommand*\AtEndOfFiles{%
+  \filehook at prefix\filehook@@atend
+}
+\newcommand*\AtBeginOfEveryFile{%
+  \filehook at append\filehook at every@@atbegin
+}
+\newcommand*\AtEndOfEveryFile{%
+  \filehook at prefix\filehook at every@@atend
+}
+\newcommand*\AtBeginOfFile{%
+  \filehook at addtohook\filehook at append\filehook at atbegin@
+}
+\newcommand*\AtEndOfFile{%
+  \filehook at addtohook\filehook at prefix\filehook at atend@
+}
+\newcommand*\AtBeginOfClassFile{%
+    \@ifnextchar*
+        {\AtBeginOfXFile at star\@clsextension}%
+        {\AtBeginOfXFile at normal\@clsextension}%
+}
+\newcommand*\AtBeginOfPackageFile{%
+    \@ifnextchar*
+        {\AtBeginOfXFile at star\@pkgextension}%
+        {\AtBeginOfXFile at normal\@pkgextension}%
+}
+\def\AtBeginOfXFile at star#1*#2{%
+    \@ifl at aded{#1}{#2}%
+        {\@firstofone}%
+        {\AtBeginOfXFile at normal{#1}{#2}}%
+}
+\def\AtBeginOfXFile at normal#1#2{%
+    \AtBeginOfFile{#2.#1}%
+}
+\newcommand*\AtEndOfClassFile{%
+    \@ifnextchar*
+        {\AtEndOfXFile at star\@clsextension}%
+        {\AtEndOfXFile at normal\@clsextension}%
+}
+\newcommand*\AtEndOfPackageFile{%
+    \@ifnextchar*
+        {\AtEndOfXFile at star\@pkgextension}%
+        {\AtEndOfXFile at normal\@pkgextension}%
+}
+\def\AtEndOfXFile at star#1*#2{%
+    \@ifl at aded{#1}{#2}%
+        {\@firstofone}%
+        {\AtEndOfXFile at normal{#1}{#2}}%
+}
+\long\def\AtEndOfXFile at normal#1#2#3{%
+    \AtEndOfFile{#2.#1}{\AtEndOfPackage{#3}}%
+}
+\newcommand*\ClearHook{%
+    \begingroup
+    \def\filehook at prefix##1##2{%
+        \gdef##1{}%
+        \endgroup
+    }%
+    \let\filehook at append\filehook at prefix
+}
+\def\DEPRECATED at input@#1{%
+  \@ifnextchar\clearpage
+    {%
+     \filehook at every@atbegin{#1}%
+     \filehook at include@atbegin{#1}%
+     \filehook at orig@@input@{#1}%
+     \filehook at include@atend{#1}%
+     \clearpage
+     \filehook at include@after{#1}%
+     \filehook at every@atend{#1}%
+     \@gobble
+    }%
+    {\filehook at orig@@input@{#1}}%
+}
+\def\filehook@@iinput#1{%
+  \filehook at every@atbegin{#1}%
+  \filehook at input@atbegin{#1}%
+  \filehook at orig@@iinput{#1}%
+  \filehook at input@atend{#1}%
+  \filehook at every@atend{#1}%
+}
+\def\filehook at ensureext#1{%
+    \expandafter\filehook@@ensureext#1\empty.tex\empty\empty
+}
+\def\filehook@@ensureext#1.#2\empty#3\empty{#1.#2}
+\def\filehook at ensuretex#1{%
+    \expandafter\filehook@@ensuretex#1\empty.tex\empty\empty
+}
+\def\filehook@@ensuretex#1.tex\empty#2\empty{#1.tex}
+\AddToHook{include/before}{%
+    \filehook at include@atbegin{\CurrentFile}%
+}
+\AddToHook{include/end}{%
+    \filehook at include@atend{\CurrentFile}%
+}
+\AddToHook{include/after}{%
+    \filehook at include@after{\CurrentFile}%
+}
+\begingroup
+\edef\dottex{\expandafter\expandafter\expandafter\@gobble\expandafter\string\csname.tex\endcsname}
+\expandafter
+\gdef\expandafter\filehook at istexfile\expandafter#\expandafter1\expandafter{%
+    \expandafter\expandafter\expandafter\filehook at istexfile@\expandafter#\expandafter1\expandafter\empty\dottex\empty\empty\@nil
+}
+\expandafter\gdef\expandafter\filehook at istexfile@\expandafter#\expandafter1\dottex\empty#2\empty#3\@nil{%
+    \begingroup
+    \def\@tempa{#2}%
+    \ifx\@tempa\empty
+        \endgroup
+        \expandafter\@secondoftwo
+    \else
+        \endgroup
+        \expandafter\@firstoftwo
+    \fi
+}
+\endgroup
+\AddToHook{file/before}{%
+    \filehook at every@atbegin{\CurrentFile}%
+    \filehook at istexfile\CurrentFile{\filehook at input@atbegin{\CurrentFile}}{}%
+    \filehook at atbegin{\CurrentFile}%
+}
+\AddToHook{file/after}{%
+    \filehook at atend{\CurrentFile}%
+    \filehook at istexfile\CurrentFile{\filehook at input@atend{\CurrentFile}}{}%
+    \filehook at every@atend{\CurrentFile}%
+}
+\endinput
+%%
+%% End of file `filehook-2020.sty'.


Property changes on: trunk/Master/texmf-dist/tex/latex/filehook/filehook-2020.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/filehook/filehook.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/filehook/filehook.sty	2020-09-28 20:57:56 UTC (rev 56463)
+++ trunk/Master/texmf-dist/tex/latex/filehook/filehook.sty	2020-09-28 20:58:16 UTC (rev 56464)
@@ -19,361 +19,12 @@
 %%
 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
 \ProvidesPackage{filehook}[%
-    2020/02/03
-    v0.7
+    2020/09/27
+    v0.8
     Hooks for input files]
-\newif\iffilehook at force
-\DeclareOption{force}{\filehook at forcetrue}
+\DeclareOption{force}{\PassOptionsToPackage{forse}{filehook-2019}}
 \ProcessOptions\relax
-\newif\iffilehook at newfmt
-\@ifl at t@r\fmtversion{2019/10/01}{\filehook at newfmttrue}{\filehook at newfmtfalse}
-\def\filehook at let#1#2{%
-  \expandafter\ifx\csname #2\space\endcsname\relax
-    \expandafter\let\csname #1\expandafter\endcsname\csname #2\endcsname
-  \else
-    \expandafter\def\csname #1\expandafter\endcsname\expandafter{\expandafter\protect\csname #1\space\endcsname}%
-    \expandafter\let\csname #1\space\expandafter\endcsname\csname #2\space\endcsname
-  \fi
-}
-\def\filehook at glet#1#2{%
-  \expandafter\ifx\csname #2\space\endcsname\relax
-    \expandafter\global\expandafter\let\csname #1\expandafter\endcsname\csname #2\endcsname
-  \else
-    \expandafter\global\expandafter\def\csname #1\expandafter\endcsname\expandafter{\expandafter\protect\csname #1\space\endcsname}%
-    \expandafter\global\expandafter\let\csname #1\space\expandafter\endcsname\csname #2\space\endcsname
-  \fi
-}
-\def\filehook at cmp#1#2{%
-  \expandafter\ifx\csname #2\space\endcsname\relax
-    \expandafter\ifx\csname #1\expandafter\endcsname\csname #2\endcsname
-      \expandafter\expandafter\expandafter\@firstoftwo
-    \else
-      \expandafter\expandafter\expandafter\@secondoftwo
-    \fi
-  \else
-    \expandafter\ifx\csname #1\space\expandafter\endcsname\csname #2\space\endcsname
-      \expandafter\expandafter\expandafter\@firstoftwo
-    \else
-      \expandafter\expandafter\expandafter\@secondoftwo
-    \fi
-  \fi
-}
-\begingroup
-\gdef\filehook at csuse#1{\ifcsname #1\endcsname\csname #1\expandafter\endcsname\fi}
-\expandafter\ifx\csname csuse\endcsname\relax
-    \expandafter\ifx\csname ifcsname\endcsname\relax
-        \gdef\filehook at csuse#1{\expandafter\ifx\csname #1\endcsname\relax\else\csname #1\expandafter\endcsname\fi}
-    \fi
-\else
-    \global\let\filehook at csuse\csuse
-\fi
-\endgroup
-\def\filehook at include@atbegin#1{%
-  \filehook at let{InputIfFileExists}{filehook@@InputIfFileExists}%
-  \filehook at csuse{\filehook at include@atbegin@#1}%
-  \filehook at include@@atbegin
-}
-\def\filehook at include@@atbegin{}
-\def\filehook at include@atend#1{%
-  \filehook at include@@atend
-  \filehook at csuse{\filehook at include@atend@#1}%
-}
-\def\filehook at include@@atend{}
-\def\filehook at include@after#1{%
-  \filehook at include@@after
-  \filehook at csuse{\filehook at include@after@#1}%
-}
-\def\filehook at include@@after{}
-\def\filehook at input@atbegin#1{%
-  \filehook at let{InputIfFileExists}{filehook@@InputIfFileExists}%
-  \filehook at csuse{\filehook at input@atbegin@\filehook at ensureext{#1}}%
-  \filehook at input@@atbegin
-}
-\def\filehook at input@@atbegin{}
-\def\filehook at input@atend#1{%
-  \filehook at input@@atend
-  \filehook at csuse{\filehook at input@atend@\filehook at ensureext{#1}}%
-}
-\def\filehook at input@@atend{}
-\def\filehook at atbegin#1{%
-  \filehook at csuse{\filehook at atbegin@\filehook at ensureext{#1}}%
-  \filehook@@atbegin
-}
-\def\filehook@@atbegin{}
-\def\filehook at atend#1{%
-  \filehook@@atend
-  \filehook at csuse{\filehook at atend@\filehook at ensureext{#1}}%
-}
-\def\filehook@@atend{}
-\def\filehook at every@atbegin#1{%
-    \filehook at every@@atbegin
-}
-\def\filehook at every@@atbegin{}
-\def\filehook at every@atend#1{%
-    \filehook at every@@atend
-}
-\def\filehook at every@@atend{}
-\def\filehook at include@atbegin@{filehook at include@atbegin@}
-\def\filehook at include@atend@{filehook at include@atend@}
-\def\filehook at include@after@{filehook at include@after@}
-\def\filehook at input@atbegin@{filehook at input@atbegin@}
-\def\filehook at input@atend@{filehook at input@atend@}
-\def\filehook at input@after@{filehook at input@after@}
-\def\filehook at atbegin@{filehook at atbegin@}
-\def\filehook at atend@{filehook at atend@}
-\def\filehook at after@{filehook at after@}
-\def\filehook at append{\g at addto@macro}
-\long\def\filehook at appendwarg#1#2{%
-  \begingroup
-    \toks@\expandafter{#1{##1}#2}%
-    \edef\@tempa{\the\toks@}%
-    \expandafter\gdef\expandafter#1\expandafter##\expandafter1\expandafter{\@tempa}%
-  \endgroup
-}
-\long\def\filehook at prefix#1#2{%
-  \begingroup
-    \@temptokena{#2}%
-    \toks@\expandafter{#1}%
-    \xdef#1{\the\@temptokena\the\toks@}%
-  \endgroup
-}
-\long\def\filehook at prefixwarg#1#2{%
-  \begingroup
-    \@temptokena{#2}%
-    \toks@\expandafter{#1{##1}}%
-    \edef\@tempa{\the\@temptokena\the\toks@}%
-    \expandafter\gdef\expandafter#1\expandafter##\expandafter1\expandafter{\@tempa}%
-  \endgroup
-}
-\def\filehook at addtohook#1#2#3{%
-  \begingroup
-  \edef\@tempa{#3}%
-  \edef\@tempa{#2\filehook at ensureext{\@tempa}}%
-  \@ifundefined{\@tempa}{\global\@namedef{\@tempa}{}}{}%
-  \expandafter\endgroup
-  \expandafter#1\csname\@tempa\endcsname
-}
-\newcommand*\AtBeginOfIncludes{%
-  \filehook at append\filehook at include@@atbegin
-}
-\newcommand*\AtEndOfIncludes{%
-  \filehook at prefix\filehook at include@@atend
-}
-\newcommand*\AfterIncludes{%
-  \filehook at prefix\filehook at include@@after
-}
-\newcommand*\AtBeginOfIncludeFile[1]{%
-  \filehook at addtohook\filehook at append\filehook at include@atbegin@{\filehook at ensuretex{#1}}%
-}
-\newcommand*\AtEndOfIncludeFile[1]{%
-  \filehook at addtohook\filehook at prefix\filehook at include@atend@{\filehook at ensuretex{#1}}%
-}
-\newcommand*\AfterIncludeFile[1]{%
-  \filehook at addtohook\filehook at prefix\filehook at include@after@{\filehook at ensuretex{#1}}%
-}
-\newcommand*\AtBeginOfInputs{%
-  \filehook at append\filehook at input@@atbegin
-}
-\newcommand*\AtEndOfInputs{%
-  \filehook at prefix\filehook at input@@atend
-}
-\newcommand*\AtBeginOfInputFile{%
-  \filehook at addtohook\filehook at append\filehook at input@atbegin@
-}
-\newcommand*\AtEndOfInputFile{%
-  \filehook at addtohook\filehook at prefix\filehook at input@atend@
-}
-\newcommand*\AtBeginOfFiles{%
-  \filehook at append\filehook@@atbegin
-}
-\newcommand*\AtEndOfFiles{%
-  \filehook at prefix\filehook@@atend
-}
-\newcommand*\AtBeginOfEveryFile{%
-  \filehook at append\filehook at every@@atbegin
-}
-\newcommand*\AtEndOfEveryFile{%
-  \filehook at prefix\filehook at every@@atend
-}
-\newcommand*\AtBeginOfFile{%
-  \filehook at addtohook\filehook at append\filehook at atbegin@
-}
-\newcommand*\AtEndOfFile{%
-  \filehook at addtohook\filehook at prefix\filehook at atend@
-}
-\newcommand*\AtBeginOfClassFile{%
-    \@ifnextchar*
-        {\AtBeginOfXFile at star\@clsextension}%
-        {\AtBeginOfXFile at normal\@clsextension}%
-}
-\newcommand*\AtBeginOfPackageFile{%
-    \@ifnextchar*
-        {\AtBeginOfXFile at star\@pkgextension}%
-        {\AtBeginOfXFile at normal\@pkgextension}%
-}
-\def\AtBeginOfXFile at star#1*#2{%
-    \@ifl at aded{#1}{#2}%
-        {\@firstofone}%
-        {\AtBeginOfXFile at normal{#1}{#2}}%
-}
-\def\AtBeginOfXFile at normal#1#2{%
-    \AtBeginOfFile{#2.#1}%
-}
-\newcommand*\AtEndOfClassFile{%
-    \@ifnextchar*
-        {\AtEndOfXFile at star\@clsextension}%
-        {\AtEndOfXFile at normal\@clsextension}%
-}
-\newcommand*\AtEndOfPackageFile{%
-    \@ifnextchar*
-        {\AtEndOfXFile at star\@pkgextension}%
-        {\AtEndOfXFile at normal\@pkgextension}%
-}
-\def\AtEndOfXFile at star#1*#2{%
-    \@ifl at aded{#1}{#2}%
-        {\@firstofone}%
-        {\AtEndOfXFile at normal{#1}{#2}}%
-}
-\long\def\AtEndOfXFile at normal#1#2#3{%
-    \AtEndOfFile{#2.#1}{\AtEndOfPackage{#3}}%
-}
-\newcommand*\ClearHook{%
-    \begingroup
-    \def\filehook at prefix##1##2{%
-        \gdef##1{}%
-        \endgroup
-    }%
-    \let\filehook at append\filehook at prefix
-}
-\let\filehook at orig@@input@\@input@
-\let\filehook at orig@@iinput\@iinput
-\def\@input@#1{%
-  \@ifnextchar\clearpage
-    {%
-     \filehook at every@atbegin{#1}%
-     \filehook at include@atbegin{#1}%
-     \filehook at orig@@input@{#1}%
-     \filehook at include@atend{#1}%
-     \clearpage
-     \filehook at include@after{#1}%
-     \filehook at every@atend{#1}%
-     \@gobble
-    }%
-    {\filehook at orig@@input@{#1}}%
-}
-\def\filehook@@iinput#1{%
-  \filehook at every@atbegin{#1}%
-  \filehook at input@atbegin{#1}%
-  \filehook at orig@@iinput{#1}%
-  \filehook at input@atend{#1}%
-  \filehook at every@atend{#1}%
-}
-\let\@iinput\filehook@@iinput
-\def\filehook at swap#1#2{#2#1}
-\def\filehook at ensureext#1{%
-    \expandafter\filehook@@ensureext#1\empty.tex\empty\empty
-}
-\def\filehook@@ensureext#1.#2\empty#3\empty{#1.#2}
-\def\filehook at ensuretex#1{%
-    \expandafter\filehook@@ensuretex#1\empty.tex\empty\empty
-}
-\def\filehook@@ensuretex#1.tex\empty#2\empty{#1.tex}
-\iffilehook at newfmt
-\expandafter\def\expandafter\latex at InputIfFileExists\expandafter{%
-  \expandafter\protect\csname InputIfFileExists\space\endcsname
-}
-\expandafter\long\expandafter\def\csname latex at InputIfFileExists\space\endcsname#1#2{%
-  \IfFileExists{#1}%
-    {%
-  \expandafter\@swaptwoargs\expandafter
-      {\@filef at und}{#2\@addtofilelist{#1}\@@input}}}
-\else
-\long\def\latex at InputIfFileExists#1#2{%
-  \IfFileExists{#1}%
-    {#2\@addtofilelist{#1}%
-     \@@input\@filef at und
-    }%
-}
-\fi
-\DeclareRobustCommand\filehook at default@InputIfFileExists[2]{%
-  \IfFileExists{#1}%
-    {\expandafter\filehook at swap
-     \expandafter{\@filef at und}%
-     {#2\@addtofilelist{#1}%
-     \filehook at every@atbegin{#1}%
-     \filehook at atbegin{#1}%
-     \@@input}%
-     \filehook at atend{#1}%
-     \filehook at every@atend{#1}%
-    }%
-}
-\filehook at glet{filehook at default@InputIfFileExists}{filehook at default@InputIfFileExists}%
-\DeclareRobustCommand\filehook@@default at InputIfFileExists[2]{%
-  \filehook at let{InputIfFileExists}{filehook at InputIfFileExists}%
-  \IfFileExists{#1}%
-    {\expandafter\filehook at swap
-     \expandafter{\@filef at und}%
-     {#2\@addtofilelist{#1}%
-     \filehook at atbegin{#1}%
-     \@@input}%
-     \filehook at atend{#1}%
-    }%
-}
-\filehook at glet{filehook@@default at InputIfFileExists}{filehook@@default at InputIfFileExists}%
-\AtBeginOfPackageFile{scrlfile}{%
-   \filehook at glet{InputIfFileExists}{latex at InputIfFileExists}%
-}%
-\AtEndOfPackageFile*{scrlfile}{%
-   \RequirePackage{filehook-scrlfile}%
-}%
-\AtBeginOfPackageFile*{fink}{%
-   \RequirePackage{kvoptions}%
-   \begingroup
-   \filehook at let{InputIfFileExists}{latex at InputIfFileExists}%
-}%
-\AtEndOfPackageFile*{fink}{%
-   \edef\@tempa{\noexpand\PassOptionsToPackage{mainext=\fnk at mainext,maindir=\fnk at maindir}{currfile}}%
-   \expandafter\endgroup\@tempa
-   \RequirePackage{filehook-fink}%
-}%
-\AtBeginOfClassFile{memoir}{%
-  \filehook at let{InputIfFileExists}{latex at InputIfFileExists}%
-  \let\@iinput\filehook at orig@@iinput
-}%
-\AtEndOfClassFile*{memoir}{%
-  \let\@iinput\filehook@@iinput
-  \RequirePackage{filehook-memoir}%
-}%
-\filehook at cmp{InputIfFileExists}{filehook at InputIfFileExists}%
-  {}% already set up
-  {%
-    \filehook at cmp{InputIfFileExists}{latex at InputIfFileExists}%
-      {%
-        \filehook at let{filehook at InputIfFileExists}{filehook at default@InputIfFileExists}%
-        \filehook at let{filehook@@InputIfFileExists}{filehook@@default at InputIfFileExists}%
-        \filehook at let{InputIfFileExists}{filehook at InputIfFileExists}%
-      }%
-      {%
-        \iffilehook at force
-          \filehook at let{filehook at InputIfFileExists}{filehook at default@InputIfFileExists}%
-          \filehook at let{filehook@@InputIfFileExists}{filehook@@default at InputIfFileExists}%
-          \filehook at let{InputIfFileExists}{filehook at InputIfFileExists}%
-          \PackageWarning{filehook}{Detected unknown definition of \string\InputIfFileExists.^^J%
-                                    The 'force' option of 'filehook' is in effect. Macro is overwritten with default!}%
-        \else
-          \PackageError{filehook}{Detected unknown definition of \string\InputIfFileExists.^^J%
-                                  Use the 'force' option of 'filehook' to overwrite it.}{}%
-        \fi
-      }%
-  }%
-\AtBeginDocument{%
-    % Check if definition got changed again. For the new LaTeX format we check again \InputIfFileExists<space>,
-    % for the old format to \InputIfFileExists directly.
-    \filehook at cmp{InputIfFileExists}{filehook at InputIfFileExists}{}{%
-        \PackageWarning{filehook}{Macro \string\InputIfFileExists\space got redefined after 'filehook' was loaded.^^J%
-                                  Certain file hooks might now be dysfunctional!}%
-    }%
-}
+\@ifl at t@r\fmtversion{2020/10/01}{\RequirePackage{filehook-2020}}{\RequirePackage{filehook-2019}}
 \endinput
 %%
 %% End of file `filehook.sty'.



More information about the tex-live-commits mailing list.