% /u/sy/beebe/tex/errata/sp-errat.sty, Mon Feb 1 12:55:41 1993 % Edit by Nelson H. F. Beebe %%% ==================================================================== %%% @LaTeX-style-file{ %%% author = "Nelson H. F. Beebe", %%% version = "1.02", %%% date = "01 February 1993", %%% time = "12:57:00 MST", %%% filename = "sp-errat.sty", %%% address = "Center for Scientific Computing %%% Department of Mathematics %%% South Physics Building %%% University of Utah %%% Salt Lake City, UT 84112 %%% USA %%% Tel: (801) 581-5254 %%% FAX: (801) 581-4148", %%% checksum = "23136 158 689 6626", %%% email = "beebe@magna.math.utah.edu (Internet)", %%% codetable = "ISO/ASCII", %%% keywords = "erratum, LaTeX style", %%% supported = "yes", %%% docstring = "This style file provides macros for the %%% convenient production of errata listings. %%% %%% An errata list takes the form %%% %%% \begin{errata} %%% \erritem{p. n, l. m} %%% \erratum{old text}{new text} %%% Discussion. %%% \erritem{p. n, l. m} %%% \erratum{old text}{new text} %%% Discussion. %%% ... %%% \end{errata} %%% %%% The \erritem{} macro is mandatory for each %%% erratum entry. It produces a column-wide %%% horizontal rule before each item, and %%% ensures that its argument (the item tag) %%% sits alone on a separate line. %%% %%% The \erratum{}{} macro need only be used %%% when a correction is made. It can be %%% preceded, or followed, by discussion. It %%% puts its arguments in two column-wide %%% framed boxes, separated by the phrase %%% ``debe escribirse'', Spanish for ``should be''. %%% %%% The checksum field above contains a CRC-16 %%% checksum as the first value, followed by the %%% equivalent of the standard UNIX wc (word %%% count) utility output of lines, words, and %%% characters. This is produced by Robert %%% Solovay's checksum utility.", %%% } %%% ==================================================================== %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Revision history (reverse time order): % % 1.02 [01-Feb-1993] % Make Spanish version by simple modification of % erratum.sty. % 1.01 [13-Mar-1992] % Revise to prevent page breaks after \erritem, % and regularize vertical spacing of ``should be''. % Add typeout of name and version number. % 1.00 [18-Oct-1991] % Original version \immediate\write16{This is erratum.sty, Version 1.01 <13-Dec-1992>} \if@twocolumn % Make page somewhat wider than normal, with smaller margins \addtolength{\oddsidemargin}{-30pt} \addtolength{\evensidemargin}{-30pt} \addtolength{\textwidth}{60pt} \fi % Literal backspace \newcommand{\bs}{{\tt \char`\\}} \newenvironment{errata}{\begin{trivlist}}{\end{trivlist}} % \erritem{tag} is an extended \item[tag], with a separating rule % above the tag line, and a line break before text that follows % \erritem{tag}. It can be used in any LaTeX list environment. \def\erritem#1{% \vskip-\lastskip % remove any pending glue for consistent spacing \vspace{\itemsep} % want spacing before horizontal rule { \samepage % keep this group on same page \hbox to \columnwidth{\dotfill}% column-wide separator dots \labelsep=0pt % make item tag line up with left margin; % setting it to #pt moves it left by #pt \item[{\bf #1}] % standard item tag \leavevmode \nopagebreak \medskip \nopagebreak % prevent page break after item tag \par \nopagebreak } } % \erratum{erroneous text}{corrected text} displays two column-wide % paragraph boxes containing the arguments, separating them by the % string ``should be'', then starts a new paragraph. This makes text % changes much more obvious, and distinct from commentary text that % might not flag an erratum, but merely suggest improvements in the % text. \newlength{\parboxwidth} % temporary variable for \erratum \newcommand{\erratum}[2]{ %\erratum{erroneous text}{corrected text} { %group here so \hbadness is locally reset \parboxwidth=\linewidth % compute available width for parboxes \advance\parboxwidth by -2\fboxsep %make outer box width == parboxwidth \advance\parboxwidth by -2\fboxrule \hbadness=10000 % suppress underfull box message in fboxes \smallskip \nopagebreak \noindent \fbox{\parbox{\parboxwidth}{#1}} % here is the old text \par \smallskip \noindent debe escribirse % Spanish for ``should be'' \par \smallskip \noindent \fbox{\parbox{\parboxwidth}{#2}} % and here is the new text \vspace{1pt plus 1pt minus 1pt} % \smallskip is a bit too big here \par } } % LaTeX's default tolerance of 10000 in sloppy and sloppypar % is unsatisfactory in two-column mode; \emergencystretch % saves the day \renewcommand{\sloppy}{\ifx\emergencystretch\undefined \else \emergencystretch=10pt% \fi \tolerance 9000% \hbadness 10000% don't warn about underfull boxes \hfuzz .5pt% \vfuzz .5pt% } % Change sloppypar to eliminate the initial \par, which gives extra % vertical space that we don't want here. \renewenvironment{sloppypar}{\bgroup\sloppy}{\egroup} \endinput %%%%%%%%%%%%%%%%%%%%%%%%%%[End of erratum.sty]%%%%%%%%%%%%%%%%%%%%%%%%%%