| 1 |
%% |
| 2 |
%% This is file `auxhook.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% auxhook.dtx (with options: `package') |
| 8 |
%% |
| 9 |
%% This is a generated file. |
| 10 |
%% |
| 11 |
%% Project: auxhook |
| 12 |
%% Version: 2019-12-17 v1.6 |
| 13 |
%% |
| 14 |
%% Copyright (C) |
| 15 |
%% 2006, 2007, 2009, 2011 Heiko Oberdiek |
| 16 |
%% 2016-2019 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/auxhook/issues |
| 33 |
%% |
| 34 |
%% |
| 35 |
%% This work consists of the main source file auxhook.dtx |
| 36 |
%% and the derived files |
| 37 |
%% auxhook.sty, auxhook.pdf, auxhook.ins, auxhook.drv. |
| 38 |
%% |
| 39 |
\NeedsTeXFormat{LaTeX2e} |
| 40 |
\ProvidesPackage{auxhook}% |
| 41 |
[2019-12-17 v1.6 Hooks for auxiliary files (HO)]% |
| 42 |
\providecommand*{\@beginmainauxhook}{} |
| 43 |
\providecommand*{\@beginpartauxhook}{} |
| 44 |
\ifx\AtBeginDocument\@firstofone |
| 45 |
\global\let\@beginmainauxhook\relax |
| 46 |
\else |
| 47 |
\g@addto@macro{\@beginmainauxhook}{% |
| 48 |
\global\let\@beginmainauxhook\relax |
| 49 |
}% |
| 50 |
\fi |
| 51 |
\newcommand{\AddLineBeginMainAux}[1]{% |
| 52 |
\ifx\@beginmainauxhook\relax |
| 53 |
\if@filesw |
| 54 |
\PackageInfo{auxhook}{% |
| 55 |
\@backslashchar AddLineBeginMainAux comes a little late,% |
| 56 |
\MessageBreak |
| 57 |
because the main .aux file is already opened% |
| 58 |
}% |
| 59 |
\immediate\write\@mainaux{#1}% |
| 60 |
\fi |
| 61 |
\else |
| 62 |
\g@addto@macro\@beginmainauxhook{% |
| 63 |
\immediate\write\@mainaux{#1}% |
| 64 |
}% |
| 65 |
\fi |
| 66 |
} |
| 67 |
\newcommand{\AddLineBeginPartAux}[1]{% |
| 68 |
\g@addto@macro\@beginpartauxhook{% |
| 69 |
\immediate\write\@partaux{#1}% |
| 70 |
}% |
| 71 |
} |
| 72 |
\newcommand{\AddLineBeginAux}[1]{% |
| 73 |
\AddLineBeginMainAux{#1}% |
| 74 |
\AddLineBeginPartAux{#1}% |
| 75 |
} |
| 76 |
\begingroup |
| 77 |
\@ifundefined{beamer@origdocument}{% |
| 78 |
\def\auxhook@document{\document}% |
| 79 |
}{% |
| 80 |
\def\auxhook@document{\beamer@origdocument}% |
| 81 |
}% |
| 82 |
\long\def\y#1\immediate\write\@mainaux#2#3\auxhook@nil{% |
| 83 |
\toks@{% |
| 84 |
#1\immediate\write\@mainaux{#2}% |
| 85 |
\@beginmainauxhook |
| 86 |
#3% |
| 87 |
}% |
| 88 |
\expandafter\xdef\auxhook@document{\the\toks@}% |
| 89 |
\endgroup |
| 90 |
}% |
| 91 |
\long\def\x#1\immediate\write\@mainaux#2#3\auxhook@nil{% |
| 92 |
\toks@{#3}% |
| 93 |
\edef\x{\the\toks@}% |
| 94 |
\ifx\x\@empty |
| 95 |
\PackageWarningNoLine{auxhook}{% |
| 96 |
Cannot patch \expandafter\string\auxhook@document,% |
| 97 |
\MessageBreak |
| 98 |
using \string\AtBeginDocument\space instead% |
| 99 |
}% |
| 100 |
\endgroup |
| 101 |
\AtBeginDocument{% |
| 102 |
\if@filesw |
| 103 |
\@beginmainauxhook |
| 104 |
\fi |
| 105 |
}% |
| 106 |
\else |
| 107 |
\expandafter\expandafter\expandafter\y\auxhook@document |
| 108 |
\auxhook@nil |
| 109 |
\fi |
| 110 |
}% |
| 111 |
\expandafter\expandafter\expandafter\x\auxhook@document |
| 112 |
\immediate\write\@mainaux{}\auxhook@nil |
| 113 |
\begingroup |
| 114 |
\long\def\y#1\immediate\write\@partaux#2#3\auxhook@nil#4{% |
| 115 |
\endgroup |
| 116 |
\def#4##1 {% |
| 117 |
#1\immediate\write\@partaux{#2}% |
| 118 |
\@beginpartauxhook |
| 119 |
#3% |
| 120 |
}% |
| 121 |
}% |
| 122 |
\long\def\x#1\immediate\write\@partaux#2#3\auxhook@nil#4{% |
| 123 |
\toks@{#3}% |
| 124 |
\edef\x{\the\toks@}% |
| 125 |
\ifx\x\@empty |
| 126 |
\PackageWarningNoLine{auxhook}{% |
| 127 |
Cannot patch \string#4,\MessageBreak |
| 128 |
patch dropped% |
| 129 |
}% |
| 130 |
\endgroup |
| 131 |
\else |
| 132 |
\expandafter\y#4{##1} \auxhook@nil#4% |
| 133 |
\fi |
| 134 |
}% |
| 135 |
\@ifundefined{ReFiCh@org@include}{% |
| 136 |
\expandafter\x\@include{#1} % |
| 137 |
\immediate\write\@partaux{}\auxhook@nil\@include |
| 138 |
}{% |
| 139 |
\expandafter\x\ReFiCh@org@include{#1} % |
| 140 |
\immediate\write\@partaux{}\auxhook@nil\ReFiCh@org@include |
| 141 |
}% |
| 142 |
\endinput |
| 143 |
%% |
| 144 |
%% End of file `auxhook.sty'. |