Debian Codegraph @

texmf-dist/doc/latex/base/webcomp.err

raw
1 \newcommand\erratafiledate{1999/06/05}
2
3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4 % To produce a printed version of this errata file run this file through
5 % LaTeX. It will unpack a small class file (if not already present) and
6 % a configuration file with the extension .cfg. You might want to modify
7 % the setting in this configuration file to print only a partial errata
8 % suitable for your printed revision of this book, see details in the
9 % .cfg file.
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12
13 \begin{filecontents}{ttcterrata.cls}
14 %%
15 %% Copyright (C) 1997-2021 Frank Mittelbach
16 %% This class file is licenced under LPPL latest version;
17 %% see https://www.latex-project.org/lppl
18 %
19 %
20 % It sets up a few commands used to format the errata entries for books in the
21 % Addison-Wesley Series:
22 %
23 % Tools and Techniques for Computer Typesetting
24 %
25 % hence the name. However, anybody who likes to use it is free to apply it for
26 % errata files of other books.
27 %
28 % Changes:
29 %
30 % v1.0a - changed name from errata.cls to ttcterrata.cls
31 % v1.0b - added \arraybackslash
32 % v1.0c - and took it out again and used \tabularnewline instead
33
34 \ProvidesClass{ttcterrata}
35 [2021/08/03 v1.0c Mini class for errata files; subject to change (FMi)]
36
37 \LoadClass{article}
38
39 \setcounter{secnumdepth}{-1}
40 \addtolength\textwidth{5cm}
41 \addtolength\oddsidemargin{-3cm}
42
43 \addtolength\textheight{36pt}
44
45 \RequirePackage{shortvrb}
46 \MakeShortVerb{\|}
47
48 \RequirePackage{array,longtable}
49 \RequirePackage{multicol}
50
51
52 \newcommand\erratagetnumber{}
53 \def\erratagetnumber#1/#2/#3\erratagetnumber{#1#2#3}
54
55
56 \newcommand\gobbleerrata{%
57 \setbox\@tempboxa\vbox\bgroup
58 \let\endgobble\egroup
59 \let\hideamp\relax
60 \let\\\relax
61 \let\tabularnewline\relax
62 \let\par\@@par}
63
64 \newcommand*\hideamp{&}
65
66 \let\endgobble\relax
67
68
69 \newcommand\erratastartdate{}
70 \newcommand\myprinting{1}
71
72
73 \newcommand\doweprint[2]{%
74 \ifnum \myprinting < \if!#2!1000 \else \ifx s#2 1000\else#2 \fi\fi
75 \ifnum \expandafter\erratagetnumber\erratastartdate\erratagetnumber <
76 \erratagetnumber#1\erratagetnumber \relax
77 \@tempswatrue
78 \else
79 \@tempswafalse
80 \fi
81 \else
82 \@tempswafalse
83 \fi
84 }
85
86
87
88 \newcommand\includedentries{entries after = \erratastartdate}
89 \newcommand\printedentries{between \erratastartdate\space and}
90
91 \newcommand\showallerrors{%
92 \renewcommand\includedentries{all errata entries}%
93 \renewcommand\printedentries{up to}
94 \renewcommand\doweprint[2]{\@tempswatrue}}
95
96
97 \newcommand\displayrevisionfix[2]{%
98 \if!#2!\textbf{#1}\else\textit{#1}\rlap{\textsuperscript{#2}}\fi}
99
100 \newcommand\norevisionnumbers{%
101 \renewcommand\displayrevisionfix[2]{\textbf{##1}}}
102
103 \IfFileExists{\jobname.cfg}
104 {
105 \input{\jobname.cfg}
106 \typeout{***************************************************}
107 \typeout{*}
108 \typeout{* Configuration file for \jobname.err found }
109 \typeout{*}
110 \typeout{***************************************************}
111 \AtEndDocument{
112 \typeout{***************************************************}
113 \typeout{*}
114 \typeout{* If you wish to generate an errata listing}
115 \typeout{* containing only errors found after a certain revision}
116 \typeout{* and/or only errors found after a certain date}
117 \typeout{* modify the information stored in \jobname.cfg}
118 \typeout{*}
119 \typeout{* Current settings are:}
120 \typeout{*}
121 \typeout{* \@spaces printing of your book = \myprinting}
122 \typeout{* \@spaces include \includedentries}
123 \typeout{*}
124 \typeout{***************************************************}
125 }}
126 {}
127
128 %% \erroronpage <page> <line info> <contributor> <date> <fixed in revision>
129
130 \newcommand\erroronpage[5]{%
131 \endgobble
132 \doweprint{#4}{#5}%
133 \if@tempswa
134 \typeout{Typesetting entry #1 #2 #3 #4}%
135 \else
136 \typeout{Ignoring entry #1 #2 #3 #4}%
137 \expandafter\gobbleerrata
138 \fi
139 \hideamp \tabularnewline
140 \displayrevisionfix{#1}{#5}
141 \hideamp #2 \hideamp (\textsf{#3}) \hideamp
142 }
143
144 \newcommand\seriouserroronpage[5]{%
145 \endgobble
146 \doweprint{#4}{#5}%
147 \if@tempswa
148 \typeout{Typesetting entry #1 #2 #3 #4}%
149 \else
150 \typeout{Ignoring entry #1 #2 #3 #4}%
151 \expandafter\gobbleerrata
152 \fi
153 \hideamp \tabularnewline
154 \fbox{\bfseries !!}\hfill
155 \displayrevisionfix{#1}{#5}
156 \hideamp #2 \hideamp (\textsf{#3}) \hideamp
157 }
158
159 \newcommand\CHAPTER[1]{\endgobble
160 &\tabularnewline[4pt]%
161 \multicolumn{4}{l}{\framebox[10cm][l]{\textbf{\normalsize\strut#1}}} \tabularnewline}
162
163 \newenvironment{erratalist}
164 {\begin{longtable}{r>{\raggedright}p{2cm}l>{\raggedright}p{10cm}l}}
165 {\endgobble\end{longtable}}
166
167 \newcommand\erratatitle[2]
168 {\begin{center}\LARGE\bfseries
169 Errata list for #1\\[5pt](\myprinting.\ printing)\\[10pt]
170 \small Includes all entries found \printedentries\space #2\\
171 (For other periods/print runs reprocess this document
172 with different config settings)
173 \end{center}%
174 \markright{Errata for #1 (\printedentries\space #2)}%
175 \thispagestyle{plain}%
176 \vspace{20pt}}
177
178 \pagestyle{myheadings}
179
180 \AtBeginDocument{\small}
181
182 \setlength\parindent{0pt}
183 \setlength\parskip{2pt}
184
185 \newcommand\contributor[2]{\makebox[1cm][l]{\sffamily#1} #2\par}
186
187 % some special shortcuts overwriting existing commands:
188
189 \let\u\underline
190 \renewcommand\>{$\to$}
191
192 %%% some code suggested by Thorsten Hansen to count the number of
193 %%% contributions by individuals (will work only if we do not get
194 %%% too many :-)
195
196 \def\count@contributors#1/#2/#3\@nil{
197 \@ifundefined{c@#1}{\newcounter{#1}}{}\stepcounter{#1}%
198 %%% also count secondary:
199 %%% \@ifundefined{c@#2}{\newcounter{#2}}{}\stepcounter{#2}%
200 }
201
202 \renewcommand\erroronpage[5]{%
203 \count@contributors#3/secondary/\@nil
204 \endgobble
205 \doweprint{#4}{#5}%
206 \if@tempswa
207 \typeout{Typesetting entry #1 #2 #3 #4}%
208 \else
209 \typeout{Ignoring entry #1 #2 #3 #4}%
210 \expandafter\gobbleerrata
211 \fi
212 \hideamp \tabularnewline
213 \displayrevisionfix{#1}{#5}
214 \hideamp #2 \hideamp (\textsf{#3}) \hideamp
215 }
216
217 \renewcommand\seriouserroronpage[5]{%
218 \count@contributors#3/secondary/\@nil
219 \endgobble
220 \doweprint{#4}{#5}%
221 \if@tempswa
222 \typeout{Typesetting entry #1 #2 #3 #4}%
223 \else
224 \typeout{Ignoring entry #1 #2 #3 #4}%
225 \expandafter\gobbleerrata
226 \fi
227 \hideamp \tabularnewline
228 \fbox{\bfseries !!}\hfill
229 \displayrevisionfix{#1}{#5}
230 \hideamp #2 \hideamp (\textsf{#3}) \hideamp
231 }
232
233 \renewcommand\contributor[2]{\makebox[1cm][l]{%
234 \sffamily#1} #2\@ifundefined{c@#1}{}{ (\arabic{#1})}\par}
235
236 \end{filecontents}
237
238
239 \begin{filecontents}{\jobname.cfg}
240 %
241 %
242 % Configuration file for the errata listing of
243 %
244 % The LaTeX Web Companion
245 %
246 %
247 % \erratastartdate
248 %
249 % Specifies the date from which on
250 % errata entries should be listed.
251 %
252 % The format is YYYY/MM/DD.
253 %
254 % The default below ensures that all
255 % entries are typeset.
256 %
257 \renewcommand\erratastartdate{1999/05/01}
258
259 %
260 % \myprinting
261 %
262 % Specifies which (revised) printing you
263 % own. For example, if you have the second
264 % printing set this to 2 so that errors
265 % already corrected in that printing will not
266 % appear in your errata listing.
267 %
268 % The default below ensures that all
269 % entries are typeset.
270 %
271 \renewcommand\myprinting{1}
272 %
273 %
274 % \norevisionnumbers
275 %
276 % Specifies that all page numbers in the errata are shown in the same
277 % format (bold face) irregardless of whether or not they are fixed
278 % in some revision. The default is to print corrected errors in
279 % italic and add the revision number as a superscript.
280 %
281 %
282 % \showallerrors
283 %
284 % With this command you tell the program that all errata entries are
285 % supposed to be generated. This makes \myprinting and
286 % \erratastartdate basically obsolete so this isn't turned on by
287 % default.
288 %
289 %
290 \endinput
291 \end{filecontents}
292
293
294
295 \documentclass{ttcterrata}
296
297
298 \begin{document}
299
300 \erratatitle{The \LaTeX{} Web Companion}{\erratafiledate}
301
302
303 \begin{verbatim}
304 @book(A-W:GR99,
305 author = {Michel Goossens and Sebastian Rahtz},
306 title = {The {\LaTeX} Web Companion},
307 substitle = {Integrating {\TeX}, HTML, and XML},
308 series = "Tools and Techniques for Computer Typesetting",
309 publisher = {Addison-Wesley},
310 address = {Reading, Massachusetts},
311 year = 1999,
312 ISBN = "0-201-43311-7",
313 LCCN = "QA76.76.H94G66 1999",
314 pagenums = {xxii + 522},
315 source-infos = {yes},
316 bibliography = {yes},
317 index = {yes},
318 price = "US\$39.95",
319 note = "With Eitan M. Gurari and Ross Moore and Robert S.
320 Sutor.",
321 )
322 \end{verbatim}
323
324 \begin{list}{}{\setlength\leftmargin{0cm}\setlength\rightmargin{5cm}}
325 \item[]
326 The latest version of this file (\texttt{\jobname.err}) can be found
327 as part of the \LaTeX{} distribution.
328
329 The first column in the table shows the page number of the errata
330 entry. Superscript numbers in the first column refer to the printed
331 revision in which this entry was corrected. The second column gives
332 the precise location, negative line numbers are counted from the
333 bottom of the page. The third column shows the first finder of the
334 problem.
335
336 \end{list}
337
338
339 \begin{erratalist}
340
341 %=======================================================================
342 \CHAPTER{Chapter 6}
343
344 \erroronpage{247}{3 para l.5}{MGo}{1999/06/05}{}
345 GenCod \> GenCode
346
347 \CHAPTER{Appendix B}
348
349 \erroronpage{418}{3 para}{MGo}{1999/06/05}{}
350 The \texttt{book} element types (lines 10--\u{15})
351
352 \end{erratalist}
353
354
355
356 %==========================================================================
357
358 \bigskip
359
360
361 \begin{multicols}{3}[Thanks to all who have found errors or
362 omissions. Listed are the people who found an errata entry first.]
363 \contributor{MGo}{Michel Goossens}
364 \end{multicols}
365
366
367 If you find further errors please report them to one of the authors
368 \begin{quote}\ttfamily
369 [email protected]\\
370 [email protected]
371 \end{quote}
372 preferable in a form usable for this file, i.e.,
373 \begin{flushleft}
374 |\erroronpage{|\textit{page-number}|}{|\textit{line-identification}|}{|%
375 \textit{your-initials}|}{|\textit{date}|}{}| \\
376 \hspace*{2em}\textit{description of the errata}
377 \end{flushleft}
378 Here is an example:
379 \begin{verbatim}
380 \erroronpage{4}{l.-7}{PMcJ}{1998/06/11}{}
381 surprisingly \> surprising
382 \end{verbatim}
383
384
385 \end{document}