| 1 |
%% |
| 2 |
%% This is file `filehook-ltx.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% latex2e-first-aid-for-external-files.dtx (with options: `filehook-ltx') |
| 8 |
%% |
| 9 |
%% The source is maintained by the LaTeX Project team and bug |
| 10 |
%% reports for it can be opened at https://latex-project.org/bugs/ |
| 11 |
%% (but please observe conditions on bug reports sent to that address!) |
| 12 |
%% |
| 13 |
%% |
| 14 |
%% Copyright (C) 2020-2025 |
| 15 |
%% The LaTeX Project and any individual authors listed elsewhere |
| 16 |
%% in this file. |
| 17 |
%% |
| 18 |
%% This file was generated from file(s) of the Standard LaTeX `First Aid Bundle'. |
| 19 |
%% ------------------------------------------------------------------------------ |
| 20 |
%% |
| 21 |
%% It may be distributed and/or modified under the |
| 22 |
%% conditions of the LaTeX Project Public License, either version 1.3c |
| 23 |
%% of this license or (at your option) any later version. |
| 24 |
%% The latest version of this license is in |
| 25 |
%% https://www.latex-project.org/lppl.txt |
| 26 |
%% and version 1.3c or later is part of all distributions of LaTeX |
| 27 |
%% version 2005/12/01 or later. |
| 28 |
%% |
| 29 |
%% This file may only be distributed together with a copy of the LaTeX |
| 30 |
%% `First Aid Bundle'. You may however distribute the LaTeX `First Aid Bundle' |
| 31 |
%% without such generated files. |
| 32 |
%% |
| 33 |
%% File: latex2e-first-aid-for-external-files.dtx (C) Copyright 2020-2025 |
| 34 |
%% |
| 35 |
%% The LaTeX Project and any individual authors listed elsewhere |
| 36 |
%% in this file. |
| 37 |
\newcommand\AtBeginOfEveryFile [1] |
| 38 |
{\AddToHook{file/before}{#1}} |
| 39 |
\newcommand\AtEndOfEveryFile [1] |
| 40 |
{\AddToHook{file/after}{#1}} |
| 41 |
\newcommand\AtBeginOfIncludes [1] |
| 42 |
{\AddToHook{include/before}{#1}} |
| 43 |
\newcommand\AtEndOfIncludes [1] |
| 44 |
{\AddToHook{include/end}{#1}} |
| 45 |
\newcommand\AfterIncludes [1] |
| 46 |
{\AddToHook{include/after}{#1}} |
| 47 |
\newcommand\AtBeginOfPackages [1] |
| 48 |
{\AddToHook{package/before}{#1}} |
| 49 |
\newcommand\AtEndOfPackages [1] |
| 50 |
{\AddToHook{package/after}{#1}} |
| 51 |
\newcommand\AtBeginOfClasses [1] |
| 52 |
{\AddToHook{class/before}{#1}} |
| 53 |
\newcommand\AtEndOfClasses [1] |
| 54 |
{\AddToHook{class/after}{#1}} |
| 55 |
\newcommand\AtBeginOfFile [2] |
| 56 |
{\AddToHook{file/#1/before}{#2}} |
| 57 |
\newcommand\AtEndOfFile [2] |
| 58 |
{\AddToHook{file/#1/after}{#2}} |
| 59 |
\DeclareDocumentCommand \AtBeginOfPackageFile {smm} |
| 60 |
{\IfBooleanTF{#1}% |
| 61 |
{\@ifpackageloaded{#2}% |
| 62 |
{#3}% |
| 63 |
{\AddToHook{package/#2/before}{#3}}}% |
| 64 |
{\AddToHook{package/#2/before}{#3}}% |
| 65 |
} |
| 66 |
\DeclareDocumentCommand \AtEndOfPackageFile {smm} |
| 67 |
{\IfBooleanTF{#1}% |
| 68 |
{\@ifpackageloaded{#2}% |
| 69 |
{#3}% |
| 70 |
{\AddToHook{package/#2/after}{#3}}}% |
| 71 |
{\AddToHook{package/#2/after}{#3}}% |
| 72 |
} |
| 73 |
\DeclareDocumentCommand \AtBeginOfClassFile {smm} |
| 74 |
{\IfBooleanTF{#1}% |
| 75 |
{\@ifclassloaded{#2}% |
| 76 |
{#3}% |
| 77 |
{\AddToHook{class/#2/before}{#3}}}% |
| 78 |
{\AddToHook{class/#2/before}{#3}}% |
| 79 |
} |
| 80 |
\DeclareDocumentCommand \AtEndOfClassFile {smm} |
| 81 |
{\IfBooleanTF{#1}% |
| 82 |
{\@ifclassloaded{#2}% |
| 83 |
{#3}% |
| 84 |
{\AddToHook{class/#2/after}{#3}}}% |
| 85 |
{\AddToHook{class/#2/after}{#3}}% |
| 86 |
} |
| 87 |
\newcommand\AtBeginOfIncludeFile [2] |
| 88 |
{\AddToHook{include/#1/before}{#2}} |
| 89 |
\newcommand\AtEndOfIncludeFile [2] |
| 90 |
{\AddToHook{include/#1/end}{#2}} |
| 91 |
\newcommand\AfterIncludeFile [2] |
| 92 |
{\AddToHook{include/#1/after}{#2}} |
| 93 |
\endinput |
| 94 |
%% |
| 95 |
%% End of file `filehook-ltx.sty'. |