diff options
author | Karl Berry <karl@freefriends.org> | 2019-08-19 20:57:51 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-08-19 20:57:51 +0000 |
commit | b2ff7bb7e5f8e65740f50a0bc9d2621659187209 (patch) | |
tree | 971a927b9194bfe961b95ea29702c7dd9637e0dc /Master/texmf-dist/source | |
parent | af57714cccb1f552e9a032cecb6ed26ac2192ce6 (diff) |
filehook (19aug19)
git-svn-id: svn://tug.org/texlive/trunk@51910 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/latex/filehook/filehook.dtx | 124 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/filehook/filehook.ins | 3 |
2 files changed, 88 insertions, 39 deletions
diff --git a/Master/texmf-dist/source/latex/filehook/filehook.dtx b/Master/texmf-dist/source/latex/filehook/filehook.dtx index 01dd5bbedcd..3db7301e64f 100644 --- a/Master/texmf-dist/source/latex/filehook/filehook.dtx +++ b/Master/texmf-dist/source/latex/filehook/filehook.dtx @@ -1,40 +1,40 @@ % \iffalse meta-comment -%% Copyright (c) 2010-2011 by Martin Scharrer <martin@scharrer-online.de> -%% ----------------------------------------------------------------- -%% +%<=*COPYRIGHT> +%% Copyright (C) 2011-2019 by Martin Scharrer <martin@scharrer-online.de> +%% ---------------------------------------------------------------------- %% This work may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3c +%% 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.3c or later is part of all distributions of LaTeX -%% version 2008/05/04 or later. +%% 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, filehook.ins -%% and the derived file filehook.sty. +%% 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 %% -%% $Id: filehook.dtx 2504 2011-07-18 17:22:50Z martin $ +%<=/COPYRIGHT> % \fi % % \iffalse %<*driver> -\ProvidesFile{filehook.dtx} -%</driver> -%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] -%<package>\ProvidesPackage{filehook} -%<*package> - [2011/10/12 v0.5d Hooks for input files] -%</package> -% -%<*driver> -\documentclass{ydoc}[2011/03/19] -\usepackage{filehook}[2011/10/12] +\ProvidesFile{filehook.dtx}[% +%<=*DATE> + 2019/08/19 +%<=/DATE> +%<=*VERSION> + v0.5e +%<=/VERSION> + Hooks for input files] +\documentclass{ydoc} +\GetFileInfo{filehook.dtx} +\usepackage{filehook}[\filedate] \EnableCrossrefs \CodelineIndex \RecordChanges @@ -55,7 +55,7 @@ %</driver> % \fi % -% \CheckSum{1018} +% \CheckSum{1051} % % \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 @@ -509,11 +509,18 @@ %<*filehook.sty> % \fi % \begin{macrocode} +%<!COPYRIGHT> \NeedsTeXFormat{LaTeX2e}[1999/12/01] -\ProvidesPackage{filehook} - [2011/10/12 v0.5d Hooks for input files] +\ProvidesPackage{filehook}[% +%<!DATE> +%<!VERSION> +%<*DRIVER> + 2099/01/01 develop +%</DRIVER> + Hooks for input files] % \end{macrocode} % +% % \subsection{Options} % \begin{macrocode} \newif\iffilehook@force @@ -522,7 +529,6 @@ % \end{macrocode} % % -% % \subsection{Initialisation of Hooks} % The general hooks are initialised to call the file specific hooks. % @@ -1100,10 +1106,10 @@ % This is always done inside a group to keep them temporary only. % The token register is used to avoid doubling of macro argument characters. % -% \begin{macro}{\latex@InputIfFileExists} -% Standard \LaTeX\ definition of \Macro\InputIfFileExists. +% \begin{macro}{\oldlatex@InputIfFileExists} +% Original standard \LaTeX\ definition of \Macro\InputIfFileExists. % \begin{macrocode} -\long\def\latex@InputIfFileExists#1#2{% +\long\def\oldlatex@InputIfFileExists#1#2{% \IfFileExists{#1}% {#2\@addtofilelist{#1}% \@@input\@filef@und @@ -1113,6 +1119,30 @@ % \end{macro} % % +% \begin{macro}{\latex@InputIfFileExists} +% Standard \`LaTeX\ definition of \Macro\InputIfFileExists starting from LaTeX Kernal 2019/02/07 v1.1n. +% \begin{macrocode} +\long\def\newlatex@InputIfFileExists#1#2{% + \IfFileExists{#1}% + {% + \expandafter\@swaptwoargs\expandafter + {\@filef@und}{#2\@addtofilelist{#1}\@@input}}} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\latex@InputIfFileExists} +% Standard \`LaTeX\ definition of \Macro\InputIfFileExists starting from LaTeX Kernal 2019/02/07 v1.1n. +% \begin{macrocode} +\@ifundefined{@swaptwoargs}{% + \let\latex@InputIfFileExists\oldlatex@InputIfFileExists +}{% + \let\latex@InputIfFileExists\newlatex@InputIfFileExists +}% +% \end{macrocode} +% \end{macro} +% +% % \begin{macro}{\filehook@default@InputIfFileExists} % \begin{macrocode} \long\gdef\filehook@default@InputIfFileExists#1#2{% @@ -1270,14 +1300,15 @@ \RequirePackage{filehook-memoir}% }% % \end{macrocode} +% % Finally, if no specific alternate definition is detected the original \LaTeX\ definition is checked for and a % error is given if any other unknown definition is detected. % The \opt{force} option will change the error into a warning and overwrite the macro with the default. % \begin{macrocode} \ifcase \ifx\InputIfFileExists\filehook@InputIfFileExists 0\else - \ifx\InputIfFileExists\latex@InputIfFileExists 1\else - \iffilehook@force 1\else + \ifx\InputIfFileExists\newlatex@InputIfFileExists 1\else + \ifx\InputIfFileExists\oldlatex@InputIfFileExists 1\else 9% \fi\fi\fi \relax% 0 @@ -1285,13 +1316,17 @@ \let\filehook@InputIfFileExists\filehook@default@InputIfFileExists \let\filehook@@InputIfFileExists\filehook@@default@InputIfFileExists \let\InputIfFileExists\filehook@InputIfFileExists +\else \iffilehook@force + \let\filehook@InputIfFileExists\filehook@default@InputIfFileExists + \let\filehook@@InputIfFileExists\filehook@@default@InputIfFileExists + \let\InputIfFileExists\filehook@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 -\else - \PackageError{filehook}{Detected unknown definition of \string\InputIfFileExists.^^J% - Use the 'force' option of 'filehook' to overwrite it.}{}% \fi % \end{macrocode} % \end{macro} @@ -1312,9 +1347,13 @@ % \iffalse %<*filehook-memoir.sty> % \fi -% % \begin{macrocode} +%<!COPYRIGHT> +\NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{filehook-memoir}[2011/01/03 v0.1 filehook patch for memoir class] +% \end{macrocode} +% +% \begin{macrocode} \RequirePackage{filehook} \begingroup % \end{macrocode} @@ -1369,9 +1408,13 @@ % \iffalse %<*filehook-listings.sty> % \fi -% % \begin{macrocode} +%<!COPYRIGHT> +\NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{filehook-listings}[2011/01/02 v0.1 Patch for listings to avoid hooks for verbatim input files] +% \end{macrocode} +% +% \begin{macrocode} \begingroup \long\def\patch#1\def\lst@next#2#3\endpatch{% @@ -1401,8 +1444,9 @@ % \iffalse %<*filehook-scrlfile.sty> % \fi -% % \begin{macrocode} +%<!COPYRIGHT> +\NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{filehook-scrlfile}[2011/01/03 v0.1 filehook patch for scrlfile package] \RequirePackage{filehook} \begingroup @@ -1532,9 +1576,13 @@ % \iffalse %<*filehook-fink.sty> % \fi +% \begin{macrocode} +%<!COPYRIGHT> +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{filehook-fink}[011/01/03 v0.1 filehook compatibility code for fink package] +% \end{macrocode} % % \begin{macrocode} -\ProvidesPackage{filehook-fink}[2011/01/03 v0.1 filehook compatibility code for fink package] \RequirePackage{filehook} \RequirePackage{currfile}% diff --git a/Master/texmf-dist/source/latex/filehook/filehook.ins b/Master/texmf-dist/source/latex/filehook/filehook.ins index 15684aa2846..0d381c3b77a 100644 --- a/Master/texmf-dist/source/latex/filehook/filehook.ins +++ b/Master/texmf-dist/source/latex/filehook/filehook.ins @@ -1,6 +1,6 @@ % See file 'filehook.dtx' for copyright and licence. % -\input docstrip.tex +\input ydocstrip.tex \keepsilent \askforoverwritefalse \generate{% @@ -12,3 +12,4 @@ \file{pgf-filehook.sty}{\nopreamble\from{filehook.dtx}{pgf-filehook.sty}}% } \endbatchfile +% vim: ft=tex |