diff options
author | Karl Berry <karl@freefriends.org> | 2020-09-29 21:25:46 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-09-29 21:25:46 +0000 |
commit | bf0f2a4347666ac5ddd006d687d007797abc8e5b (patch) | |
tree | d8d65cec50a794b7d1cab46f42b9ba8c0f09673e /Master/texmf-dist/tex/latex/filehook | |
parent | 249d9fb0bbf460742a9e82a2b49c827dd3c35702 (diff) |
filehook (29sep20)
git-svn-id: svn://tug.org/texlive/trunk@56479 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/filehook')
-rw-r--r-- | Master/texmf-dist/tex/latex/filehook/filehook-2019.sty | 6 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/filehook/filehook-2020.sty | 38 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/filehook/filehook.sty | 6 |
3 files changed, 32 insertions, 18 deletions
diff --git a/Master/texmf-dist/tex/latex/filehook/filehook-2019.sty b/Master/texmf-dist/tex/latex/filehook/filehook-2019.sty index a0a5c327770..9e2bc9db5da 100644 --- a/Master/texmf-dist/tex/latex/filehook/filehook-2019.sty +++ b/Master/texmf-dist/tex/latex/filehook/filehook-2019.sty @@ -18,9 +18,9 @@ %% and pgf-filehook.sty %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] -\ProvidesPackage{filehook-2019}[% - 2020/09/27 - v0.8 +\ProvidesPackage{filehook-2019}[% filehook subpackage, do not load directly + 2020/09/29 + v0.8a Hooks for input files] \newif\iffilehook@force \DeclareOption{force}{\filehook@forcetrue} diff --git a/Master/texmf-dist/tex/latex/filehook/filehook-2020.sty b/Master/texmf-dist/tex/latex/filehook/filehook-2020.sty index fa5f7fd328e..43c4cd2d7a4 100644 --- a/Master/texmf-dist/tex/latex/filehook/filehook-2020.sty +++ b/Master/texmf-dist/tex/latex/filehook/filehook-2020.sty @@ -18,9 +18,9 @@ %% and pgf-filehook.sty %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] -\ProvidesPackage{filehook-2020}[% - 2020/09/27 - v0.8 +\ProvidesPackage{filehook-2020}[% filehook subpackage, do not load directly + 2020/09/29 + v0.8a Hooks for input files] \DeclareOption{force}{} \ProcessOptions\relax @@ -238,14 +238,26 @@ \expandafter\filehook@@ensuretex#1\empty.tex\empty\empty } \def\filehook@@ensuretex#1.tex\empty#2\empty{#1.tex} +\def\filehook@set@CurrentFile{% + \edef\filehook@CurrentFile{% + \ifx\CurrentFilePath\empty + \else + \CurrentFilePath/% + \fi + \CurrentFile + }% +} \AddToHook{include/before}{% - \filehook@include@atbegin{\CurrentFile}% + \filehook@set@CurrentFile + \filehook@include@atbegin{\filehook@CurrentFile}% } \AddToHook{include/end}{% - \filehook@include@atend{\CurrentFile}% + \filehook@set@CurrentFile + \filehook@include@atend{\filehook@CurrentFile}% } \AddToHook{include/after}{% - \filehook@include@after{\CurrentFile}% + \filehook@set@CurrentFile + \filehook@include@after{\filehook@CurrentFile}% } \begingroup \edef\dottex{\expandafter\expandafter\expandafter\@gobble\expandafter\string\csname.tex\endcsname} @@ -266,14 +278,16 @@ } \endgroup \AddToHook{file/before}{% - \filehook@every@atbegin{\CurrentFile}% - \filehook@istexfile\CurrentFile{\filehook@input@atbegin{\CurrentFile}}{}% - \filehook@atbegin{\CurrentFile}% + \filehook@set@CurrentFile + \filehook@every@atbegin{\filehook@CurrentFile}% + \filehook@istexfile\filehook@CurrentFile{\filehook@input@atbegin{\filehook@CurrentFile}}{}% + \filehook@atbegin{\filehook@CurrentFile}% } \AddToHook{file/after}{% - \filehook@atend{\CurrentFile}% - \filehook@istexfile\CurrentFile{\filehook@input@atend{\CurrentFile}}{}% - \filehook@every@atend{\CurrentFile}% + \filehook@set@CurrentFile + \filehook@atend{\filehook@CurrentFile}% + \filehook@istexfile\filehook@CurrentFile{\filehook@input@atend{\filehook@CurrentFile}}{}% + \filehook@every@atend{\filehook@CurrentFile}% } \endinput %% diff --git a/Master/texmf-dist/tex/latex/filehook/filehook.sty b/Master/texmf-dist/tex/latex/filehook/filehook.sty index dc2e9336143..b2f09be2973 100644 --- a/Master/texmf-dist/tex/latex/filehook/filehook.sty +++ b/Master/texmf-dist/tex/latex/filehook/filehook.sty @@ -19,10 +19,10 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{filehook}[% - 2020/09/27 - v0.8 + 2020/09/29 + v0.8a Hooks for input files] -\DeclareOption{force}{\PassOptionsToPackage{forse}{filehook-2019}} +\DeclareOption{force}{\PassOptionsToPackage{force}{filehook-2019}} \ProcessOptions\relax \@ifl@t@r\fmtversion{2020/10/01}{\RequirePackage{filehook-2020}}{\RequirePackage{filehook-2019}} \endinput |