| 1 |
%% |
| 2 |
%% This is file `hopatch-2016-05-16.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% hopatch.dtx (with options: `packagefrozen') |
| 8 |
%% |
| 9 |
%% This is a generated file. |
| 10 |
%% |
| 11 |
%% Project: hopatch |
| 12 |
%% Version: 2023-01-07 v1.5 |
| 13 |
%% |
| 14 |
%% Copyright (C) |
| 15 |
%% 2011, 2012 Heiko Oberdiek |
| 16 |
%% 2016-2023 Oberdiek Package Support Group |
| 17 |
%% |
| 18 |
%% This work may be distributed and/or modified under the |
| 19 |
%% conditions of the LaTeX Project Public License, either |
| 20 |
%% version 1.3c of this license or (at your option) any later |
| 21 |
%% version. This version of this license is in |
| 22 |
%% https://www.latex-project.org/lppl/lppl-1-3c.txt |
| 23 |
%% and the latest version of this license is in |
| 24 |
%% https://www.latex-project.org/lppl.txt |
| 25 |
%% and version 1.3 or later is part of all distributions of |
| 26 |
%% LaTeX version 2005/12/01 or later. |
| 27 |
%% |
| 28 |
%% This work has the LPPL maintenance status "maintained". |
| 29 |
%% |
| 30 |
%% The Current Maintainers of this work are |
| 31 |
%% Heiko Oberdiek and the Oberdiek Package Support Group |
| 32 |
%% https://github.com/ho-tex/hopatch/issues |
| 33 |
%% |
| 34 |
%% This work consists of the main source file hopatch.dtx |
| 35 |
%% and the derived files |
| 36 |
%% hopatch.sty, hopatch-2016-05-16.sty, hopatch.pdf, hopatch.ins, hopatch.drv, |
| 37 |
%% hopatch-test1.tex, hopatch-test2.tex. |
| 38 |
%% |
| 39 |
\begingroup\catcode61\catcode48\catcode32=10\relax% |
| 40 |
\catcode13=5 % ^^M |
| 41 |
\endlinechar=13 % |
| 42 |
\catcode123=1 % { |
| 43 |
\catcode125=2 % } |
| 44 |
\catcode64=11 % @ |
| 45 |
\def\x{\endgroup |
| 46 |
\expandafter\edef\csname HOpatch@AtEnd\endcsname{% |
| 47 |
\endlinechar=\the\endlinechar\relax |
| 48 |
\catcode13=\the\catcode13\relax |
| 49 |
\catcode32=\the\catcode32\relax |
| 50 |
\catcode35=\the\catcode35\relax |
| 51 |
\catcode61=\the\catcode61\relax |
| 52 |
\catcode64=\the\catcode64\relax |
| 53 |
\catcode123=\the\catcode123\relax |
| 54 |
\catcode125=\the\catcode125\relax |
| 55 |
}% |
| 56 |
}% |
| 57 |
\x\catcode61\catcode48\catcode32=10\relax% |
| 58 |
\catcode13=5 % ^^M |
| 59 |
\endlinechar=13 % |
| 60 |
\catcode35=6 % # |
| 61 |
\catcode64=11 % @ |
| 62 |
\catcode123=1 % { |
| 63 |
\catcode125=2 % } |
| 64 |
\def\TMP@EnsureCode#1#2{% |
| 65 |
\edef\HOpatch@AtEnd{% |
| 66 |
\HOpatch@AtEnd |
| 67 |
\catcode#1=\the\catcode#1\relax |
| 68 |
}% |
| 69 |
\catcode#1=#2\relax |
| 70 |
} |
| 71 |
\TMP@EnsureCode{40}{12}% ( |
| 72 |
\TMP@EnsureCode{41}{12}% ) |
| 73 |
\TMP@EnsureCode{43}{12}% + |
| 74 |
\TMP@EnsureCode{46}{12}% . |
| 75 |
\TMP@EnsureCode{47}{12}% / |
| 76 |
\TMP@EnsureCode{91}{12}% [ |
| 77 |
\TMP@EnsureCode{93}{12}% ] |
| 78 |
\edef\HOpatch@AtEnd{\HOpatch@AtEnd\noexpand\endinput} |
| 79 |
\NeedsTeXFormat{LaTeX2e} |
| 80 |
\ProvidesPackage{hopatch}% |
| 81 |
[2023-01-07 v1.5 Wrapper for package hooks / legacy code (v1.3) (HO)] |
| 82 |
\begingroup\expandafter\expandafter\expandafter\endgroup |
| 83 |
\expandafter\ifx\csname RequirePackage\endcsname\relax |
| 84 |
\def\TMP@RequirePackage#1[#2]{% |
| 85 |
\begingroup\expandafter\expandafter\expandafter\endgroup |
| 86 |
\expandafter\ifx\csname ver@#1.sty\endcsname\relax |
| 87 |
\input #1.sty\relax |
| 88 |
\fi |
| 89 |
}% |
| 90 |
\TMP@RequirePackage{ltxcmds}[2010/12/12]% |
| 91 |
\else |
| 92 |
\RequirePackage{ltxcmds}[2010/12/12]% |
| 93 |
\fi |
| 94 |
\def\HOpatch@counter{0}% |
| 95 |
\ltx@ifundefined{numexpr}{% |
| 96 |
\def\HOpatch@StepCounter{% |
| 97 |
\begingroup |
| 98 |
\count@\HOpatch@counter\relax |
| 99 |
\advance\count@\ltx@one\relax |
| 100 |
\edef\x{\endgroup |
| 101 |
\noexpand\def\noexpand\HOpatch@counter{\the\count@}% |
| 102 |
}% |
| 103 |
\x |
| 104 |
}% |
| 105 |
}{% |
| 106 |
\def\HOpatch@StepCounter{% |
| 107 |
\edef\HOpatch@counter{% |
| 108 |
\the\numexpr\HOpatch@counter+\ltx@one\relax |
| 109 |
}% |
| 110 |
}% |
| 111 |
} |
| 112 |
\def\HOpatch@list{} |
| 113 |
\def\HOpatch@Add{% |
| 114 |
\ltx@LocalAppendToMacro\HOpatch@list |
| 115 |
} |
| 116 |
\def\hopatch@AfterPackage#1{% |
| 117 |
\ltx@ifpackageloaded{#1}{% |
| 118 |
\ltx@firstofone |
| 119 |
}{% |
| 120 |
\HOpatch@AfterPackage{#1}% |
| 121 |
}% |
| 122 |
} |
| 123 |
\def\HOpatch@AfterPackage#1{% |
| 124 |
\edef\HOpatch@temp{#1}% |
| 125 |
\HOpatch@StepCounter |
| 126 |
\expandafter\HOpatch@@AfterPackage |
| 127 |
\csname HOpatch@\HOpatch@counter\expandafter\endcsname{% |
| 128 |
\HOpatch@temp |
| 129 |
}% |
| 130 |
} |
| 131 |
\def\HOpatch@@AfterPackage#1#2#3{% |
| 132 |
\begingroup |
| 133 |
\toks@{#3}% |
| 134 |
\xdef\HOpatch@gtemp{% |
| 135 |
\noexpand\ltx@ifpackageloaded{#2}{% |
| 136 |
\noexpand\let\noexpand#1\noexpand\relax |
| 137 |
\the\toks@ |
| 138 |
}{}% |
| 139 |
}% |
| 140 |
\endgroup |
| 141 |
\let#1\HOpatch@gtemp |
| 142 |
\HOpatch@Add#1% |
| 143 |
\HOpatch@Try{AfterPackage}{#2}#1% |
| 144 |
\HOpatch@Try{AtEndPackage}{#2}#1% |
| 145 |
\HOpatch@Try{AtEndOfPackageFile}{#2}#1% |
| 146 |
} |
| 147 |
\def\HOpatch@Try#1#2#3{% |
| 148 |
\ltx@ifundefined{#1}{}{% |
| 149 |
\csname #1\endcsname{#2}{#3}% |
| 150 |
}% |
| 151 |
} |
| 152 |
\AtBeginDocument{\HOpatch@list} |
| 153 |
\ltx@ifundefined{AtEndPreamble}{}{% |
| 154 |
\ltx@ifundefined{@endpreamblehook}{}{% |
| 155 |
\AtEndPreamble{\HOpatch@list}% |
| 156 |
}% |
| 157 |
} |
| 158 |
\ltx@ifundefined{AfterEndPreamble}{}{% |
| 159 |
\ltx@ifundefined{@afterendpreamblehook}{}{% |
| 160 |
\AfterEndPreamble{% |
| 161 |
\let\HOpatch@OrgIfPackageLoaded\@ifpackageloaded |
| 162 |
\let\HOpatch@OrgIfPackageLater\@ifpackagelater |
| 163 |
\let\HOpatch@OrgIfClassLoaded\@ifclassloaded |
| 164 |
\let\HOpatch@OrgIfClassLater\@ifclasslater |
| 165 |
\let\@ifpackageloaded\ltx@ifpackageloaded |
| 166 |
\let\@ifpackagelater\ltx@ifpackagelater |
| 167 |
\let\@ifclassloaded\ltx@ifclassloaded |
| 168 |
\let\@ifclasslater\ltx@ifclasslater |
| 169 |
\HOpatch@list |
| 170 |
\let\@ifpackageloaded\HOpatch@OrgIfPackageLoaded |
| 171 |
\let\@ifpackagelater\HOpatch@OrgIfPackageLater |
| 172 |
\let\@ifclassloaded\HOpatch@OrgIfClassLoaded |
| 173 |
\let\@ifclasslater\HOpatch@OrgIfClassLater |
| 174 |
}% |
| 175 |
}% |
| 176 |
} |
| 177 |
\HOpatch@AtEnd% |
| 178 |
\endinput |
| 179 |
%% |
| 180 |
%% End of file `hopatch-2016-05-16.sty'. |