Debian Codegraph @

texmf-dist/tex/generic/infwarerr/infwarerr.sty

raw
1 %%
2 %% This is file `infwarerr.sty',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% infwarerr.dtx (with options: `package')
8 %%
9 %% This is a generated file.
10 %%
11 %% Project: infwarerr
12 %% Version: 2019/12/03 v1.5
13 %%
14 %% Copyright (C)
15 %% 2007, 2010 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/infwarerr/issues
33 %%
34 %%
35 %% The Base Interpreter refers to any `TeX-Format',
36 %% because some files are installed in TDS:tex/generic//.
37 %%
38 %% This work consists of the main source file infwarerr.dtx
39 %% and the derived files
40 %% infwarerr.sty, infwarerr.pdf, infwarerr.ins, infwarerr.drv,
41 %% infwarerr-test1.tex, infwarerr-test2.tex,
42 %% infwarerr-test3.tex.
43 %%
44 \begingroup\catcode61\catcode48\catcode32=10\relax%
45 \catcode13=5 % ^^M
46 \endlinechar=13 %
47 \catcode35=6 % #
48 \catcode39=12 % '
49 \catcode44=12 % ,
50 \catcode45=12 % -
51 \catcode46=12 % .
52 \catcode58=12 % :
53 \catcode64=11 % @
54 \catcode123=1 % {
55 \catcode125=2 % }
56 \expandafter\let\expandafter\x\csname [email protected]\endcsname
57 \ifx\x\relax % plain-TeX, first loading
58 \else
59 \def\empty{}%
60 \ifx\x\empty % LaTeX, first loading,
61 % variable is initialized, but \ProvidesPackage not yet seen
62 \else
63 \expandafter\ifx\csname PackageInfo\endcsname\relax
64 \def\x#1#2{%
65 \immediate\write-1{Package #1 Info: #2.}%
66 }%
67 \else
68 \def\x#1#2{\PackageInfo{#1}{#2, stopped}}%
69 \fi
70 \x{infwarerr}{The package is already loaded}%
71 \aftergroup\endinput
72 \fi
73 \fi
74 \endgroup%
75 \begingroup\catcode61\catcode48\catcode32=10\relax%
76 \catcode13=5 % ^^M
77 \endlinechar=13 %
78 \catcode35=6 % #
79 \catcode39=12 % '
80 \catcode40=12 % (
81 \catcode41=12 % )
82 \catcode44=12 % ,
83 \catcode45=12 % -
84 \catcode46=12 % .
85 \catcode47=12 % /
86 \catcode58=12 % :
87 \catcode64=11 % @
88 \catcode91=12 % [
89 \catcode93=12 % ]
90 \catcode123=1 % {
91 \catcode125=2 % }
92 \expandafter\ifx\csname ProvidesPackage\endcsname\relax
93 \def\x#1#2#3[#4]{\endgroup
94 \immediate\write-1{Package: #3 #4}%
95 \xdef#1{#4}%
96 }%
97 \else
98 \def\x#1#2[#3]{\endgroup
99 #2[{#3}]%
100 \ifx#1\@undefined
101 \xdef#1{#3}%
102 \fi
103 \ifx#1\relax
104 \xdef#1{#3}%
105 \fi
106 }%
107 \fi
108 \expandafter\x\csname [email protected]\endcsname
109 \ProvidesPackage{infwarerr}%
110 [2019/12/03 v1.5 Providing info/warning/error messages (HO)]%
111 \begingroup\catcode61\catcode48\catcode32=10\relax%
112 \catcode13=5 % ^^M
113 \endlinechar=13 %
114 \catcode123=1 % {
115 \catcode125=2 % }
116 \catcode64=11 % @
117 \def\x{\endgroup
118 \expandafter\edef\csname InfWarErr@AtEnd\endcsname{%
119 \endlinechar=\the\endlinechar\relax
120 \catcode13=\the\catcode13\relax
121 \catcode32=\the\catcode32\relax
122 \catcode35=\the\catcode35\relax
123 \catcode61=\the\catcode61\relax
124 \catcode64=\the\catcode64\relax
125 \catcode123=\the\catcode123\relax
126 \catcode125=\the\catcode125\relax
127 }%
128 }%
129 \x\catcode61\catcode48\catcode32=10\relax%
130 \catcode13=5 % ^^M
131 \endlinechar=13 %
132 \catcode35=6 % #
133 \catcode64=11 % @
134 \catcode123=1 % {
135 \catcode125=2 % }
136 \def\TMP@EnsureCode#1#2{%
137 \edef\InfWarErr@AtEnd{%
138 \InfWarErr@AtEnd
139 \catcode#1=\the\catcode#1\relax
140 }%
141 \catcode#1=#2\relax
142 }
143 \TMP@EnsureCode{10}{12}% ^^J
144 \TMP@EnsureCode{39}{12}% '
145 \TMP@EnsureCode{40}{12}% (
146 \TMP@EnsureCode{41}{12}% )
147 \TMP@EnsureCode{44}{12}% ,
148 \TMP@EnsureCode{45}{12}% -
149 \TMP@EnsureCode{46}{12}% .
150 \TMP@EnsureCode{58}{12}% :
151 \TMP@EnsureCode{60}{12}% <
152 \TMP@EnsureCode{62}{12}% >
153 \TMP@EnsureCode{94}{7}% ^
154 \edef\InfWarErr@AtEnd{\InfWarErr@AtEnd\noexpand\endinput}
155 \begingroup
156 \let\x=Y%
157 \def\check#1{%
158 \@check{Generic}{#1}%
159 \@check{Package}{#1}%
160 \@check{Class}{#1}%
161 }%
162 \def\@check#1#2{%
163 \expandafter\ifx\csname #1#2\endcsname\relax
164 \let\x=N%
165 \fi
166 }%
167 \check{Info}%
168 \check{Warning}%
169 \check{Error}%
170 \@check{Package}{WarningNoLine}%
171 \@check{Class}{WarningNoLine}%
172 \@check{}{@ehc}%
173 \@check{}{@ehd}%
174 \expandafter\endgroup
175 \ifx\x Y%
176 \let\@PackageInfo\PackageInfo
177 \def\@PackageInfoNoLine#1#2{%
178 \PackageInfo{#1}{#2\@gobble}%
179 }%
180 \let\@ClassInfo\ClassInfo
181 \def\@ClassInfoNoLine#1#2{%
182 \ClassInfo{#1}{#2\@gobble}%
183 }%
184 \let\@PackageWarning\PackageWarning
185 \let\@PackageWarningNoLine\PackageWarningNoLine
186 \let\@ClassWarning\ClassWarning
187 \let\@ClassWarningNoLine\ClassWarningNoLine
188 \let\@PackageError\PackageError
189 \let\@ClassError\ClassError
190 \expandafter\InfWarErr@AtEnd
191 \fi%
192 \begingroup\expandafter\endgroup
193 \ifcase\expandafter\ifx\csname inputlineno\endcsname\relax
194 0 %
195 \else
196 \ifnum\inputlineno<0 %
197 0 %
198 \else
199 1 %
200 \fi
201 \fi
202 \def\InfWarErr@online{}%
203 \else
204 \def\InfWarErr@online{ on input line \the\inputlineno}%
205 \fi
206 \begingroup\expandafter\expandafter\expandafter\endgroup
207 \expandafter\ifx\csname protected\endcsname\relax
208 \def\InfWarErr@protected{}%
209 \else
210 \let\InfWarErr@protected\protected
211 \fi
212 \chardef\InfWarErr@unused=16 %
213 \def\InfWarErr@ehc{%
214 Try typing \space <return> \space to proceed.\MessageBreak
215 If that doesn't work, type \space X <return> \space to quit.%
216 }
217 \def\InfWarErr@ehd{%
218 You're in trouble here. \space\@ehc
219 }
220 \InfWarErr@protected\def\InfWarErr@GenericInfo#1#2{%
221 \begingroup
222 \let\on@line\InfWarErr@online
223 \long\def\@gobble##1{}%
224 \def\space{ }%
225 \def\@spaces{\space\space\space\space}%
226 \def\MessageBreak{^^J#1}%
227 \newlinechar=10 %
228 \escapechar=92 %
229 \immediate\write-1{#2\on@line.}%
230 \endgroup
231 }
232 \InfWarErr@protected\def\InfWarErr@GenericWarning#1#2{%
233 \begingroup
234 \let\on@line\InfWarErr@online
235 \long\def\@gobble##1{}%
236 \def\space{ }%
237 \def\@spaces{\space\space\space\space}%
238 \def\MessageBreak{^^J#1}%
239 \newlinechar=10 %
240 \escapechar=92 %
241 \immediate\write\InfWarErr@unused{^^J#2\on@line.^^J}%
242 \endgroup
243 }
244 \InfWarErr@protected\def\InfWarErr@GenericError#1#2#3#4{%
245 \begingroup
246 \immediate\write\InfWarErr@unused{}%
247 \def\space{ }%
248 \def\@spaces{\space\space\space\space}%
249 \let\@ehc\InfWarErr@ehc
250 \let\@ehd\InfWarErr@ehd
251 \let\on@line\InfWarErr@online
252 \def\MessageBreak{^^J}%
253 \newlinechar=10 %
254 \escapechar=92 %
255 \edef\InfWarErr@help{\noexpand\errhelp{#4}}%
256 \InfWarErr@help
257 \def\MessageBreak{^^J#1}%
258 \errmessage{%
259 #2.^^J^^J%
260 #3^^J%
261 Type \space H <return> \space for immediate help.^^J ...^^J%
262 }%
263 \endgroup
264 }
265 \def\@PackageInfo#1#2{%
266 \InfWarErr@GenericInfo{%
267 (#1) \@spaces\@spaces\@spaces
268 }{%
269 Package #1 Info: #2%
270 }%
271 }
272 \def\@PackageInfoNoLine#1#2{%
273 \@PackageInfo{#1}{#2\@gobble}%
274 }
275 \def\@ClassInfo#1#2{%
276 \InfWarErr@GenericInfo{%
277 (#1) \space\space\@spaces\@spaces
278 }{%
279 Class #1 Info: #2%
280 }%
281 }
282 \def\@ClassInfoNoLine#1#2{%
283 \@ClassInfo{#1}{#2\@gobble}%
284 }
285 \def\@PackageWarning#1#2{%
286 \InfWarErr@GenericWarning{%
287 (#1)\@spaces\@spaces\@spaces\@spaces
288 }{%
289 Package #1 Warning: #2%
290 }%
291 }
292 \def\@PackageWarningNoLine#1#2{%
293 \@PackageWarning{#1}{#2\@gobble}%
294 }
295 \def\@ClassWarning#1#2{%
296 \InfWarErr@GenericWarning{%
297 (#1) \space\@spaces\@spaces\@spaces
298 }{%
299 Class #1 Warning: #2%
300 }%
301 }
302 \def\@ClassWarningNoLine#1#2{%
303 \@ClassWarning{#1}{#2\@gobble}%
304 }
305 \def\@PackageError#1#2#3{%
306 \InfWarErr@GenericError{%
307 (#1)\@spaces\@spaces\@spaces\@spaces
308 }{%
309 Package #1 Error: #2%
310 }{%
311 See the #1 package documentation for explanation.%
312 }{#3}%
313 }
314 \def\@ClassError#1#2#3{%
315 \InfWarErr@GenericError{%
316 (#1) \space\@spaces\@spaces\@spaces
317 }{%
318 Class #1 Error: #2%
319 }{%
320 See the #1 class documentation for explanation.%
321 }{#3}%
322 }
323 \InfWarErr@AtEnd%
324 \endinput
325 %%
326 %% End of file `infwarerr.sty'.