| 1 |
%% Copyright (c) 2011-2022 by Martin Scharrer <[email protected]> |
| 2 |
%% ---------------------------------------------------------------------- |
| 3 |
%% This work may be distributed and/or modified under the |
| 4 |
%% conditions of the LaTeX Project Public License, either version 1.3 |
| 5 |
%% of this license or (at your option) any later version. |
| 6 |
%% The latest version of this license is in |
| 7 |
%% http://www.latex-project.org/lppl.txt |
| 8 |
%% and version 1.3 or later is part of all distributions of LaTeX |
| 9 |
%% version 2005/12/01 or later. |
| 10 |
%% |
| 11 |
%% This work has the LPPL maintenance status `maintained'. |
| 12 |
%% |
| 13 |
%% The Current Maintainer of this work is Martin Scharrer. |
| 14 |
%% |
| 15 |
%% This work consists of the files filehook.dtx and filehook.ins |
| 16 |
%% and the derived files filehook.sty, filehook-fink.sty, |
| 17 |
%% filehook-listings.sty, filehook-memoir.sty, filehook-scrlfile.sty |
| 18 |
%% and pgf-filehook.sty |
| 19 |
%% |
| 20 |
\NeedsTeXFormat{LaTeX2e}[1999/12/01] |
| 21 |
\ProvidesPackage{filehook-listings}[2011/01/02 v0.1 Patch for listings to avoid hooks for verbatim input files] |
| 22 |
\begingroup |
| 23 |
|
| 24 |
\long\def\patch#1\def\lst@next#2#3\endpatch{% |
| 25 |
\toks@{#2}% |
| 26 |
\edef\@tempa{\the\toks@}% |
| 27 |
\def\@tempb{\input{####1}}% |
| 28 |
\ifx\@tempa\@tempb |
| 29 |
\gdef\lst@InputListing##1{#1\def\lst@next{\@input{##1}}#3}% |
| 30 |
\else |
| 31 |
\PackageWarning{filehook-listings}{To-be-patched code in macro \string\lst@InputListing was not found!}% |
| 32 |
\fi |
| 33 |
} |
| 34 |
|
| 35 |
\@ifundefined{lst@InputListing}{% |
| 36 |
\PackageWarning{filehook-listings}{To-be-patched Macro \string\lst@InputListing not found!}% |
| 37 |
}{} |
| 38 |
|
| 39 |
\expandafter\patch\lst@InputListing{#1}\endpatch |
| 40 |
|
| 41 |
\endgroup |
| 42 |
\endinput |
| 43 |
%% |
| 44 |
%% End of file `filehook-listings.sty'. |