Debian Codegraph @

texmf-dist/source/latex/hopatch/hopatch.dtx

raw
1 % \iffalse meta-comment
2 %
3 % File: hopatch.dtx
4 % Version: 2023-01-07 v1.5
5 % Info: Wrapper for package hooks
6 %
7 % Copyright (C)
8 % 2011, 2012 Heiko Oberdiek
9 % 2016-2023 Oberdiek Package Support Group
10 % https://github.com/ho-tex/hopatch/issues
11 %
12 % This work may be distributed and/or modified under the
13 % conditions of the LaTeX Project Public License, either
14 % version 1.3c of this license or (at your option) any later
15 % version. This version of this license is in
16 % https://www.latex-project.org/lppl/lppl-1-3c.txt
17 % and the latest version of this license is in
18 % https://www.latex-project.org/lppl.txt
19 % and version 1.3 or later is part of all distributions of
20 % LaTeX version 2005/12/01 or later.
21 %
22 % This work has the LPPL maintenance status "maintained".
23 %
24 % The Current Maintainers of this work are
25 % Heiko Oberdiek and the Oberdiek Package Support Group
26 % https://github.com/ho-tex/hopatch/issues
27 %
28 % This work consists of the main source file hopatch.dtx
29 % and the derived files
30 % hopatch.sty, hopatch.pdf, hopatch.ins, hopatch.drv,
31 % hopatch-test1.tex, hopatch-test2.tex.
32 %
33 % Distribution:
34 % CTAN:macros/latex/contrib/hopatch/hopatch.dtx
35 % CTAN:macros/latex/contrib/hopatch/hopatch.pdf
36 %
37 % Unpacking:
38 % (a) If hopatch.ins is present:
39 % tex hopatch.ins
40 % (b) Without hopatch.ins:
41 % tex hopatch.dtx
42 % (c) If you insist on using LaTeX
43 % latex \let\install=y\input{hopatch.dtx}
44 % (quote the arguments according to the demands of your shell)
45 %
46 % Documentation:
47 % (a) If hopatch.drv is present:
48 % latex hopatch.drv
49 % (b) Without hopatch.drv:
50 % latex hopatch.dtx; ...
51 % The class ltxdoc loads the configuration file ltxdoc.cfg
52 % if available. Here you can specify further options, e.g.
53 % use A4 as paper format:
54 % \PassOptionsToClass{a4paper}{article}
55 %
56 % Programm calls to get the documentation (example):
57 % pdflatex hopatch.dtx
58 % makeindex -s gind.ist hopatch.idx
59 % pdflatex hopatch.dtx
60 % makeindex -s gind.ist hopatch.idx
61 % pdflatex hopatch.dtx
62 %
63 % Installation:
64 % TDS:tex/latex/hopatch/hopatch.sty
65 % TDS:doc/latex/hopatch/hopatch.pdf
66 % TDS:source/latex/hopatch/hopatch.dtx
67 %
68 %<*ignore>
69 \begingroup
70 \catcode123=1 %
71 \catcode125=2 %
72 \def\x{LaTeX2e}%
73 \expandafter\endgroup
74 \ifcase 0\ifx\install y1\fi\expandafter
75 \ifx\csname processbatchFile\endcsname\relax\else1\fi
76 \ifx\fmtname\x\else 1\fi\relax
77 \else\csname fi\endcsname
78 %</ignore>
79 %<*install>
80 \input docstrip.tex
81 \Msg{************************************************************************}
82 \Msg{* Installation}
83 \Msg{* Package: hopatch 2023-01-07 v1.5 Wrapper for package hooks (HO)}
84 \Msg{************************************************************************}
85
86 \keepsilent
87 \askforoverwritefalse
88
89 \let\MetaPrefix\relax
90 \preamble
91
92 This is a generated file.
93
94 Project: hopatch
95 Version: 2023-01-07 v1.5
96
97 Copyright (C)
98 2011, 2012 Heiko Oberdiek
99 2016-2023 Oberdiek Package Support Group
100
101 This work may be distributed and/or modified under the
102 conditions of the LaTeX Project Public License, either
103 version 1.3c of this license or (at your option) any later
104 version. This version of this license is in
105 https://www.latex-project.org/lppl/lppl-1-3c.txt
106 and the latest version of this license is in
107 https://www.latex-project.org/lppl.txt
108 and version 1.3 or later is part of all distributions of
109 LaTeX version 2005/12/01 or later.
110
111 This work has the LPPL maintenance status "maintained".
112
113 The Current Maintainers of this work are
114 Heiko Oberdiek and the Oberdiek Package Support Group
115 https://github.com/ho-tex/hopatch/issues
116
117
118 This work consists of the main source file hopatch.dtx
119 and the derived files
120 hopatch.sty, hopatch-2016-05-16.sty, hopatch.pdf, hopatch.ins, hopatch.drv,
121 hopatch-test1.tex, hopatch-test2.tex.
122
123 \endpreamble
124 \let\MetaPrefix\DoubleperCent
125
126 \generate{%
127 \file{hopatch.ins}{\from{hopatch.dtx}{install}}%
128 \file{hopatch.drv}{\from{hopatch.dtx}{driver}}%
129 \usedir{tex/latex/hopatch}%
130 \file{hopatch-2016-05-16.sty}{\from{hopatch.dtx}{packagefrozen}}%
131 \file{hopatch.sty}{\from{hopatch.dtx}{package}}%
132 % \usedir{doc/latex/hopatch/test}%
133 % \file{hopatch-test1.tex}{\from{hopatch.dtx}{test1}}%
134 % \file{hopatch-test2.tex}{\from{hopatch.dtx}{test2}}%
135 }
136
137 \catcode32=13\relax% active space
138 \let =\space%
139 \Msg{************************************************************************}
140 \Msg{*}
141 \Msg{* To finish the installation you have to move the following}
142 \Msg{* file into a directory searched by TeX:}
143 \Msg{*}
144 \Msg{* hopatch.sty}
145 \Msg{*}
146 \Msg{* To produce the documentation run the file `hopatch.drv'}
147 \Msg{* through LaTeX.}
148 \Msg{*}
149 \Msg{* Happy TeXing!}
150 \Msg{*}
151 \Msg{************************************************************************}
152
153 \endbatchfile
154 %</install>
155 %<*ignore>
156 \fi
157 %</ignore>
158 %<*driver>
159 \NeedsTeXFormat{LaTeX2e}
160 \ProvidesFile{hopatch.drv}%
161 [2023-01-07 v1.5 Wrapper for package hooks (HO)]%
162 \documentclass{ltxdoc}
163 \usepackage{holtxdoc}[2011/11/22]
164 \usepackage{caption}
165 \usepackage{array}
166 \setlength{\extrarowheight}{1pt}
167 \renewcommand*{\arraystretch}{1.1}
168 \begin{document}
169 \DocInput{hopatch.dtx}%
170 \end{document}
171 %</driver>
172 % \fi
173 %
174 %
175 %
176 % \GetFileInfo{hopatch.drv}
177 %
178 % \title{The \xpackage{hopatch} package}
179 % \date{2023-01-07 v1.5}
180 % \author{Heiko Oberdiek\thanks
181 % {Please report any issues at \url{https://github.com/ho-tex/hopatch/issues}}}
182 %
183 % \maketitle
184 %
185 % \begin{abstract}
186 % This packages provides a wrapper to various package hooks
187 % provided by other packages or classes, but does not define
188 % own hooks.
189 % \end{abstract}
190 %
191 % \tableofcontents
192 % \newpage
193 % \section{Documentation for version 1.4}
194 % Starting with this version
195 %
196 % \begin{declcs}{hopatch@AfterPackage} \M{package} \M{patch code}
197 % \end{declcs}
198 %
199 % will use a generic file hook from the kernel if a
200 % LaTeX format later then 2020/20/01 is detected
201 % (\texttt{package/after/\meta{package}} in version 1.4,
202 % \texttt{package/\meta{package}/after} in version 1.5).
203 % This can mean that the
204 % hook code is executed earlier than with version 1.3 (but always after the
205 % \meta{package}.
206 % If \meta{package} is already loaded, the \meta{patch code} is executed
207 % immediately. If an older format is detected if will fall back to the code of
208 % version 1.3.
209 %
210 % \section{Documentation for version 1.3}
211 %
212 % Sometimes I want to add code right after a package
213 % has been loaded. Examples are bug fixes, adaptations,
214 % or added features as needed by package \xpackage{hyperref},
215 % for instance.
216 %
217 % Unhappily \hologo{LaTeX} does not provide this kind of
218 % hook. \cs{AtEndOfPackage} can be used inside the package
219 % only, because \hologo{LaTeX} clears the hook right before
220 % it loads the package.
221 %
222 % However, there are already many packages and classes
223 % that provide hooks that are executed after the package
224 % is loaded, see table~\ref{tab:hooks}.
225 %
226 % \begin{table}[b]
227 % \caption{After package hooking}
228 % \label{tab:hooks}
229 % \begin{tabular}{ll}
230 % \bfseries Macro & \bfseries Provider\\
231 % \hline
232 % \cs{AfterPackage} & package \xpackage{scrlfile} \cite{scrlfile}\\
233 % \cs{AtEndOfPackageFile} & package \xpackage{filehook} \cite{filehook}\\
234 % \cs{AtEndPackage} & class \xclass{memoir} \cite{memoir}
235 % \end{tabular}
236 % \end{table}
237 %
238 % Package \xpackage{hopatch} can be used without the packages
239 % of table~\ref{tab:hooks}. But for an early executing right
240 % after a package is loaded, one of the following class or
241 % packages should be loaded before using \cs{hopatch@AfterPackage}:
242 % \begin{itemize}
243 % \item package \xpackage{filehook}
244 % \item package \xpackage{scrlfile}
245 % \item class \xclass{memoir}
246 % \end{itemize}
247 %
248 % \begin{table}
249 % \caption{After begin document hooking}
250 % \begin{tabular}{ll}
251 % \bfseries Macro & \bfseries Provider\\
252 % \hline
253 % \cs{AtBeginDocument} & \hologo{LaTeX}'s kernel\\
254 % \cs{AtEndPreamble} & package \xpackage{etoolbox} \cite{etoolbox}\\
255 % \cs{AfterEndPreamble} & package \xpackage{etoolbox}
256 % \end{tabular}
257 % \end{table}
258 %
259 % Therefore I skip writing a new package for hooking into
260 % \hologo{LaTeX}'s package management and use this package
261 % to provide a wrapper to patch a package after it is loaded.
262 %
263 % \begin{declcs}{hopatch@AfterPackage} \M{package} \M{patch code}
264 % \end{declcs}
265 % If the package is already loaded, the \meta{patch code} is executed
266 % immediately.
267 % Otherwise the \meta{patch code} is stored in a command and tried
268 % at later locations until the package is available.
269 %
270 % The patch is tried in the following order:
271 % \begin{enumerate}
272 % \item If the package is already loaded, the patch is
273 % applied immediately. Further locations are not tried.
274 % \item \cs{AtEndPackage}, provided by class \xclass{memoir} \cite{memoir},
275 % and \cs{AfterPackage}, provided by package \xpackage{scrlfile} \cite{scrlfile},
276 % are called right after the package file is input before
277 % the hook of \hologo{LaTeX}'s \cs{AtEndOfPackage}.
278 % \item \cs{AtEndOfPackageFile}, provided by package \xpackage{filehook} \cite{filehook},
279 % is called after the package is loaded and after the hook of
280 % \hologo{LaTeX}'s \cs{AtEndOfPackage}.
281 % \item \cs{AtEndPreamble}, provided by package \xpackage{etoolbox} \cite{etoolbox},
282 % is called at the beginning of |\begin{document}| before the hook
283 % of \hologo{LaTeX}'s \cs{AtBeginDocument}.
284 % \item \cs{AtBeginDocument}, provided by \hologo{LaTeX}.
285 % \item \cs{AfterEndDocument}, provided by package \xpackage{etoolbox} \cite{etoolbox},
286 % is called at the very end of |\begin{document}|. Preamble commands are
287 % already forbidden there.
288 % \end{enumerate}
289 % Because of the various locations the patch code is restricted to
290 % limitations:
291 % \begin{itemize}
292 % \item
293 % Preamble commands, see \hologo{LaTeX}'s \cs{@onlypreamble}
294 % throw an error if used after |\begin{document}|. This is already
295 % the case for \cs{AfterEndDocument}. Therefore preamble commands
296 % are forbidden in the patching code.
297 % There are four exceptions \cs{@ifpackageloaded}, \cs{@ifclassloaded},
298 % \cs{@ifpackagelater} and \cs{@ifclasslater}. They are redefined
299 % during \cs{AfterEndDocument} using the counterparts of
300 % package \xpackage{ltxcmds} \cite{ltxcmds}.
301 % \item
302 % \cs{AfterPackage} of package \xpackage{scrlfile} and \cs{AtEndPackage}
303 % of class \xclass{memoir} call the hook before \hologo{LaTeX}'s
304 % \cs{AtEndOfPackage}.
305 % \end{itemize}
306 %
307 % \StopEventually{
308 % }
309 %
310 % \section{Implementation}
311 % \begin{macrocode}
312 %<*package>
313 % \end{macrocode}
314 % \subsection{v.1.4: New implementation using the LaTeX kernel hooks}
315 % \begin{macrocode}
316 \NeedsTeXFormat{LaTeX2e}
317 \ProvidesPackage{hopatch}%
318 [2023-01-07 v1.5 Wrapper for package hooks (HO)]
319 % \end{macrocode}
320 % \begin{macrocode}
321 \providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}
322 \IfFormatAtLeastTF{2020/10/01}{}{\input{hopatch-2016-05-16.sty}}
323 \IfFormatAtLeastTF{2020/10/01}{}{\endinput}
324
325 \newcommand\hopatch@AfterPackage[1]{%
326 \@ifpackageloaded{#1}{%
327 \@firstofone
328 }{%
329 \AddToHook{package/#1/after}%
330 }}
331
332 % \end{macrocode}
333 % \begin{macrocode}
334 %</package>
335 % \end{macrocode}
336 % \begin{macrocode}
337 %<*packagefrozen>
338 % \end{macrocode}
339 %
340 % \subsection{Catcodes and package identification}
341 %
342 % \begin{macrocode}
343 \begingroup\catcode61\catcode48\catcode32=10\relax%
344 \catcode13=5 % ^^M
345 \endlinechar=13 %
346 \catcode123=1 % {
347 \catcode125=2 % }
348 \catcode64=11 % @
349 \def\x{\endgroup
350 \expandafter\edef\csname HOpatch@AtEnd\endcsname{%
351 \endlinechar=\the\endlinechar\relax
352 \catcode13=\the\catcode13\relax
353 \catcode32=\the\catcode32\relax
354 \catcode35=\the\catcode35\relax
355 \catcode61=\the\catcode61\relax
356 \catcode64=\the\catcode64\relax
357 \catcode123=\the\catcode123\relax
358 \catcode125=\the\catcode125\relax
359 }%
360 }%
361 \x\catcode61\catcode48\catcode32=10\relax%
362 \catcode13=5 % ^^M
363 \endlinechar=13 %
364 \catcode35=6 % #
365 \catcode64=11 % @
366 \catcode123=1 % {
367 \catcode125=2 % }
368 \def\TMP@EnsureCode#1#2{%
369 \edef\HOpatch@AtEnd{%
370 \HOpatch@AtEnd
371 \catcode#1=\the\catcode#1\relax
372 }%
373 \catcode#1=#2\relax
374 }
375 \TMP@EnsureCode{40}{12}% (
376 \TMP@EnsureCode{41}{12}% )
377 \TMP@EnsureCode{43}{12}% +
378 \TMP@EnsureCode{46}{12}% .
379 \TMP@EnsureCode{47}{12}% /
380 \TMP@EnsureCode{91}{12}% [
381 \TMP@EnsureCode{93}{12}% ]
382 \edef\HOpatch@AtEnd{\HOpatch@AtEnd\noexpand\endinput}
383 % \end{macrocode}
384 %
385 % Package identification.
386 % \begin{macrocode}
387 \NeedsTeXFormat{LaTeX2e}
388 \ProvidesPackage{hopatch}%
389 [2023-01-07 v1.5 Wrapper for package hooks / legacy code (v1.3) (HO)]
390 % \end{macrocode}
391 %
392 % \subsection{Resources}
393 %
394 % \begin{macrocode}
395 \begingroup\expandafter\expandafter\expandafter\endgroup
396 \expandafter\ifx\csname RequirePackage\endcsname\relax
397 \def\TMP@RequirePackage#1[#2]{%
398 \begingroup\expandafter\expandafter\expandafter\endgroup
399 \expandafter\ifx\csname ver@#1.sty\endcsname\relax
400 \input #1.sty\relax
401 \fi
402 }%
403 \TMP@RequirePackage{ltxcmds}[2010/12/12]%
404 \else
405 \RequirePackage{ltxcmds}[2010/12/12]%
406 \fi
407 % \end{macrocode}
408 %
409 % \begin{macro}{\HOpatch@counter}
410 % \begin{macrocode}
411 \def\HOpatch@counter{0}%
412 % \end{macrocode}
413 % \end{macro}
414 % \begin{macro}{\HOpatch@StepCounter}
415 % \begin{macrocode}
416 \ltx@ifundefined{numexpr}{%
417 \def\HOpatch@StepCounter{%
418 \begingroup
419 \count@\HOpatch@counter\relax
420 \advance\count@\ltx@one\relax
421 \edef\x{\endgroup
422 \noexpand\def\noexpand\HOpatch@counter{\the\count@}%
423 }%
424 \x
425 }%
426 }{%
427 \def\HOpatch@StepCounter{%
428 \edef\HOpatch@counter{%
429 \the\numexpr\HOpatch@counter+\ltx@one\relax
430 }%
431 }%
432 }
433 % \end{macrocode}
434 % \end{macro}
435 %
436 % \begin{macro}{\HOpatch@list}
437 % \begin{macrocode}
438 \def\HOpatch@list{}
439 % \end{macrocode}
440 % \end{macro}
441 %
442 % \begin{macro}{\HOpatch@Add}
443 % \begin{macrocode}
444 \def\HOpatch@Add{%
445 \ltx@LocalAppendToMacro\HOpatch@list
446 }
447 % \end{macrocode}
448 % \end{macro}
449 %
450 % \subsection{Package patching}
451 %
452 % \begin{macro}{\hopatch@AfterPackage}
453 % \begin{macrocode}
454 \def\hopatch@AfterPackage#1{%
455 \ltx@ifpackageloaded{#1}{%
456 \ltx@firstofone
457 }{%
458 \HOpatch@AfterPackage{#1}%
459 }%
460 }
461 % \end{macrocode}
462 % \end{macro}
463 % \begin{macro}{\HOpatch@AfterPackage}
464 % \begin{macrocode}
465 \def\HOpatch@AfterPackage#1{%
466 \edef\HOpatch@temp{#1}%
467 \HOpatch@StepCounter
468 \expandafter\HOpatch@@AfterPackage
469 \csname HOpatch@\HOpatch@counter\expandafter\endcsname{%
470 \HOpatch@temp
471 }%
472 }
473 % \end{macrocode}
474 % \end{macro}
475 %
476 % \begin{macro}{\HOpatch@@AfterPackage}
477 % \begin{macrocode}
478 \def\HOpatch@@AfterPackage#1#2#3{%
479 \begingroup
480 \toks@{#3}%
481 \xdef\HOpatch@gtemp{%
482 \noexpand\ltx@ifpackageloaded{#2}{%
483 \noexpand\let\noexpand#1\noexpand\relax
484 \the\toks@
485 }{}%
486 }%
487 \endgroup
488 \let#1\HOpatch@gtemp
489 \HOpatch@Add#1%
490 \HOpatch@Try{AfterPackage}{#2}#1%
491 \HOpatch@Try{AtEndPackage}{#2}#1%
492 \HOpatch@Try{AtEndOfPackageFile}{#2}#1%
493 }
494 % \end{macrocode}
495 % \end{macro}
496 %
497 % \begin{macro}{\HOpatch@Try}
498 % \begin{macrocode}
499 \def\HOpatch@Try#1#2#3{%
500 \ltx@ifundefined{#1}{}{%
501 \csname #1\endcsname{#2}{#3}%
502 }%
503 }
504 % \end{macrocode}
505 % \end{macro}
506 %
507 % \begin{macrocode}
508 \AtBeginDocument{\HOpatch@list}
509 \ltx@ifundefined{AtEndPreamble}{}{%
510 \ltx@ifundefined{@endpreamblehook}{}{%
511 \AtEndPreamble{\HOpatch@list}%
512 }%
513 }
514 \ltx@ifundefined{AfterEndPreamble}{}{%
515 \ltx@ifundefined{@afterendpreamblehook}{}{%
516 \AfterEndPreamble{%
517 \let\HOpatch@OrgIfPackageLoaded\@ifpackageloaded
518 \let\HOpatch@OrgIfPackageLater\@ifpackagelater
519 \let\HOpatch@OrgIfClassLoaded\@ifclassloaded
520 \let\HOpatch@OrgIfClassLater\@ifclasslater
521 \let\@ifpackageloaded\ltx@ifpackageloaded
522 \let\@ifpackagelater\ltx@ifpackagelater
523 \let\@ifclassloaded\ltx@ifclassloaded
524 \let\@ifclasslater\ltx@ifclasslater
525 \HOpatch@list
526 \let\@ifpackageloaded\HOpatch@OrgIfPackageLoaded
527 \let\@ifpackagelater\HOpatch@OrgIfPackageLater
528 \let\@ifclassloaded\HOpatch@OrgIfClassLoaded
529 \let\@ifclasslater\HOpatch@OrgIfClassLater
530 }%
531 }%
532 }
533 % \end{macrocode}
534 %
535 % \begin{macrocode}
536 \HOpatch@AtEnd%
537 % \end{macrocode}
538 % \begin{macrocode}
539 %</packagefrozen>
540 % \end{macrocode}
541 % \section{Installation}
542 %
543 % \subsection{Download}
544 %
545 % \paragraph{Package.} This package is available on
546 % CTAN\footnote{\CTANpkg{hopatch}}:
547 % \begin{description}
548 % \item[\CTAN{macros/latex/contrib/hopatch/hopatch.dtx}] The source file.
549 % \item[\CTAN{macros/latex/contrib/hopatch/hopatch.pdf}] Documentation.
550 % \end{description}
551 %
552 %
553 %
554 % \subsection{Package installation}
555 %
556 % \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting
557 % \docstrip\ archive. The files are extracted by running the
558 % \xfile{.dtx} through \plainTeX:
559 % \begin{quote}
560 % \verb|tex hopatch.dtx|
561 % \end{quote}
562 %
563 % \paragraph{TDS.} Now the different files must be moved into
564 % the different directories in your installation TDS tree
565 % (also known as \xfile{texmf} tree):
566 % \begin{quote}
567 % \def\t{^^A
568 % \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
569 % hopatch.sty & tex/latex/hopatch/hopatch.sty\\
570 % hopatch.pdf & doc/latex/hopatch/hopatch.pdf\\
571 % hopatch.dtx & source/latex/hopatch/hopatch.dtx\\
572 % \end{tabular}^^A
573 % }^^A
574 % \sbox0{\t}^^A
575 % \ifdim\wd0>\linewidth
576 % \begingroup
577 % \advance\linewidth by\leftmargin
578 % \advance\linewidth by\rightmargin
579 % \edef\x{\endgroup
580 % \def\noexpand\lw{\the\linewidth}^^A
581 % }\x
582 % \def\lwbox{^^A
583 % \leavevmode
584 % \hbox to \linewidth{^^A
585 % \kern-\leftmargin\relax
586 % \hss
587 % \usebox0
588 % \hss
589 % \kern-\rightmargin\relax
590 % }^^A
591 % }^^A
592 % \ifdim\wd0>\lw
593 % \sbox0{\small\t}^^A
594 % \ifdim\wd0>\linewidth
595 % \ifdim\wd0>\lw
596 % \sbox0{\footnotesize\t}^^A
597 % \ifdim\wd0>\linewidth
598 % \ifdim\wd0>\lw
599 % \sbox0{\scriptsize\t}^^A
600 % \ifdim\wd0>\linewidth
601 % \ifdim\wd0>\lw
602 % \sbox0{\tiny\t}^^A
603 % \ifdim\wd0>\linewidth
604 % \lwbox
605 % \else
606 % \usebox0
607 % \fi
608 % \else
609 % \lwbox
610 % \fi
611 % \else
612 % \usebox0
613 % \fi
614 % \else
615 % \lwbox
616 % \fi
617 % \else
618 % \usebox0
619 % \fi
620 % \else
621 % \lwbox
622 % \fi
623 % \else
624 % \usebox0
625 % \fi
626 % \else
627 % \lwbox
628 % \fi
629 % \else
630 % \usebox0
631 % \fi
632 % \end{quote}
633 % If you have a \xfile{docstrip.cfg} that configures and enables \docstrip's
634 % TDS installing feature, then some files can already be in the right
635 % place, see the documentation of \docstrip.
636 %
637 % \subsection{Refresh file name databases}
638 %
639 % If your \TeX~distribution
640 % (\TeX\,Live, \mikTeX, \dots) relies on file name databases, you must refresh
641 % these. For example, \TeX\,Live\ users run \verb|texhash| or
642 % \verb|mktexlsr|.
643 %
644 % \subsection{Some details for the interested}
645 %
646 % \paragraph{Unpacking with \LaTeX.}
647 % The \xfile{.dtx} chooses its action depending on the format:
648 % \begin{description}
649 % \item[\plainTeX:] Run \docstrip\ and extract the files.
650 % \item[\LaTeX:] Generate the documentation.
651 % \end{description}
652 % If you insist on using \LaTeX\ for \docstrip\ (really,
653 % \docstrip\ does not need \LaTeX), then inform the autodetect routine
654 % about your intention:
655 % \begin{quote}
656 % \verb|latex \let\install=y\input{hopatch.dtx}|
657 % \end{quote}
658 % Do not forget to quote the argument according to the demands
659 % of your shell.
660 %
661 % \paragraph{Generating the documentation.}
662 % You can use both the \xfile{.dtx} or the \xfile{.drv} to generate
663 % the documentation. The process can be configured by the
664 % configuration file \xfile{ltxdoc.cfg}. For instance, put this
665 % line into this file, if you want to have A4 as paper format:
666 % \begin{quote}
667 % \verb|\PassOptionsToClass{a4paper}{article}|
668 % \end{quote}
669 % An example follows how to generate the
670 % documentation with pdf\LaTeX:
671 % \begin{quote}
672 %\begin{verbatim}
673 %pdflatex hopatch.dtx
674 %makeindex -s gind.ist hopatch.idx
675 %pdflatex hopatch.dtx
676 %makeindex -s gind.ist hopatch.idx
677 %pdflatex hopatch.dtx
678 %\end{verbatim}
679 % \end{quote}
680 %
681 % \begin{thebibliography}{9}
682 % \raggedright
683 %
684 % \bibitem{etoolbox}
685 % Philipp Lehman:
686 % \textit{The etoolbox Package}
687 % 2011-01-03.
688 % \CTANpkg{etoolbox}
689 %
690 % \bibitem{filehook}
691 % Martin Scharrer:
692 % \textit{The filehook Package};
693 % 2011-01-09.
694 % \CTANpkg{filehook}
695 %
696 % \bibitem{ltxcmds}
697 % Heiko Oberdiek:
698 % \textit{The ltxcmds Package};
699 % 2010-12-12.
700 % \CTANpkg{ltxcmds}
701 %
702 % \bibitem{memoir}
703 % Peter Wilson, Lars Madsen:
704 % \textit{The Memoir Class for Configurable Typesetting, User Guide};
705 % 2010.
706 % \CTANpkg{memoir}
707 %
708 % \bibitem{scrlfile}
709 % Markus Kohm, Jens-Uwe Morawski:
710 % \textit{The Guide KOMA-Script};
711 % 2011-01-20.
712 % \CTANpkg{koma-script}
713 %
714 % \end{thebibliography}
715 %
716 % \begin{History}
717 % \begin{Version}{2011/01/30 v1.0}
718 % \item
719 % First public version.
720 % \end{Version}
721 % \begin{Version}{2011/06/24 v1.1}
722 % \item
723 % Fix the use of \cs{AtEndPreamble} and \cs{AfterEndPreamble}.
724 % They are redefined by package \xpackage{etoolbox} after their
725 % hooks are used and generate an error message then.
726 % \end{Version}
727 % \begin{Version}{2012/05/28 v1.2}
728 % \item
729 % Fix for use without \hologo{eTeX}
730 % (thanks Gordon Lee).
731 % \end{Version}
732 % \begin{Version}{2016/05/16 v1.3}
733 % \item
734 % Documentation updates.
735 % \end{Version}
736 % \begin{Version}{2020-08-01 v1.4}
737 % \item Starting with this version the package will use the hooks provided
738 % by the LaTeX kernel if the format is newer than 2020/10/01.
739 % \end{Version}
740 % \begin{Version}{2023-01-07 v1.5}
741 % \item Correct the name of the package hook
742 % \end{Version}
743 % \end{History}
744 %
745 % \PrintIndex
746 %
747 % \Finale
748 \endinput