1 \newcommand\erratafiledate{1999/06/05}
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
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13 \begin{filecontents}{ttcterrata.cls}
15 %% Copyright (C) 1997,2004,2005,2007 Frank Mittelbach
16 %% This class file is licenced under LPPL latest version;
17 %% see http://www.latex-project.org/lppl
20 % It sets up a few commands used to format the errata entries for books in the
21 % Addison-Wesley Series:
23 % Tools and Techniques for Computer Typesetting
25 % hence the name. However, anybody who likes to use it is free to apply it for
26 % errata files of other books.
30 % v1.0a - changed name from errata.cls to ttcterrata.cls
32 \ProvidesClass{ttcterrata}
33 [2007/11/10 v1.0a Mini class for errata files; subject to change (FMi)]
37 \setcounter{secnumdepth}{-1}
38 \addtolength\textwidth{5cm}
39 \addtolength\oddsidemargin{-3cm}
41 \addtolength\textheight{36pt}
43 \RequirePackage{shortvrb}
46 \RequirePackage{array,longtable}
47 \RequirePackage{multicol}
50 \newcommand\erratagetnumber{}
51 \def\erratagetnumber#1/#2/#3\erratagetnumber{#1#2#3}
54 \newcommand\gobbleerrata{%
55 \setbox\@tempboxa\vbox\bgroup
58 \let\\\relax\let\par\@@par}
60 \newcommand*\hideamp{&}
65 \newcommand\erratastartdate{}
66 \newcommand\myprinting{1}
69 \newcommand\doweprint[2]{%
70 \ifnum \myprinting < \if!#2!1000 \else \ifx s#2 1000\else#2 \fi\fi
71 \ifnum \expandafter\erratagetnumber\erratastartdate\erratagetnumber <
72 \erratagetnumber#1\erratagetnumber \relax
84 \newcommand\includedentries{entries after = \erratastartdate}
85 \newcommand\printedentries{between \erratastartdate\space and}
87 \newcommand\showallerrors{%
88 \renewcommand\includedentries{all errata entries}%
89 \renewcommand\printedentries{up to}
90 \renewcommand\doweprint[2]{\@tempswatrue}}
93 \newcommand\displayrevisionfix[2]{%
94 \if!#2!\textbf{#1}\else\textit{#1}\rlap{\textsuperscript{#2}}\fi}
96 \newcommand\norevisionnumbers{%
97 \renewcommand\displayrevisionfix[2]{\textbf{##1}}}
99 \IfFileExists{\jobname.cfg}
102 \typeout{***************************************************}
104 \typeout{* Configuration file for \jobname.err found }
106 \typeout{***************************************************}
108 \typeout{***************************************************}
110 \typeout{* If you wish to generate an errata listing}
111 \typeout{* containing only errors found after a certain revision}
112 \typeout{* and/or only errors found after a certain date}
113 \typeout{* modify the information stored in \jobname.cfg}
115 \typeout{* Current settings are:}
117 \typeout{* \@spaces printing of your book = \myprinting}
118 \typeout{* \@spaces include \includedentries}
120 \typeout{***************************************************}
124 %% \erroronpage <page> <line info> <contributor> <date> <fixed in revision>
126 \newcommand\erroronpage[5]{%
130 \typeout{Typesetting entry #1 #2 #3 #4}%
132 \typeout{Ignoring entry #1 #2 #3 #4}%
133 \expandafter\gobbleerrata
136 \displayrevisionfix{#1}{#5}
137 \hideamp #2 \hideamp (\textsf{#3}) \hideamp
140 \newcommand\seriouserroronpage[5]{%
144 \typeout{Typesetting entry #1 #2 #3 #4}%
146 \typeout{Ignoring entry #1 #2 #3 #4}%
147 \expandafter\gobbleerrata
150 \fbox{\bfseries !!}\hfill
151 \displayrevisionfix{#1}{#5}
152 \hideamp #2 \hideamp (\textsf{#3}) \hideamp
155 \newcommand\CHAPTER[1]{\endgobble
157 \multicolumn{4}{l}{\framebox[10cm][l]{\textbf{\normalsize\strut#1}}} \\}
159 \newenvironment{erratalist}
160 {\begin{longtable}{r>{\raggedright}p{2cm}l>{\raggedright}p{10cm}l}}
161 {\endgobble\end{longtable}}
163 \newcommand\erratatitle[2]
164 {\begin{center}\LARGE\bfseries
165 Errata list for #1\\[5pt](\myprinting.\ printing)\\[10pt]
166 \small Includes all entries found \printedentries\space #2\\
167 (For other periods/print runs reprocess this document
168 with different config settings)
170 \markright{Errata for #1 (\printedentries\space #2)}%
171 \thispagestyle{plain}%
174 \pagestyle{myheadings}
176 \AtBeginDocument{\small}
178 \setlength\parindent{0pt}
179 \setlength\parskip{2pt}
181 \newcommand\contributor[2]{\makebox[1cm][l]{\sffamily#1} #2\par}
183 % some special shortcuts overwriting existing commands:
186 \renewcommand\>{$\to$}
188 %%% some code suggested by Thorsten Hansen to count the number of
189 %%% contributions by individuals (will work only if we do not get
192 \def\count@contributors#1/#2/#3\@nil{
193 \@ifundefined{c@#1}{\newcounter{#1}}{}\stepcounter{#1}%
194 %%% also count secondary:
195 %%% \@ifundefined{c@#2}{\newcounter{#2}}{}\stepcounter{#2}%
198 \renewcommand\erroronpage[5]{%
199 \count@contributors#3/secondary/\@nil
203 \typeout{Typesetting entry #1 #2 #3 #4}%
205 \typeout{Ignoring entry #1 #2 #3 #4}%
206 \expandafter\gobbleerrata
209 \displayrevisionfix{#1}{#5}
210 \hideamp #2 \hideamp (\textsf{#3}) \hideamp
213 \renewcommand\seriouserroronpage[5]{%
214 \count@contributors#3/secondary/\@nil
218 \typeout{Typesetting entry #1 #2 #3 #4}%
220 \typeout{Ignoring entry #1 #2 #3 #4}%
221 \expandafter\gobbleerrata
224 \fbox{\bfseries !!}\hfill
225 \displayrevisionfix{#1}{#5}
226 \hideamp #2 \hideamp (\textsf{#3}) \hideamp
229 \renewcommand\contributor[2]{\makebox[1cm][l]{%
230 \sffamily#1} #2\@ifundefined{c@#1}{}{ (\arabic{#1})}\par}
235 \begin{filecontents}{\jobname.cfg}
238 % Configuration file for the errata listing of
240 % The LaTeX Web Companion
245 % Specifies the date from which on
246 % errata entries should be listed.
248 % The format is YYYY/MM/DD.
250 % The default below ensures that all
251 % entries are typeset.
253 \renewcommand\erratastartdate{1999/05/01}
258 % Specifies which (revised) printing you
259 % own. For example, if you have the second
260 % printing set this to 2 so that errors
261 % already corrected in that printing will not
262 % appear in your errata listing.
264 % The default below ensures that all
265 % entries are typeset.
267 \renewcommand\myprinting{1}
272 % Specifies that all page numbers in the errata are shown in the same
273 % format (bold face) irregardless of whether or not they are fixed
274 % in some revision. The default is to print corrected errors in
275 % italic and add the revision number as a superscript.
280 % With this command you tell the program that all errata entries are
281 % supposed to be generated. This makes \myprinting and
282 % \erratastartdate basically obsolete so this isn't turned on by
291 \documentclass{ttcterrata}
296 \erratatitle{The \LaTeX{} Web Companion}{\erratafiledate}
301 author = {Michel Goossens and Sebastian Rahtz},
302 title = {The {\LaTeX} Web Companion},
303 substitle = {Integrating {\TeX}, HTML, and XML},
304 series = "Tools and Techniques for Computer Typesetting",
305 publisher = {Addison-Wesley},
306 address = {Reading, Massachusetts},
308 ISBN = "0-201-43311-7",
309 LCCN = "QA76.76.H94G66 1999",
310 pagenums = {xxii + 522},
311 source-infos = {yes},
312 bibliography = {yes},
315 note = "With Eitan M. Gurari and Ross Moore and Robert S.
320 \begin{list}{}{\setlength\leftmargin{0cm}\setlength\rightmargin{5cm}}
322 The latest version of this file (\texttt{\jobname.err}) can be found
323 as part of the \LaTeX{} distribution.
325 The first column in the table shows the page number of the errata
326 entry. Superscript numbers in the first column refer to the printed
327 revision in which this entry was corrected. The second column gives
328 the precise location, negative line numbers are counted from the
329 bottom of the page. The third column shows the first finder of the
337 %=======================================================================
340 \erroronpage{247}{3 para l.5}{MGo}{1999/06/05}{}
345 \erroronpage{418}{3 para}{MGo}{1999/06/05}{}
346 The \texttt{book} element types (lines 10--\u{15})
352 %==========================================================================
357 \begin{multicols}{3}[Thanks to all who have found errors or
358 omissions. Listed are the people who found an errata entry first.]
359 \contributor{MGo}{Michel Goossens}
363 If you find further errors please report them to one of the authors
364 \begin{quote}\ttfamily
365 sebastian.rahtz@oucs.ox.ac.uk\\
368 preferable in a form usable for this file, i.e.,
370 |\erroronpage{|\textit{page-number}|}{|\textit{line-identification}|}{|%
371 \textit{your-initials}|}{|\textit{date}|}{}| \\
372 \hspace*{2em}\textit{description of the the errata}
376 \erroronpage{4}{l.-7}{PMcJ}{1998/06/11}{}
377 surprisingly \> surprising