From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- info/digests/tex-implementors/022 | 3110 ++++++++ info/digests/tex-implementors/023 | 1229 +++ info/digests/tex-implementors/024 | 1054 +++ info/digests/tex-implementors/025 | 730 ++ info/digests/tex-implementors/026 | 217 + info/digests/tex-implementors/027 | 229 + info/digests/tex-implementors/028 | 705 ++ info/digests/tex-implementors/029 | 460 ++ info/digests/tex-implementors/030 | 853 ++ info/digests/tex-implementors/031 | 76 + info/digests/tex-implementors/032 | 659 ++ info/digests/tex-implementors/033 | 499 ++ info/digests/tex-implementors/034 | 508 ++ info/digests/tex-implementors/035 | 384 + info/digests/tex-implementors/036 | 540 ++ info/digests/tex-implementors/037 | 716 ++ info/digests/tex-implementors/038 | 712 ++ info/digests/tex-implementors/039 | 684 ++ info/digests/tex-implementors/040 | 661 ++ info/digests/tex-implementors/041 | 179 + info/digests/tex-implementors/042 | 1971 +++++ info/digests/tex-implementors/cm85.bug | 1116 +++ .../tex-implementors/labrea-rt.900924-1200z | 4021 ++++++++++ info/digests/tex-implementors/labrea.900123-1045z | 2175 ++++++ info/digests/tex-implementors/labrea.900220-1300z | 2175 ++++++ info/digests/tex-implementors/labrea.900924-1200z | 4021 ++++++++++ info/digests/tex-implementors/latex.bug | 866 +++ info/digests/tex-implementors/message.00 | 61 + info/digests/tex-implementors/message.01 | 201 + info/digests/tex-implementors/message.02 | 156 + info/digests/tex-implementors/message.03 | 224 + info/digests/tex-implementors/message.04 | 507 ++ info/digests/tex-implementors/message.05 | 441 ++ info/digests/tex-implementors/message.06 | 230 + info/digests/tex-implementors/message.07 | 201 + info/digests/tex-implementors/message.08 | 280 + info/digests/tex-implementors/message.09 | 561 ++ info/digests/tex-implementors/message.10 | 74 + info/digests/tex-implementors/message.11 | 1052 +++ info/digests/tex-implementors/message.12 | 333 + info/digests/tex-implementors/message.13 | 205 + info/digests/tex-implementors/message.14 | 281 + info/digests/tex-implementors/message.15 | 414 + info/digests/tex-implementors/message.16 | 574 ++ info/digests/tex-implementors/message.17 | 490 ++ info/digests/tex-implementors/message.18 | 268 + info/digests/tex-implementors/message.19 | 628 ++ info/digests/tex-implementors/mf.dif | 285 + info/digests/tex-implementors/mf84.bug | 1880 +++++ info/digests/tex-implementors/tex.dif | 801 ++ info/digests/tex-implementors/tex82.bug | 8180 ++++++++++++++++++++ info/digests/tex-implementors/tex_2_7_2_9.dif | 43 + info/digests/tex-implementors/texmfwebplain.update | 316 + 53 files changed, 49236 insertions(+) create mode 100644 info/digests/tex-implementors/022 create mode 100644 info/digests/tex-implementors/023 create mode 100644 info/digests/tex-implementors/024 create mode 100644 info/digests/tex-implementors/025 create mode 100644 info/digests/tex-implementors/026 create mode 100644 info/digests/tex-implementors/027 create mode 100644 info/digests/tex-implementors/028 create mode 100644 info/digests/tex-implementors/029 create mode 100644 info/digests/tex-implementors/030 create mode 100644 info/digests/tex-implementors/031 create mode 100644 info/digests/tex-implementors/032 create mode 100644 info/digests/tex-implementors/033 create mode 100644 info/digests/tex-implementors/034 create mode 100644 info/digests/tex-implementors/035 create mode 100644 info/digests/tex-implementors/036 create mode 100644 info/digests/tex-implementors/037 create mode 100644 info/digests/tex-implementors/038 create mode 100644 info/digests/tex-implementors/039 create mode 100644 info/digests/tex-implementors/040 create mode 100644 info/digests/tex-implementors/041 create mode 100644 info/digests/tex-implementors/042 create mode 100644 info/digests/tex-implementors/cm85.bug create mode 100644 info/digests/tex-implementors/labrea-rt.900924-1200z create mode 100644 info/digests/tex-implementors/labrea.900123-1045z create mode 100644 info/digests/tex-implementors/labrea.900220-1300z create mode 100644 info/digests/tex-implementors/labrea.900924-1200z create mode 100644 info/digests/tex-implementors/latex.bug create mode 100644 info/digests/tex-implementors/message.00 create mode 100644 info/digests/tex-implementors/message.01 create mode 100644 info/digests/tex-implementors/message.02 create mode 100644 info/digests/tex-implementors/message.03 create mode 100644 info/digests/tex-implementors/message.04 create mode 100644 info/digests/tex-implementors/message.05 create mode 100644 info/digests/tex-implementors/message.06 create mode 100644 info/digests/tex-implementors/message.07 create mode 100644 info/digests/tex-implementors/message.08 create mode 100644 info/digests/tex-implementors/message.09 create mode 100644 info/digests/tex-implementors/message.10 create mode 100644 info/digests/tex-implementors/message.11 create mode 100644 info/digests/tex-implementors/message.12 create mode 100644 info/digests/tex-implementors/message.13 create mode 100644 info/digests/tex-implementors/message.14 create mode 100644 info/digests/tex-implementors/message.15 create mode 100644 info/digests/tex-implementors/message.16 create mode 100644 info/digests/tex-implementors/message.17 create mode 100644 info/digests/tex-implementors/message.18 create mode 100644 info/digests/tex-implementors/message.19 create mode 100644 info/digests/tex-implementors/mf.dif create mode 100644 info/digests/tex-implementors/mf84.bug create mode 100644 info/digests/tex-implementors/tex.dif create mode 100644 info/digests/tex-implementors/tex82.bug create mode 100644 info/digests/tex-implementors/tex_2_7_2_9.dif create mode 100644 info/digests/tex-implementors/texmfwebplain.update (limited to 'info/digests/tex-implementors') diff --git a/info/digests/tex-implementors/022 b/info/digests/tex-implementors/022 new file mode 100644 index 0000000000..5840761828 --- /dev/null +++ b/info/digests/tex-implementors/022 @@ -0,0 +1,3110 @@ +Date: 8 Jan 90 Message No: 022 +Resent: 11 Jan 90 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: Updates: files at labrea, TEX82.BUG, Knuth off-line + + +[ The initial mailing of this message and the TEX82.BUG file, in three + parts, caused our mailer to suffer a serious breakdown; not only were + my messages not delivered, but the entire mail server crashed, putting + the whole Society out of the mail business for two days. In order to + recover in the most painless manner possible, I have made the recommended + changes in the mailing list, and am re-sending the whole lot. Please + accept my apologies if you get two copies of anything. The only change + to any of them is the addition of the Resent: date at the top of this + message, and this paragraph. ] + +Preparing this installment has taken rather longer than I intended, +delayed by standards meetings, the holidays, and writing the user +documentation for the impending release of version 2.0 of both AMS-TeX +and the AMSFonts collection. It is my understanding that the AMS +management wishes these two packages to have the widest distribution +possible, so an announcement should be forthcoming to make them both +available to TeX distributors and archives for inclusion in their +offerings. (The AMSFonts package will not include the .mf sources; +those will be available only by individual request, and there wil be +some restrictions. If you are interesed in the .mf sources, write to +Regina Girouard, rmg@math.ams.com; she is Manager of the AMS Composition +Services Department, in charge of the font distribution.) Stay tuned. + +There have been no updates to the TeX "core" at labrea.stanford.edu +since November. On the assumption that TUGboat 10 #4 (the Proceedings +of this summer's tenth anniversary meeting) would be out and in your +hands by now, I had not sent out the updates to the TEX82.BUG file, +since it is very large, and all entries since the beginning of 1989 +are printed in their entirety in a supplement accompanying that issue. +However, since there have been a number of delays in its production (it +was sent to the printer the first week of November), and the projected +mailing date now isn't until late January, I am sending under separate +cover, in two pieces, the additions that haven't been sent out before +in this form, items 355-370. (They "duplicate" the code in the TEX.WEB +differences file that was sent early in November, as a supplement to +message 20.) Since preparing the camera copy for the TUGboat supplement, +two additional bug listings, 371 and 372, have come to my attention. +371 is in response to a bug found by Wayne Sullivan, and Knuth distributed +372 in TeXhax 89 #110. Both are reproduced below. The TEX.WEB file +incorporating them has not yet appeared at labrea, as mentioned earlier. +This is the commentary that came with 371 (dated 24 Nov 89); it sounds +like caution is in order when applying it: + + Here's how I plan to fix the problem. The code isn't tested yet --- I'll + wait a couple weeks to see if I can combine it with some other work --- + but I think it catches all cases where scanning can interfere with + the save_stack protocols. It preserves the locality of csnaming, and + makes things like \discretionary consistent with \insert in this respect. + +And here is the text that accompanied #372; again, caution: + + I just received a message from Rainer Sch\"opf and Frank Mittelbach + in Gutenberg's city (Mainz) that they've done it again, found another + subtle bug. This one is especially unique because it will not be + detected in the TRIP test; it only occurs in the system-dependent code + that figures out the "area" and "extension" part of a file name. + + As far as I know, the error occurs only when you try to combine + \csname somehow with file name specification; for example, + \input area:file.ext\csname xyz\endcsname + will fail on many systems. (Reason: TeX may have to store the + control sequence name xyz, while it's looking for the token following + "ext". This moves things in the string pool; but the present TeX doesn't + move the area and extension pointers, so they might point to garbage.) + + This bug will be corrected in version 2.993, but I decided to use + TeXhax to let installers get a head start, since this bug affects + nearly everybody's system-dependent code! The changes are simple--- + so simple I haven't even felt the need to test them yet---but they + should be made, and you can get a head start by putting them into + your change files before you get a new TEX.WEB file. + + Here are the changes I'll be making to TEX.WEB (unless there's + an error here, which cannot be:) + +Brian Hamilton Kelly pointed out that identifiers in TEX.WEB containing +a cap "E" (in his case, from local changes to support editors) get the +"E" lowered as it is in TeX, and suggested that perhaps this should be +fixed directly in the .WEB file. We'd made a local change for that here +at AMS some years ago, so I forwarded the code to Brian. I also sent +it to Don Knuth, who replied that he didn't think it appropriate in the +canonical TEX.WEB, but suggested that I forward the code to this list. +The solution isn't perfect -- it only suppresses the problem if the "E" +doesn't precede an "X" -- but it's a start. If anyone has a better +solution, please send it to me and i'll distribute it to the list. +The code is given below. + +Peter Breitenlohner has provided a list of modules in MF.WEB 1.8 that +have changed, as compared to 1.7; see below. I have not yet retrieved +the source from labrea so that a difference list can be run, but it's +on my list. + +Finally, it's now official -- Knuth has withdrawn from the electronic +networks, and will henceforth be accessible only via the postal service. +However, he has deputized me to keep an eye out for genuine bugs (as +reported through TeXhax, UKTeX, etc.) and has agreed to let his secretary +accept electronic messages from me. Mail sent to Knuth's old address at +Sail will now yield the following result: + + Subject: Failed mail returned: user not accepting mail + + The message below was not deliverable to: + + DEK@SAIL.Stanford.EDU + + DEK (Don Knuth) has decided to discontinue reading email. + Please write to him at the following address: + + Donald E. Knuth + Professor of The Art of Computer Programming + Computer Science Department + Stanford University + Stanford, CA 94305-2140 USA + +If you have a bug to report and you would like me to forward it, I will. +Alternatively, you can send your report on paper to Knuth's new address. + + +######################################################################## + +Addenda to TEX82.BUG -- items 371 and 372 + +371. Prevent save_stack conflicts, e.g. in {\hbox\expandafter{\csname + \endcsname}} (found by Sullivan). +@x module 645 +@p procedure scan_spec; {scans a box specification and left brace} +label found; +begin if scan_keyword("to") then saved(0):=exactly +@.to@> +else if scan_keyword("spread") then saved(0):=additional +@.spread@> +else begin saved(0):=additional; saved(1):=0; + goto found; + end; +scan_normal_dimen; saved(1):=cur_val; +found: save_ptr:=save_ptr+2; scan_left_brace; +@y +@p procedure scan_spec(@!c:group_code;@!three_codes:boolean); + {scans a box specification and left brace} +label found; +var @!s:integer; {temporarily saved value} +@!spec_code:exactly..additional; +begin if three_codes then s:=saved(0); +if scan_keyword("to") then spec_code:=exactly +@.to@> +else if scan_keyword("spread") then spec_code:=additional +@.spread@> +else begin spec_code:=additional; cur_val:=0; + goto found; + end; +scan_normal_dimen; +found: if three_codes then + begin saved(0):=s; incr(save_ptr); + end; +saved(0):=spec_code; saved(1):=cur_val; save_ptr:=save_ptr+2; +new_save_level(c); scan_left_brace; +@z +@x module 774 +scan_spec; new_save_level(align_group);@/ +@y +scan_spec(align_group,false);@/ +@z +@x module 1073 + if t=0 then saved(0):=cur_val@+else saved(0):=-cur_val; + scan_box; + end; +any_mode(leader_ship): begin saved(0):=leader_flag-a_leaders+cur_chr; scan_box; + end; +any_mode(make_box): begin saved(0):=0; begin_box; + end; +@y + if t=0 then scan_box(cur_val)@+else scan_box(-cur_val); + end; +any_mode(leader_ship): scan_box(leader_flag-a_leaders+cur_chr); +any_mode(make_box): begin_box(0); +@z +@x module 1075 +procedure box_end; +var p:pointer; {|ord_noad| for new box in math mode} +begin if saved(0) +else if saved(0) +else if cur_box<>null then + if saved(0)>ship_out_flag then @ +@y +procedure box_end(@!box_context:integer); +var p:pointer; {|ord_noad| for new box in math mode} +begin if box_context +else if box_context +else if cur_box<>null then + if box_context>ship_out_flag then @ +@z +@x module 1076 + begin shift_amount(cur_box):=saved(0); +@y + begin shift_amount(cur_box):=box_context; +@z +@x module 1077 +if saved(0); +if cur_cmd=make_box then begin_box +else if (saved(0)>=leader_flag)and((cur_cmd=hrule)or(cur_cmd=vrule)) then + begin cur_box:=scan_rule_spec; box_end; +@y +procedure scan_box(@!box_context:integer); + {the next input should specify a box or perhaps a rule} +begin @; +if cur_cmd=make_box then begin_box(box_context) +else if (box_context>=leader_flag)and((cur_cmd=hrule)or(cur_cmd=vrule)) then + begin cur_box:=scan_rule_spec; box_end(box_context); +@z +@x module 1086 +pop_nest; box_end; +@y +pop_nest; box_end(saved(0)); +@z +@x module 1117 +else begin incr(save_ptr); saved(-1):=0; scan_left_brace; + new_save_level(disc_group); push_nest; mode:=-hmode; space_factor:=1000; +@y +else begin incr(save_ptr); saved(-1):=0; new_save_level(disc_group); + scan_left_brace; push_nest; mode:=-hmode; space_factor:=1000; +@z +@x module 1119 +incr(saved(-1)); scan_left_brace; new_save_level(disc_group); +@y +incr(saved(-1)); new_save_level(disc_group); scan_left_brace; +@z +@x module 1167 +mmode+vcenter: begin scan_spec; new_save_level(vcenter_group); normal_paragraph; +@y +mmode+vcenter: begin scan_spec(vcenter_group,false); normal_paragraph; +@z +@x module 1172 +scan_left_brace; push_math(math_choice_group); +@y +push_math(math_choice_group); scan_left_brace; +@z +@x module 1174 +incr(saved(-1)); scan_left_brace; push_math(math_choice_group); +@y +incr(saved(-1)); push_math(math_choice_group); scan_left_brace; +@z +@x module 1241 + if global then saved(0):=box_flag+256+cur_val + else saved(0):=box_flag+cur_val; + scan_optional_equals; scan_box; +@y + if global then n:=256+cur_val@+else n:=cur_val; + scan_optional_equals; scan_box(box_flag+n); +@z + +372. Bugfix 339 didn't go far enough (found by Sch\"opf and Mittelbach). +@x module 516 [NOTE: THIS AFFECTS ALMOST ALL CHANGE FILES!] +@ And here's the second. +@^system dependencies@> + +@p function more_name(@!c:ASCII_code):boolean; +begin if c=" " then more_name:=false +else begin if (c=">")or(c=":") then + begin area_delimiter:=pool_ptr; ext_delimiter:=0; + end + else if (c=".")and(ext_delimiter=0) then ext_delimiter:=pool_ptr; + str_room(1); append_char(c); {contribute |c| to the current string} +@y +@ And here's the second. The string pool might change as the file name is +being scanned, since a new \.{\\csname} might be entered; therefore we keep +|area_delimiter| and |ext_delimiter| relative to the beginning of the current +string, instead of assigning an absolute address like |pool_ptr| to them. +@^system dependencies@> + +@p function more_name(@!c:ASCII_code):boolean; +begin if c=" " then more_name:=false +else begin str_room(1); append_char(c); {contribute |c| to the current string} + if (c=">")or(c=":") then + begin area_delimiter:=cur_length; ext_delimiter:=0; + end + else if (c=".")and(ext_delimiter=0) then ext_delimiter:=cur_length; +@z +@x module 517 [NOTE: THIS DOES TOO, AND SO DOES THE NEXT!] +else begin cur_area:=str_ptr; incr(str_ptr); + str_start[str_ptr]:=area_delimiter+1; +@y +else begin cur_area:=str_ptr; + str_start[str_ptr+1]:=str_start[str_ptr]+area_delimiter; incr(str_ptr); +@z +@x ibid +else begin cur_name:=str_ptr; incr(str_ptr); + str_start[str_ptr]:=ext_delimiter; cur_ext:=make_string; +@y +else begin cur_name:=str_ptr; + str_start[str_ptr+1]:=str_start[str_ptr]+ext_delimiter-area_delimiter-1; + incr(str_ptr); cur_ext:=make_string; +@z + + +######################################################################## + +Change to TEX.WEB (and others) to avoid dropped E in identifiers + +@x [0] (AMS) Avoid dropped E in identifiers other than TeX +\def\drop{\kern-.1667em\lower.5ex\hbox{E}\kern-.125em} % middle of TeX +\catcode`E=13 \uppercase{\def E{e}} +\def\\#1{\hbox{\let E=\drop\it#1\/\kern.05em}} % italic type for identifiers +@y +\def\drop{\kern-.1667em\lower.5ex\hbox{E}\kern-.125em} % middle of TeX +\def\cape#1{\if X#1\drop\else E\fi#1} % other E's in identifiers +\catcode`E=13 \uppercase{\def E{e}} +\def\\#1{\hbox{\let E=\cape\it#1\/\kern.05em}} % italic type for identifiers +@z + + +######################################################################## + +% List of changed modules in MF.WEB 1.8 (as compared to 1.7) +% Peter Breitenlohner + +% The [c]'s refer to the parts of the book `METAFONT: The Program' + +limbo +[1] m.2, 11, 14 +[2] m.17-19, 21-23 +[3] m.30, 34 +[4] m.37-38, 41, 45, 47-49 +[5] m.59-60, 66 +[6] m.85 +[10] m.158-159 +[12] m.186, 190, 192-193, 198-199 +[13] m.200, 210-212 +[14] m.223 +[21] m.402, 410-412, 415-417, 422, 424-425, 436 +[24] m.493 +[35] m.717 +[38] m.774-775, 784 +[41] m.883 +[42] m.912-913, 976-977 +[45] m.1093, 1096-1097, 1103-1112, 1134-1141 +[47] m.1160 +[48] m.1192-1193, 1195, 1200 +[49] m.1204-1205 + + +######################################################################## + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Character code reference +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Upper case letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ +% Lower case letters: abcdefghijklmnopqrstuvwxyz +% Digits: 0123456789 +% Square, curly, angle braces, parentheses: [] {} <> () +% Backslash, slash, vertical bar: \ / | +% Punctuation: . ? ! , : ; +% Underscore, hyphen, equals sign: _ - = +% Quotes--right left double: ' ` " +%"at", "number" "dollar", "percent", "and": @ # $ % & +% "hat", "star", "plus", "tilde": ^ * + ~ +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +[ end of message 022 ] + +355. String startup problems (Wayne Sullivan, 17 Jul 89) +@x module 31 (Warning: This affects most change files!) + overflow("buffer size",buf_size); +@:TeX capacity exceeded buffer size}{\quad buffer size@> +@y + @; +@z +@x module 35 +consist of the remainder of the command line, after the part that invoked +\TeX. +@y +consist of the remainder of the command line, after the part that invoked +\TeX. + +The first line is special also because it may be read before \TeX\ has +input a format file. In such cases, normal error messages cannot yet +be given. The following code uses concepts that will be explained later. + +@= +if format_ident=0 then + begin write_ln(term_out,'Buffer size exceeded!'); goto final_end; +@.Buffer size exceeded@> + end +else begin cur_input.loc_field:=first; cur_input.limit_field:=last-1; + overflow("buffer size",buf_size); +@:TeX capacity exceeded buffer size}{\quad buffer size@> + end +@z +@x module 1310 +k:=pool_ptr-4; undump_four_ASCII +@y +k:=pool_ptr-4; undump_four_ASCII; +init_str_ptr:=str_ptr; init_pool_ptr:=pool_ptr +@z +@x module 1332 +tini@/ +@y +init_str_ptr:=str_ptr; init_pool_ptr:=pool_ptr; fix_date_and_time; +tini@/ +@z +@x module 1332 +init_str_ptr:=str_ptr; init_pool_ptr:=pool_ptr;@/ +@y +@z + +356. Allow integer products to be 31 bits long (Mittelbach, 16 Aug 89) +@x module 105 +@p function nx_plus_y(@!n:integer;@!x,@!y:scaled):scaled; +begin if n<0 then + begin negate(x); negate(n); + end; +if n=0 then nx_plus_y:=y +else if ((x<=(@'7777777777-y) div n)and(-x<=(@'7777777777+y) div n)) then + nx_plus_y:=n*x+y +else begin arith_error:=true; nx_plus_y:=0; + end; +end; +@y +@d nx_plus_y(#)==mult_and_add(#,@'7777777777) +@d mult_integers(#)==mult_and_add(#,0,@'17777777777) + +@p function mult_and_add(@!n:integer;@!x,@!y,@!max_answer:scaled):scaled; +begin if n<0 then + begin negate(x); negate(n); + end; +if n=0 then mult_and_add:=y +else if ((x<=(max_answer-y) div n)and(-x<=(max_answer+y) div n)) then + mult_and_add:=n*x+y +else begin arith_error:=true; mult_and_add:=0; + end; +end; +@z +@x module 1240 + if q=multiply then cur_val:=nx_plus_y(eqtb[l].int,cur_val,0) +@y + if q=multiply then + if p=int_val then cur_val:=mult_integers(eqtb[l].int,cur_val) + else cur_val:=nx_plus_y(eqtb[l].int,cur_val,0) +@z + +357. Raise the maximum number of tokens normally shown (pointed out by +John Lavagnino in TeXhax on 19 May 89; corrected on 31 Aug 89). +@x module 295 +begin if p<>null then show_token_list(link(p),null,1000); +@y +begin if p<>null then show_token_list(link(p),null,10000000); +@z +@x module 1370 (this part of the change is cosmetic only) +show_token_list(link(def_ref),null,10000000); print_ln; +@y +token_show(def_ref); print_ln; +@z + +358. Like 353, but with $$\begingroup\eqno$$ (Mittelbach, 25 Jul 89) +@x module 1140 +mmode+eq_no: if privileged then start_eq_no; +@y +mmode+eq_no: if privileged then + if cur_group=math_shift_group then start_eq_no + else off_save; +@z + +359. Major extension to 8-bit character input. (These changes, and a few that +follow, were discussed during the 10th TUG meeting and installed during +the week of 10 Sep 1989. They bring the implementation of TeX82 up to date with +international developments and experience, and I believe they mark the +final development of this program into a completely stable system.) +Several changes to the documentation (not the program) are omitted here. +@x module 18 +@!ASCII_code=0..127; {seven-bit numbers} +@y +@!ASCII_code=0..255; {eight-bit numbers} +@z +@x module 19 +@d last_text_char=127 {ordinal number of the largest element of |text_char|} + +@= +@!i:0..last_text_char; +@y +@d last_text_char=255 {ordinal number of the largest element of |text_char|} + +@= +@!i:integer; +@z +@x module 21 +xchr[0]:=' '; xchr[@'177]:=' '; + {ASCII codes 0 and |@'177| do not appear in text} +@y +@z +@x module 23 +for i:=1 to @'37 do xchr[i]:=' '; +@y changing ' ' to chr(i) here will allow all 8-bit characters to get in +for i:=0 to @'37 do xchr[i]:=' '; +for i:=@'177 to @'377 do xchr[i]:=' '; +@z +@x module 24 +for i:=1 to @'176 do xord[xchr[i]]:=i; +@y +for i:=@'200 to @'377 do xord[xchr[i]]:=i; +for i:=0 to @'176 do xord[xchr[i]]:=i; +@z +@x module 38 +@= +@!pool_pointer = 0..pool_size; {for variables that point into |str_pool|} +@!str_number = 0..max_strings; {for variables that point into |str_start|} + +@ @= +@!str_pool:packed array[pool_pointer] of ASCII_code; {the characters} +@y [OK to make si(#)==#-128 and so(#)==#+128 (without parens) in change files] +Some \PASCAL\ compilers won't pack integers into a single byte unless the +integers lie in the range |-128..127|. To accommodate such systems +we access the string pool only via macros that can easily be redefined. + +@d si(#) == # {convert from |ASCII_code| to |packed_ASCII_code|} +@d so(#) == # {convert from |packed_ASCII_code| to |ASCII_code|} + +@= +@!pool_pointer = 0..pool_size; {for variables that point into |str_pool|} +@!str_number = 0..max_strings; {for variables that point into |str_start|} +@!packed_ASCII_code = 0..255; {elements of |str_pool| array} + +@ @= +@!str_pool:packed array[pool_pointer] of packed_ASCII_code; {the characters} +@z +@x module 42 +begin str_pool[pool_ptr]:=#; incr(pool_ptr); +@y +begin str_pool[pool_ptr]:=si(#); incr(pool_ptr); +@z +@x module 45 + begin if str_pool[j]<>buffer[k] then +@y + begin if so(str_pool[j])<>buffer[k] then +@z +@x module 47 +var k,@!l:0..127; {small indices or counters} +@y +var k,@!l:0..255; {small indices or counters} +@z +@x module 47 +@; +@y +@; +@z +@x module 48 +@ @= +for k:=0 to 127 do + begin if (@) then + begin append_char("^"); append_char("^"); + if k<@'100 then append_char(k+@'100) + else append_char(k-@'100); +@y +@ @d app_lc_hex(#)==l:=#; + if l<10 then append_char(l+"0)@+else append_char(l-10+"a") + +@= +for k:=0 to 255 do + begin if (@) then + begin append_char("^"); append_char("^"); + if k<@'100 then append_char(k+@'100) + else if k<@'200 then append_char(k-@'100) + else begin app_lc_hex(k div 16); app_lc_hex(k mod 16); + end; +@z +@x module 59 + begin print_char(str_pool[j]); incr(j); +@y + begin print_char(so(str_pool[j])); incr(j); +@z +@x modules 59 and 60 +else if s<128 then +@y +else if s<256 then +@z +@x module 60 + begin print(str_pool[j]); incr(j); +@y + begin print(so(str_pool[j])); incr(j); +@z +@x module 63 +if c>=0 then if c<128 then print(c); +@y +if c>=0 then if c<256 then print(c); +@z +@x module 68 +@ In certain situations, \TeX\ prints either a standard visible ASCII +character or its hexadecimal ASCII code. + +@p procedure print_ASCII(@!c:integer); {prints a character or its code} +begin if (c>=0) and (c<=127) then print(c) +else begin print_char("["); + if c<0 then print_int(c)@+else print_hex(c); + print_char("]"); + end; +end; +@y +@ Old versions of \TeX\ needed a procedure called |print_ASCII| whose function +is now subsumed by |print|. We retain the old name here as a possible aid to +future software arch\ae ologists. + +@d print_ASCII == print +@z +@x module 69 + begin print_char(str_pool[j]); n:=n-v; + end; + if n<=0 then return; {nonpositive input produces no output} + k:=j+2; u:=v div (str_pool[k-1]-"0"); + if str_pool[k-1]="2" then + begin k:=k+2; u:=u div (str_pool[k-1]-"0"); + end; + if n+u>=v then + begin print_char(str_pool[k]); n:=n+u; + end + else begin j:=j+2; v:=v div (str_pool[j-1]-"0"); +@y + begin print_char(so(str_pool[j])); n:=n-v; + end; + if n<=0 then return; {nonpositive input produces no output} + k:=j+2; u:=v div (so(str_pool[k-1])-"0"); + if str_pool[k-1]=si("2") then + begin k:=k+2; u:=u div (so(str_pool[k-1])-"0"); + end; + if n+u>=v then + begin print_char(so(str_pool[k])); n:=n+u; + end + else begin j:=j+2; v:=v div (so(str_pool[j-1])-"0"); +@z +@x module 70 + begin print_char(str_pool[j]); incr(j); +@y + begin print_char(so(str_pool[j])); incr(j); +@z +@x module 222 +@d single_base=active_base+128 {equivalents of one-letter control sequences} +@d null_cs=single_base+128 {equivalent of \.{\\csname\\endcsname}} +@y +@d single_base=active_base+256 {equivalents of one-character control sequences} +@d null_cs=single_base+256 {equivalent of \.{\\csname\\endcsname}} +@z +@x module 230 + {table of 128 command codes (the ``catcodes'')} +@d lc_code_base=cat_code_base+128 {table of 128 lowercase mappings} +@d uc_code_base=lc_code_base+128 {table of 128 uppercase mappings} +@d sf_code_base=uc_code_base+128 {table of 128 spacefactor mappings} +@d math_code_base=sf_code_base+128 {table of 128 math mode mappings} +@d int_base=math_code_base+128 {beginning of region 5} +@y + {table of 256 command codes (the ``catcodes'')} +@d lc_code_base=cat_code_base+256 {table of 256 lowercase mappings} +@d uc_code_base=lc_code_base+256 {table of 256 uppercase mappings} +@d sf_code_base=uc_code_base+256 {table of 256 spacefactor mappings} +@d math_code_base=sf_code_base+256 {table of 256 math mode mappings} +@d int_base=math_code_base+256 {beginning of region 5} +@z +@x module 232 +for k:=0 to 127 do +@y +for k:=0 to 255 do +@z +@x module 236 +@d del_code_base=count_base+256 {128 delimiter code mappings} +@d dimen_base=del_code_base+128 {beginning of region 6} +@y +@d del_code_base=count_base+256 {256 delimiter code mappings} +@d dimen_base=del_code_base+256 {beginning of region 6} +@z +@x module 240 +for k:=0 to 127 do del_code(k):=-1; +@y +for k:=0 to 255 do del_code(k):=-1; +@z +@x module 264 +begin if s<128 then cur_val:=s+single_base +@y +begin if s<256 then cur_val:=s+single_base +@z +@x ibid + for j:=0 to l-1 do buffer[j]:=str_pool[k+j]; +@y + for j:=0 to l-1 do buffer[j]:=so(str_pool[k+j]); +@z +@x module 289 +@d cs_token_flag==@'10000 {amount added to the |eqtb| location in a + token that stands for a control sequence; is a multiple of~256} +@y +@d cs_token_flag==@'7777 {amount added to the |eqtb| location in a + token that stands for a control sequence; is a multiple of~256, less~1} +@z +@x module 293 + if (info(p)<0)or(c>127) then print_esc("BAD.") +@y + if info(p)<0 then print_esc("BAD.") +@z +@x module 341 +@!cat:0..15; {|cat_code(cur_chr)|, usually} +@y +@!cat:0..15; {|cat_code(cur_chr)|, usually} +@!c,@!cc:ASCII_code; {constituents of a possible expanded code} +@!d:2..3; {number of excess characters in an expanded code} +@z +@x module 352 +@= +begin if (cur_chr=buffer[loc])and(loc="0")and(#<="9"))or((#>="a")and(#<="f"))) +@d hex_to_cur_chr== + if c<="9" then cur_chr:=c-"0" @+else cur_chr:=c-"a"+10; + if cc<="9" then cur_chr:=16*cur_chr+cc-"0" + else cur_chr:=16*cur_chr+cc-"a"+10 + +@= +begin if cur_chr=buffer[loc] then if loc2 then + begin hex_to_cur_chr; buffer[k-1]:=cur_chr; + end + else if c<@'100 then buffer[k-1]:=c+@'100 + else buffer[k-1]:=c-@'100; + limit:=limit-d; first:=first-d; + while k<=limit do + begin buffer[k]:=buffer[k+d]; incr(k); + end; + goto start_cs; + end; + end; +@z +@x module 360 +There is one more branch. +@y +There is one more branch. + +@d end_line_char_inactive == (end_line_char<0)or(end_line_char>255) +@z +@x ibid + if (end_line_char<0)or(end_line_char>127) then decr(limit) +@y + if end_line_char_inactive then decr(limit) +@z +@x modules 362 and 483 and 538 and 1337 +if (end_line_char<0)or(end_line_char>127) then decr(limit) +@y +if end_line_char_inactive then decr(limit) +@z +@x module 391 +if (info(r)>match_token+127)or(info(r)match_token+255)or(info(r)= +procedure scan_seven_bit_int; +begin scan_int; +if (cur_val<0)or(cur_val>127) then + begin print_err("Bad character code"); +@.Bad character code@> + help2("The numeric code for a character must be between 0 and 127.")@/ + ("I changed this one to zero."); int_error(cur_val); cur_val:=0; + end; +end; +@y +|scan_something_internal|. +@z (and I'll interchange modules 434 and 435) +@x module 442 +if cur_val>127 then +@y +if cur_val>255 then +@z +@x module 464 + begin t:=str_pool[k]; +@y + begin t:=so(str_pool[k]); +@z +@x module 506 (correction needed twice) +if (cur_cmd>active_char)or(cur_chr>127) then +@y +if (cur_cmd>active_char)or(cur_chr>255) then +@z +@x module 519 +for j:=str_start[a] to str_start[a+1]-1 do append_to_name(str_pool[j]); +for j:=str_start[n] to str_start[n+1]-1 do append_to_name(str_pool[j]); +for j:=str_start[e] to str_start[e+1]-1 do append_to_name(str_pool[j]); +@y +for j:=str_start[a] to str_start[a+1]-1 do append_to_name(so(str_pool[j])); +for j:=str_start[n] to str_start[n+1]-1 do append_to_name(so(str_pool[j])); +for j:=str_start[e] to str_start[e+1]-1 do append_to_name(so(str_pool[j])); +@z +@x module 526 +if (cur_cmd>active_char)or(cur_chr>127) then +@y +if (cur_cmd>active_char)or(cur_chr>255) then +@z +@x module 603 (change to be made twice) + dvi_out(str_pool[k]); +@y + dvi_out(so(str_pool[k])); +@z +@x module 617 + for s:=str_start[str_ptr] to pool_ptr-1 do dvi_out(str_pool[s]); +@y + for s:=str_start[str_ptr] to pool_ptr-1 do dvi_out(so(str_pool[s])); +@z +@x module 766 + begin case str_pool[r_type*8+t+magic_offset] of +@y + begin case so(str_pool[r_type*8+t+magic_offset]) of +@z +@x module 780 +@d span_code=128 {distinct from any character} +@d cr_code=129 {distinct from |span_code| and from any character} +@y +@d span_code=256 {distinct from any character} +@d cr_code=257 {distinct from |span_code| and from any character} +@z +@x module 815 +label done,done1,done2,done3,done4; +@y +label done,done1,done2,done3,done4,continue; +@z +@x module 896 + else if (type(s)=kern_node)and(subtype(s)=normal) then c:=128 + else if type(s)=whatsit_node then c:=128 + else goto done1; + if c<128 then if lc_code(c)<>0 then + if (lc_code(c)=c)or(uc_hyph>0) then goto done2 + else goto done1; + s:=link(s); +@y + else if (type(s)=kern_node)and(subtype(s)=normal) then goto continue + else if type(s)=whatsit_node then goto continue + else goto done1; + if lc_code(c)<>0 then + if (lc_code(c)=c)or(uc_hyph>0) then goto done2 + else goto done1; +continue: s:=link(s); +@z +@x module 897 + if c>=128 then goto done3; + if (lc_code(c)=0)or(hn=63) then goto done3; + hb:=s; incr(hn); hu[hn]:=c; hc[hn]:=lc_code(c)-1; +@y + if lc_code(c)=0 then goto done3; + if hn=63 then goto done3; + hb:=s; incr(hn); hu[hn]:=c; hc[hn]:=lc_code(c); +@z +@x module 898 +if c>=128 then goto done3; +if (lc_code(c)=0)or(j=63) then goto done3; +incr(j); hu[j]:=c; hc[j]:=lc_code(c)-1;@/ +@y +if lc_code(c)=0 then goto done3; +if j=63 then goto done3; +incr(j); hu[j]:=c; hc[j]:=lc_code(c);@/ +@z +@x module 923 +hc[0]:=127; hc[hn+1]:=127; hc[hn+2]:=128; {insert delimiters} +@y +hc[0]:=0; hc[hn+1]:=0; hc[hn+2]:=256; {insert delimiters} +@z +@x ibid + while hc[l]=trie_char(z) do +@y + while hc[l]=qo(trie_char(z)) do +@z +@x module 931 + repeat if str_pool[u]hc[j] then goto done; +@y + repeat if so(str_pool[u])hc[j] then goto done; +@z +@x module 937 +else begin if (cur_chr>127)or(lc_code(cur_chr)=0) then +@y +else begin if lc_code(cur_chr)=0 then +@z +@x ibid + begin incr(n); hc[n]:=lc_code(cur_chr)-1; +@y + begin incr(n); hc[n]:=lc_code(cur_chr); +@z +@x module 945 +@!init @!trie_c:packed array[trie_pointer] of ASCII_code; {characters to match} +@y +@!init @!trie_c:packed array[trie_pointer] of packed_ASCII_code; + {characters to match} +@z +% In modules 951--954, change "127" to "255" and "128" to "256" +@x module 952 +trie_link(0):=0; trie_char(0):=0; trie_op(0):=min_quarterword; +@y +trie_link(0):=0; trie_char(0):=min_quarterword; trie_op(0):=min_quarterword; +@z +@x module 953 +begin c:=trie_c[p]; +@y +begin c:=so(trie_c[p]); +@z +@x module 955 + begin if trie_link(h+trie_c[q])=0 then goto not_found; +@y + begin if trie_link(h+so(trie_c[q]))=0 then goto not_found; +@z +@x module 956 +repeat z:=h+trie_c[q]; trie_back(trie_link(z)):=trie_back(z); +@y +repeat z:=h+so(trie_c[q]); trie_back(trie_link(z)):=trie_back(z); +@z +@x module 959 + begin q:=trie_l[p]; c:=trie_c[p]; + trie_link(z+c):=trie_ref[q]; trie_char(z+c):=c; trie_op(z+c):=trie_o[p]; +@y + begin q:=trie_l[p]; c:=so(trie_c[p]); + trie_link(z+c):=trie_ref[q]; trie_char(z+c):=qi(c); trie_op(z+c):=trie_o[p]; +@z +@x module 962 + begin if cur_chr="." then cur_chr:=128 {edge-of-word delimiter} + else begin cur_chr:=lc_code(cur_chr); + if cur_chr=0 then + begin print_err("Nonletter"); +@.Nonletter@> + help1("(See Appendix H.)"); error; cur_chr:=128; + end; + end; + if k<63 then + begin incr(k); hc[k]:=cur_chr-1; hyf[k]:=0; digit_sensed:=false; + end; + end +else begin hyf[k]:=cur_chr-"0"; + if k<63 then digit_sensed:=true; + end +@y + begin if cur_chr="." then cur_chr:=0 {edge-of-word delimiter} + else begin cur_chr:=lc_code(cur_chr); + if cur_chr=0 then + begin print_err("Nonletter"); +@.Nonletter@> + help1("(See Appendix H.)"); error; + end; + end; + if k<63 then + begin incr(k); hc[k]:=cur_chr; hyf[k]:=0; digit_sensed:=false; + end; + end + else if k<63 then + begin hyf[k]:=cur_chr-"0"; digit_sensed:=true; + end; + end +@z +@x module 963 + while (p>0)and(c>trie_c[p]) do +@y + while (p>0)and(c>so(trie_c[p])) do +@z +@x ibid + if (p=0)or(c=128 then c:=cur_chr + else begin c:=ho(math_code(cur_chr)); +@y +letter,other_char,char_given: begin c:=ho(math_code(cur_chr)); +@z +@x module 1154 +mmode+letter,mmode+other_char,mmode+char_given: if cur_chr<128 then + set_math_char(ho(math_code(cur_chr))) + else set_math_char(cur_chr); +mmode+char_num: begin scan_char_num; cur_chr:=cur_val; + if cur_chr<128 then set_math_char(ho(math_code(cur_chr))) + else set_math_char(cur_chr); +@y +mmode+letter,mmode+other_char,mmode+char_given: + set_math_char(ho(math_code(cur_chr))); +mmode+char_num: begin scan_char_num; cur_chr:=cur_val; + set_math_char(ho(math_code(cur_chr))); +@z +@x module 1232 + p:=cur_chr; scan_seven_bit_int; p:=p+cur_val; scan_optional_equals; +@y + p:=cur_chr; scan_char_num; p:=p+cur_val; scan_optional_equals; +@z +@x module 1233 +else n:=127 +@y +else n:=255 +@z +@x module 1289 + begin if t>=cs_token_flag then t:=t-active_base; + c:=t mod 256; + if c<128 then if equiv(b+c)<>0 then t:=256*(t div 256)+equiv(b+c); + if t>=cs_token_flag then info(p):=t+active_base + else info(p):=t; +@y + begin c:=t mod 256; + if equiv(b+c)<>0 then info(p):=t-c+equiv(b+c); +@z +@x module 1309 + w.b0:=str_pool[k]; w.b1:=str_pool[k+1]; + w.b2:=str_pool[k+2]; w.b3:=str_pool[k+3]; +@y [often qi(so(x))=x, but not e.g. when "quarterwords" are two bytes] + w.b0:=qi(so(str_pool[k])); w.b1:=qi(so(str_pool[k+1])); + w.b2:=qi(so(str_pool[k+2])); w.b3:=qi(so(str_pool[k+3])); +@z +@x module 1310 + str_pool[k]:=w.b0; str_pool[k+1]:=w.b1; + str_pool[k+2]:=w.b2; str_pool[k+3]:=w.b3 +@y + str_pool[k]:=si(qo(w.b0)); str_pool[k+1]:=si(qo(w.b1)); + str_pool[k+2]:=si(qo(w.b2)); str_pool[k+3]:=si(qo(w.b3)) +@z +@x module 1368 +for k:=str_start[str_ptr] to pool_ptr-1 do dvi_out(str_pool[k]); +@y +for k:=str_start[str_ptr] to pool_ptr-1 do dvi_out(so(str_pool[k])); +@z + +360. Major change to allow multiple hyphenation tables. +I've combined this with the code for a minor change: +361. New parameters \lefthyphenmin and \righthyphenmin. +@x module 11 (affects most change files!) +@!trie_size=8000; {space for hyphenation patterns; should be larger for + \.{INITEX} than it is in production versions of \TeX} +@y +@!trie_size=8000; {space for hyphenation patterns; should be larger for + \.{INITEX} than it is in production versions of \TeX} +@!trie_op_size=500; {space for ``opcodes'' in the hyphenation patterns} +@z +@x module 212 +known as |space_factor|; it holds the current space factor used in spacing +calculations. In math mode, |aux| is also known as |incompleat_noad|; if +@y +known as |space_factor| and |clang|; it holds the current space factor used in +spacing calculations, and the current language used for hyphenation. +(The value of |clang| is undefined in restricted horizontal mode.) +In math mode, |aux| is also known as |incompleat_noad|; if +@z +@x ibid + @!pg_field,@!aux_field,@!ml_field: integer; +@y + @!pg_field,@!ml_field: integer; + @!aux_field: memory_word; +@z +@x module 213 +@d prev_depth==aux {the name of |aux| in vertical mode} +@d space_factor==aux {the name of |aux| in horizontal mode} +@d incompleat_noad==aux {the name of |aux| in math mode} +@y +@d prev_depth==aux.sc {the name of |aux| in vertical mode} +@d space_factor==aux.hh.lh {part of |aux| in horizontal mode} +@d clang==aux.hh.rh {the other part of |aux| in horizontal mode} +@d incompleat_noad==aux.int {the name of |aux| in math mode} +@z +@x module 218 +@!a:integer; {auxiliary} +@y +@!a:memory_word; {auxiliary} +@z +@x module 219 + if a<=ignore_depth then print("ignored") + else print_scaled(a); + if nest[p].pg_field<>0 then + begin print(", prevgraf "); + print_int(nest[p].pg_field); print(" line"); + if nest[p].pg_field<>1 then print_char("s"); + end; + end; +1: begin print_nl("spacefactor "); print_int(a); + end; +2: if a<>null then + begin print("this will be denominator of:"); show_box(a); +@y + if a.sc<=ignore_depth then print("ignored") + else print_scaled(a.sc); + if nest[p].pg_field<>0 then + begin print(", prevgraf "); + print_int(nest[p].pg_field); print(" line"); + if nest[p].pg_field<>1 then print_char("s"); + end; + end; +1: begin print_nl("spacefactor "); print_int(a.hh.lh); + if m>0 then if a.hh.rh>0 then + begin print(", current language "); print_int(a.hh.rh); + end; + end; +2: if a.int<>null then + begin print("this will be denominator of:"); show_box(a.int); +@z +@x modules 236--238 +@d int_pars=50 {total number of integer parameters} +@y +@d language_code=50 {current hyphenation table} +@d left_hyphen_min_code=51 {minimum left hyphenation fragment size} +@d right_hyphen_min_code=52 {minimum right hyphenation fragment size} +@d int_pars=53 {total number of integer parameters} +@z and define/print these new parameters appropriately (mimicking new_line_char) +@x module 418 +else begin cur_val:=aux; + if m=vmode then cur_val_level:=dimen_val@+else cur_val_level:=int_val; + end +@y +else if m=vmode then + begin cur_val:=prev_depth; cur_val_level:=dimen_val; + end +else begin cur_val:=space_factor; cur_val_level:=int_val; + end +@z +@x module 775 + begin mode:=-vmode; prev_depth:=nest[nest_ptr-2].aux_field; +@y + begin mode:=-vmode; prev_depth:=nest[nest_ptr-2].aux_field.sc; +@z +@x module 786 +begin push_nest; mode:=(-hmode-vmode)-mode; aux:=0; +@y +begin push_nest; mode:=(-hmode-vmode)-mode; +if mode=-hmode then space_factor:=0 @+else prev_depth:=0; +@z +@x module 863 +loop@+ begin @; +@y +loop@+ begin if threshold>inf_bad then threshold:=inf_bad; + if second_pass then @; + @; +@z +@x module 891 +passes on only about 5 per cent of the paragraphs. +@y +passes on only about 5 per cent of the paragraphs. + +@= +begin @!init if trie_not_ready then init_trie; @+tini@;@/ +l_hyf:=left_hyphen_min-1;@+if l_hyf<0 then l_hyf:=0; +r_hyf:=right_hyphen_min-1;@+if r_hyf<0 then r_hyf:=0; +min_hyf:=l_hyf+r_hyf+2; cur_lang:=0; +end +@z +@x module 892 +@!hyf_char:integer; {hyphen character of the relevant font} +@y +@!hyf_char:integer; {hyphen character of the relevant font} +@!cur_lang:ASCII_code; {current hyphenation table of interest} +@!l_hyf,@!r_hyf,@!min_hyf:integer; {limits on fragment sizes} +@z +@x module 894 +begin s:=link(cur_p); +@y +begin if min_hyf>63 then goto done1; +s:=link(cur_p); +@z +@x module 896 + else if type(s)=whatsit_node then goto continue +@y + else if type(s)=whatsit_node then + begin @; + goto continue; + end +@z +@x module 899 (title of this module also changes appropriately) +if hn<5 then goto done1; +@y +if hn:=@t$p_1$@>| and then, for |1)|. Then set |hyf[l-hyf_distance[v]]:=@tmax@>( +hyf[l-hyf_distance[v]], hyf_num[v])|, and |v:=hyf_next[v]|; repeat, if +necessary, until |v=min_quarterword|. +@y +the letters in |hc[(l-k+1)..l@,]| of language |t|, +we perform all of the required operations +for this pattern by carrying out the following little program: Set +|v:=trie_op(@t$z_k$@>)|. Then set |v:=v+op_start[t]|, +|hyf[l-hyf_distance[v]]:=@tmax@>(hyf[l-hyf_distance[v]], hyf_num[v])|, +and |v:=hyf_next[v]|; repeat, if necessary, until |v=min_quarterword|. +@z +@x module 921 +@!hyf_distance:array[quarterword] of small_number; {position |k-j| of $n_j$} +@!hyf_num:array[quarterword] of small_number; {value of $n_j$} +@!hyf_next:array[quarterword] of quarterword; {continuation of this |trie_op|} +@y +@!hyf_distance:array[1..trie_op_size] of small_number; {position |k-j| of $n_j$} +@!hyf_num:array[1..trie_op_size] of small_number; {value of $n_j$} +@!hyf_next:array[1..trie_op_size] of quarterword; {continuation code} +@!op_start:array[ASCII_code] of 0..trie_op_size; {offset for current language} +@z +@x module 922 +@!v:quarterword; {an index into |hyf_distance|, etc.} +@y +@!v:integer; {an index into |hyf_distance|, etc.} +@z +@x module 923 +for j:=0 to hn-2 do + begin z:=hc[j]; l:=j; +@y +if trie_char(cur_lang+1)<>qi(cur_lang) then return; {no patterns for |cur_lang|} +for j:=0 to hn-r_hyf do + begin z:=trie_link(cur_lang+1)+hc[j]; l:=j; +@z +@x ibid +found: hyf[1]:=0; hyf[hn-2]:=0; hyf[hn-1]:=0; hyf[hn]:=0 +@y +found: for j:=0 to l_hyf do hyf[j]:=0; +for j:=0 to r_hyf do hyf[hn-j]:=0 +@z +@x module 924 +repeat i:=l-hyf_distance[v]; +@y +repeat v:=v+op_start[cur_lang]; i:=l-hyf_distance[v]; +@z +@x module 930 +h:=hc[1]; +@y +h:=hc[1]; incr(hn); hc[hn]:=cur_lang; +@z +@x ibid +not_found: +@y +not_found: decr(hn) +@z +@x module 931 + goto found; +@y + decr(hn); goto found; +@z +@x module 934 +@p procedure new_hyph_exceptions; {enters new exceptions} +label reswitch, exit, found, not_found, done; +@y +@d set_cur_lang==if language<=0 then cur_lang:=0 + else if language>255 then cur_lang:=0 + else cur_lang:=language + +@p procedure new_hyph_exceptions; {enters new exceptions} +label reswitch, exit, found, not_found; +@z +@x ibid +begin scan_left_brace; {a left brace must follow \.{\\hyphenation}} +@y +begin scan_left_brace; {a left brace must follow \.{\\hyphenation}} +set_cur_lang; +@z +@x module 935 + spacer,right_brace: begin if n>4 then @; +@y + spacer,right_brace: begin if n>1 then @; +@z +@x module 938 +begin if n>1 then +@y +begin if n<63 then +@z +@x module 939 +begin str_room(n); h:=0; +@y +begin incr(n); hc[n]:=cur_lang; str_room(n); h:=0; +@z +@x ibid +loop@+ begin if p=null then goto done; + if info(p); +@y +@; +@z +@x module 942 +@p@!init @@; +@y +@= +@!init @@; +@z +@x module 943 +@d quarterword_diff=max_quarterword-min_quarterword +@d trie_op_hash_size=quarterword_diff+quarterword_diff {double} + +@= +@!init@! trie_op_hash:array[0..trie_op_hash_size] of quarterword; + {trie op codes for triples} +tini@;@/ +@t\hskip1em@>@!trie_op_ptr:quarterword; {highest |trie_op| assigned} +@y +@= +@!init@! trie_op_hash:array[-trie_op_size..trie_op_size] of 0..trie_op_size; + {trie op codes for quadruples} +@!trie_used:array[ASCII_code] of quarterword; + {largest opcode used so far for this language} +@!trie_op_lang:array[1..trie_op_size] of ASCII_code; + {language part of a hashed quadruple} +@!trie_op_val:array[1..trie_op_size] of quarterword; + {opcode corresponding to a hashed quadruple} +@!trie_op_ptr:0..trie_op_size; {number of stored ops so far} +tini +@z +@x module 944 should be entirely replaced +@y by the following code: +@ It's tempting to remove the |overflow| stops in the following procedure; +|new_trie_op| could return |min_quarterword| (thereby simply ignoring +part of a hyphenation pattern) instead of aborting the job. However, that would +lead to different hyphenation results on different installations of \TeX\ +using the same patterns. The |overflow| stops are necessary for portability +of patterns. + +@= +function new_trie_op(@!d,@!n:small_number;@!v:quarterword):quarterword; +label exit; +var h:-trie_op_size..trie_op_size; {trial hash location} +@!u:quarterword; {trial op code} +@!l:0..trie_op_size; {pointer to stored data} +begin h:=abs(n+313*d+361*v+1009*cur_lang) mod (trie_op_size+trie_op_size) + - trie_op_size; +loop@+ begin l:=trie_op_hash[h]; + if l=0 then {empty position found for a new op} + begin if trie_op_ptr=trie_op_size then + overflow("pattern memory ops",trie_op_size); + u:=trie_used[cur_lang]; + if u=max_quarterword then + overflow("pattern memory ops per language", + max_quarterword-min_quarterword); + incr(trie_op_ptr); incr(u); trie_used[cur_lang]:=u; + hyf_distance[trie_op_ptr]:=d; + hyf_num[trie_op_ptr]:=n; hyf_next[trie_op_ptr]:=v; + trie_op_lang[trie_op_ptr]:=cur_lang; trie_op_hash[h]:=trie_op_ptr; + trie_op_val[trie_op_ptr]:=u; new_trie_op:=u; return; + end; + if (hyf_distance[l]=d)and(hyf_num[l]=n)and(hyf_next[l]=v) + and(trie_op_lang[l]=cur_lang) then + begin new_trie_op:=trie_op_val[l]; return; + end; + if h>-trie_op_size then decr(h)@+else h:=trie_op_size; + end; +exit:end; +@z +@x module 945: move the code from this module into 946, and introduce new code: +@y +@ After |new_trie_op| has compressed the necessary opcode information, +plenty of information is available to unscramble the data into the +final form needed by our hyphenation algorithm. + +@= +op_start[0]:=-min_quarterword; +for j:=1 to 255 do op_start[j]:=op_start[j-1]+qo(trie_used[j-1]); +for j:=1 to trie_op_ptr do + trie_op_hash[j]:=op_start[trie_op_lang[j]]+trie_op_val[j]; {destination} +for j:=1 to trie_op_ptr do while trie_op_hash[j]>j do + begin k:=trie_op_hash[j];@/ + t:=hyf_distance[k]; hyf_distance[k]:=hyf_distance[j]; hyf_distance[j]:=t;@/ + t:=hyf_num[k]; hyf_num[k]:=hyf_num[j]; hyf_num[j]:=t;@/ + t:=hyf_next[k]; hyf_next[k]:=hyf_next[j]; hyf_next[j]:=t;@/ + trie_op_hash[j]:=trie_op_hash[k]; trie_op_hash[k]:=k; + end +@z +@x module 949: Move this code to just after the new module 945! +mentioned so far, let's write a procedure that does the initialization. + +@= +procedure init_pattern_memory; {gets ready to build a linked trie} +var h:0..trie_op_hash_size; {an index into |trie_op_hash|} +@!p:trie_pointer; {an index into |trie_hash|} +begin for h:=0 to trie_op_hash_size do trie_op_hash[h]:=min_quarterword; +trie_op_ptr:=min_quarterword; trie_root:=0; trie_c[0]:=0; trie_ptr:=0; +for p:=0 to trie_size do trie_hash[p]:=0; +end; +@y +mentioned so far, let's write down the code that gets them started. + +@= +for k:=-trie_op_size to trie_op_size do trie_op_hash[k]:=0; +for k:=0 to 255 do trie_used[k]:=min_quarterword; +trie_op_ptr:=0; +@z +@x module 950 +@t\hskip1em@>@!trie_min:trie_pointer; + {all locations |<=trie_min| are vacant in |trie|} +tini@;@/ +@t\hskip1em@>@!trie_max:trie_pointer; {largest location used in |trie|} +@y +@t\hskip10pt@>@!trie_min:array[ASCII_code] of trie_pointer; + {the first possible slot for each character} +@t\hskip10pt@>@!trie_max:trie_pointer; {largest location used in |trie|} +@t\hskip10pt@>@!trie_not_ready:boolean; {is the trie still in linked form?} +tini +@z +@x modules 951 and 952 +@ Here is how these data structures are initialized. + +@= +procedure init_trie_memory; {gets ready to pack into |trie|} +var p:trie_pointer; {index into |trie_ref|, |trie|, |trie_taken|} +begin for p:=0 to trie_ptr do trie_ref[p]:=0; +trie_max:=256; trie_min:=256; trie_link(0):=1; trie_taken[0]:=false; +trie_link(trie_size):=0; trie_back(0):=trie_size; {wrap around} +for p:=1 to 256 do + begin trie_back(p):=p-1; trie_link(p):=p+1; trie_taken[p]:=false; + end; +end; + +@ Each time \.{\\patterns} appears, it overrides any patterns that were +entered earlier, so the arrays are not initialized until \TeX\ sees +\.{\\patterns}. However, some of the global variables must be +initialized when \.{INITEX} is loaded, in case the user never mentions +any \.{\\patterns}. + +@= +trie_op_ptr:=min_quarterword;@/ +trie_link(0):=0; trie_char(0):=min_quarterword; trie_op(0):=min_quarterword; +for k:=1 to 255 do trie[k]:=trie[0]; +trie_max:=255; +@y +@ Each time \.{\\patterns} appears, it contributes further patterns to +the future trie, which will be built only when hyphenation is attempted or +when a format file is dumped. The boolean variable |trie_not_ready| +will change to |false| when the trie is compressed; this will disable +further patterns. + +@= +trie_not_ready:=true; trie_root:=0; trie_c[0]:=si(0); trie_ptr:=0; + +@ Here is how the trie-compression data structures are initialized. +If storage is tight, it would be possible to overlap |trie_op_hash|, +|trie_op_lang|, and |trie_op_val| with |trie|, |trie_hash|, and |trie_taken|, +because we finish with the former just before we need the latter. + +@= +@; +for p:=0 to trie_size do trie_hash[p]:=0; +trie_root:=compress_trie(trie_root); {identify equivalent subtries} +for p:=0 to trie_ptr do trie_ref[p]:=0; +for p:=0 to 255 do trie_min[p]:=p+1; +trie_link(0):=1; trie_max:=0 +@z +@x module 953 +begin c:=so(trie_c[p]); +if c= +h.rh:=0; h.b0:=min_quarterword; h.b1:=min_quarterword; {|trie_link:=0|, + |trie_op:=min_quarterword|, |trie_char:=qi(0)|} +if trie_root=0 then {no patterns were given} + begin for r:=0 to 256 do trie[r]:=h; + trie_max:=256; + end +else begin trie_fix(trie_root); {this fixes the non-holes in |trie|} + r:=0; {now we will zero out all the holes} + repeat s:=trie_link(r); trie[r]:=h; r:=s; + until r>trie_max; + end; +trie_char(0):=qi("?"); {make |trie_char(c)<>c| for all |c|} +@z +@x module 960 +@!r,@!s:trie_pointer; {used to clean up the packed |trie|} +@!h:two_halves; {template used to zero out |trie|'s holes} +begin scan_left_brace; {a left brace must follow \.{\\patterns}} +init_pattern_memory;@/ +@; +trie_root:=compress_trie(trie_root); {compress the trie} +@; +end; +@y +begin if trie_not_ready then + begin set_cur_lang; scan_left_brace; {a left brace must follow \.{\\patterns}} + @; + end +else begin print_err("Too late for "); print_esc("patterns"); + help1("All patterns must be given before typesetting begins."); + error; link(garbage):=scan_toks(false,false); flush_list(def_ref); + end; +end; +@z +@x module 963 +q:=0; +while l= +procedure init_trie; +var @!p:trie_pointer; {pointer for initialization} +@!j,@!k,@!t:integer; {all-purpose registers for initialization} +@!r,@!s:trie_pointer; {used to clean up the packed |trie|} +@!h:two_halves; {template used to zero out |trie|'s holes} +begin @; +if trie_root<>0 then + begin first_fit(trie_root); trie_pack(trie_root); + end; +@; +trie_not_ready:=false; +end; +@z +@x module 1033 gets new code before main_loop_1 +@y +if mode>0 then if language<>clang then fix_language; +@z +@x modules 1091 and 1200 +push_nest; mode:=hmode; space_factor:=1000; +@y +push_nest; mode:=hmode; space_factor:=1000; clang:=0; +@z +@x module 1324 +for k:=0 to trie_max do dump_hh(trie[k]); +dump_int(trie_op_ptr); +for k:=min_quarterword+1 to trie_op_ptr do + begin dump_int(hyf_distance[k]); + dump_int(hyf_num[k]); + dump_int(hyf_next[k]); + end; +print_ln; print_int(hyph_count); print(" hyphenation exception"); +if hyph_count<>1 then print_char("s"); +print_nl("Hyphenation trie of length "); print_int(trie_max); +@.Hyphenation trie...@> +print(" has "); print_int(qo(trie_op_ptr)); print(" op"); +if trie_op_ptr<>min_quarterword+1 then print_char("s") +@y +print_ln; print_int(hyph_count); print(" hyphenation exception"); +if hyph_count<>1 then print_char("s"); +if trie_not_ready then init_trie; +dump_int(trie_max); +for k:=0 to trie_max do dump_hh(trie[k]); +dump_int(trie_op_ptr); +for k:=1 to trie_op_ptr do + begin dump_int(hyf_distance[k]); + dump_int(hyf_num[k]); + dump_int(hyf_next[k]); + end; +print_nl("Hyphenation trie of length "); print_int(trie_max); +@.Hyphenation trie...@> +print(" has "); print_int(trie_op_ptr); print(" op"); +if trie_op_ptr<>1 then print_char("s"); +print(" out of "); print_int(trie_op_size); +for k:=255 downto 0 do if trie_used[k]>min_quarterword then + begin print_nl(" "); print_int(qo(trie_used[k])); + print(" for language "); print_int(k); + dump_int(k); dump_int(qo(trie_used[k])); + end +@z +@x module 1325 +undump_size(0)(trie_size)('trie size')(trie_max); +for k:=0 to trie_max do undump_hh(trie[k]); +undump(min_quarterword)(max_quarterword)(trie_op_ptr); +for k:=min_quarterword+1 to trie_op_ptr do + begin undump(0)(63)(hyf_distance[k]); {a |small_number|} + undump(0)(63)(hyf_num[k]); + undump(min_quarterword)(max_quarterword)(hyf_next[k]); + end +@y +undump_size(0)(trie_size)('trie size')(j); {|trie_max|} +for k:=0 to j do undump_hh(trie[k]); +undump_size(0)(trie_op_size)('trie op size')(j); {|trie_op_ptr|} +for k:=1 to j do + begin undump(0)(63)(hyf_distance[k]); {a |small_number|} + undump(0)(63)(hyf_num[k]); + undump(min_quarterword)(max_quarterword)(hyf_next[k]); + end; +k:=256; +while j>0 do + begin undump(0)(k-1)(k); undump(1)(j)(x); j:=j-x; op_start[k]:=qo(j); + end; +@!init trie_not_ready:=false @+tini +@z +@x module 1341 gets two new definitions +@y +@d language_node=4 {|subtype| in whatsits that change the current language} +@d stored_language(#)==mem[#+1].int {language number, in the range |0..255|} +@z +@x module 1344 gets a new definition and a new Pascal statement +@y +@d set_language_code=5 {command modifier for \.{\\setlanguage}} +primitive("setlanguage",extension,set_language_code);@/ +@!@:set_language_}{\.{\\setlanguage} primitive@> +@z +@x module 1346 gets a new case +@y + set_language_code:print_esc("setlanguage"); +@z +@x module 1348 gets a new case +@y +set_language_code:@; +@z +@x module 1356 gets a new case +@y +language_node:begin print_esc("setlanguage"); + print_int(stored_language(p)); + end; +@z +% in modules 1357 and 1358, change "close_node" to "close_node,language_node". +@x module 1362 becomes two modules +@ @=do_nothing +@y +@ @= +if subtype(cur_p)=language_node then cur_lang:=stored_language(cur_p) + +@ @= +if subtype(s)=language_node then cur_lang:=stored_language(s) +@z and old module 1367 is moved to just before the old module 1378 +@x module 1373 gets a new case +@y +language_node:do_nothing; +@z +@x new modules before the system-dependent changes (i.e. before the old 1376) +@y +@ @= +if abs(mode)<>hmode then report_illegal_case +else begin new_whatsit(language_node,small_node_size); + scan_int; + if cur_val<=0 then clang:=0 + else if cur_val>255 then clang:=0 + else clang:=cur_val; + stored_language(tail):=clang; + end + +@ Finally, we need a subroutine that comes into play when a character of +a non-|clang| language is being appended to the current paragraph. + +@= +procedure fix_language; +var @!l:ASCII_code; {the new current language} +begin if language<=0 then l:=0 +else if language>255 then l:=0 +else l:=language; +if l<>clang then + begin new_whatsit(language_node,small_node_size); + stored_language(tail):=l; clang:=l; + end; +end; +@z + +362. Major extension to ligature capability. +@x module 143 +a linked list of character nodes for those characters. +@y +a linked list of character nodes for all original characters that have been +deleted. (This list might be empty if the characters that generated the +ligature were retained in other nodes.) + +The |subtype| field is 0, plus 2 and/or 1 if the original source of the +ligature included implicit left and/or right boundaries. +@z +@x in module 144 add the following procedure to the existing code +@y +function new_lig_item(@!c:quarterword):pointer; +var p:pointer; {the new node} +begin p:=get_node(small_node_size); character(p):=c; lig_ptr(p):=null; +new_lig_item:=p; +end; +@z +@x module 193 +font_in_short_display:=font(lig_char(p)); +short_display(lig_ptr(p)); print_char(")"); +@y +if subtype(p)>1 then print_char("|"); +font_in_short_display:=font(lig_char(p)); short_display(lig_ptr(p)); +if odd(subtype(p)) then print_char("|"); +print_char(")"); +end +@z +@x modules 208 and 209 +@d radical=65 {square root and similar signs ( \.{\\radical} )} +@y +@d no_boundary=65 {suppress boundary ligatures ( \.{\\noboundary} )} +@d radical=66 {square root and similar signs ( \.{\\radical} )} +@z and so on, adding 1 to each definition until getting to max_command=100 +@x module 265 gets a new statement +@y +primitive("noboundary",no_boundary,0);@/ +@!@:no_boundary_}{\.{\\noboundary} primitive@> +@z +@x module 266 gets a new case +@y +no_boundary:print_esc("noboundary"); +@z +@x module 545 is entirely replaced +@y by the following new specifications: +@ The |lig_kern| array contains instructions in a simple programming language +that explains what to do for special letter pairs. Each word in this array is a +|@!lig_kern_command| of four bytes. + +\yskip\hang first byte: |skip_byte|, indicates that this is the final program + step if the byte is 128 or more, otherwise the next step is obtained by + skipping this number of intervening steps.\par +\hang second byte: |next_char|, ``if |next_char| follows the current character, + then perform the operation and stop, otherwise continue.''\par +\hang third byte: |op_byte|, indicates a ligature step if less than~128, + a kern step otherwise.\par +\hang fourth byte: |remainder|.\par +\yskip\noindent +In a kern step, an +additional space equal to |kern[256*(op_byte-128)+remainder]| is inserted +between the current character and |next_char|. This amount is +often negative, so that the characters are brought closer together +by kerning; but it might be positive. + +There are eight kinds of ligature steps, having |op_byte| codes $4a+2b+c$ where +$0\le a\le b+c$ and $0\le b,c\le1$. The character whose code is +|remainder| is inserted between the current character and |next_char|; +then the current character is deleted if $b=0$, and |next_char| is +deleted if $c=0$; then we pass over $a$~characters to reach the next +current character (which may have a ligature/kerning program of its own). + +If the very first instruction of the |lig_kern| array has |skip_byte=255|, +the |next_char| byte is the so-called right boundary character of this font; +the value of |next_char| need not lie between |bc| and~|ec|. +If the very last instruction of the |lig_kern| array has |skip_byte=255|, +there is a special ligature/kerning program for a left boundary character, +beginning at location |256*op_byte+remainder|. +The interpretation is that \TeX\ puts implicit boundary characters +before and after each consecutive string of characters from the same font. +These implicit characters do not appear in the output, but they can affect +ligatures and kerning. + +If the very first instruction of a character's |lig_kern| program has +|skip_byte>128|, the program actually begins in location +|256*op_byte+remainder|. This feature allows access to large |lig_kern| +arrays, because the first instruction must otherwise +appear in a location |<=255|. + +Any instruction with |skip_byte>128| in the |lig_kern| array must have +|256*op_byte+remainder= +@y +@d non_char==qi(256) {a |halfword| code that can't match a real character} +@d non_address==font_mem_size {a spurious |font_index|} + +@= +@z +@x module 548 gets a new type definition +@y +@!font_index=0..font_mem_size; +@z +@x module 549 + {current \.{\\skewchar} values} +@y + {current \.{\\skewchar} values} +@!bchar_label:array[internal_font_number] of font_index; + {start of |lig_kern| program for left boundary character, + |non_address| if there is none} +@!font_bchar:array[internal_font_number] of min_quarterword..non_char; + {right boundary character, |non_char| if there is none} +@!font_false_bchar:array[internal_font_number] of min_quarterword..non_char; + {|font_bchar| if it doesn't exist in the font, otherwise |non_char|} +@z +@x module 557 +@d char_kern_end(#)==rem_byte(#)].sc +@y NOTE: Optimize kern_base_offset in your change file! It's a constant. +@d char_kern_end(#)==256*op_byte(#)+rem_byte(#)].sc +@d kern_base_offset==256*(kern_flag) +@d lig_kern_restart_end(#)==256*op_byte(#)+rem_byte(#)+32768-kern_base_offset +@d lig_kern_restart(#)==lig_kern_base[#]+lig_kern_restart_end +@z +@x module 560 +@!z:scaled; {the design size or the ``at'' size} +@y +@!bch_label:integer; {left boundary start location, or infinity} +@!bchar:0..256; {right boundary character, or 256} +@!z:scaled; {the design size or the ``at'' size} +@z +@x module 566 +kern_base[f]:=lig_kern_base[f]+nl; +exten_base[f]:=kern_base[f]+nk; +@y +kern_base[f]:=lig_kern_base[f]+nl-kern_base_offset; +exten_base[f]:=kern_base[f]+kern_base_offset+nk; +@z +@x module 573: The entire module is replaced +@y by the following code. +@ @d check_existence(#)==@t@>@;@/ + begin check_byte_range(#); + qw:=char_info(f)(#); {N.B.: not |qi(#)|} + if not char_exists(qw) then abort; + end + +@= +bch_label:=@'77777; bchar:=256; +if nl>0 then + begin for k:=lig_kern_base[f] to kern_base[f]+kern_base_offset-1 do + begin store_four_quarters(font_info[k].qqqq); + if a>128 then + begin if 256*c+d>=nl then abort; + if a=255 then if k=lig_kern_base[f] then bchar:=b; + end + else begin if b<>bchar then check_existence(b); + if c<128 then check_existence(d) {check ligature} + else if 256*(c-128)+d>=nk then abort; {check kern} + if a<128 then if k-lig_kern_base[f]+a+1>=nl then abort; + end; + end; + if a=255 then bch_label:=256*c+d; + end; +for k:=kern_base[f]+kern_base_offset to exten_base[f]-1 do + store_scaled(font_info[k].sc); +@z +@x module 574 (actually a bugfix) + if a<>0 then check_byte_range(a); + if b<>0 then check_byte_range(b); + if c<>0 then check_byte_range(c); + check_byte_range(d); +@y + if a<>0 then check_existence(a); + if b<>0 then check_existence(b); + if c<>0 then check_existence(c); + check_existence(d); +@z +@x module 576 +font_name[f]:=nom; +@y +if bch_label=bc then + begin qw:=char_info(f)(bchar); {N.B.: not |qi(bchar)|} + if char_exists(qw) then font_false_bchar[f]:=non_char; + end; +font_name[f]:=nom; +@z +@x module 708 (slight but optional optimization) +continue: if (qo(y)>=font_bc[g])and(qo(y)<=font_ec[g]) then + begin q:=char_info(g)(y); +@y +if (qo(y)>=font_bc[g])and(qo(y)<=font_ec[g]) then + begin continue: q:=char_info(g)(y); +@z +@x module 740 (another bugfix) + i:=char_info(f)(y); +@y + i:=char_info(f)(y); + if not char_exists(i) then goto done; +@z +@x module 741 + repeat cur_i:=font_info[a].qqqq; + if qo(next_char(cur_i))=skew_char[cur_f] then + begin if op_bit(cur_i)>=kern_flag then + s:=char_kern(cur_f)(cur_i); + goto done1; + end; + incr(a); + until stop_bit(cur_i)>=stop_flag; +@y + cur_i:=font_info[a].qqqq; + if skip_byte(cur_i)>stop_flag then + begin a:=256*(qo(op_byte(cur_i)))+rem_byte(cur_i); + cur_i:=font_info[a].qqqq; + end; + loop begin if qo(next_char(cur_i))=skew_char[cur_f] then + begin if op_byte(cur_i)>=kern_flag then + if skip_byte(cur_i)<=stop_flag then s:=char_kern(cur_f)(cur_i); + goto done1; + end; + if skip_byte(cur_i)>=stop_flag then goto done1 + else a:=a+qo(skip_byte(cur_i))+1; + cur_i:=font_info[a].qqqq; + end; +@z +@x module 749 (yet another bugfix of the same type!) +@!p,@!v,@!x,@!y,@!z:pointer; {temporary registers for box construction} +@y +@!p,@!v,@!x,@!y,@!z:pointer; {temporary registers for box construction} +@!c:quarterword;@+@!i:four_quarters; {registers for character examination} +@z +@x ibid + begin cur_c:=rem_byte(cur_i); character(nucleus(q)):=cur_c; + cur_i:=char_info(cur_f)(cur_c); +@y + begin c:=rem_byte(cur_i); i:=char_info(cur_f)(c); + if char_exists(i) then + begin cur_c:=c; cur_i:=i; character(nucleus(q)):=c; + end; +@z +@x module 752 +@!p:pointer; {temporary register for list manipulation} +@y +@!p,@!r:pointer; {temporary registers for list manipulation} +@z +@x ibid + repeat cur_i:=font_info[a].qqqq;@/ + @; + incr(a); + until stop_bit(cur_i)>=stop_flag; +@y + cur_i:=font_info[a].qqqq; + if skip_byte(cur_i)>stop_flag then + begin a:=lig_kern_restart(cur_f)(cur_i); + cur_i:=font_info[a].qqqq; + end; + loop@+ begin @; + if skip_byte(cur_i)>=stop_flag then return; + a:=a+qo(skip_byte(cur_i))+1; + cur_i:=font_info[a].qqqq; + end; +@z +@x The entire code of module 753 is revised +@y and should be replaced by the following: +@ Note that a ligature between an |ord_noad| and another kind of noad +is replaced by an |ord_noad|, when the two noads collapse into one. +But we could make a parenthesis (say) change shape when it follows +certain letters. Presumably a font designer will define such +ligatures only when this convention makes sense. + +\chardef\?='174 % vertical line to indicate character retention + +@= +if next_char(cur_i)=cur_c then if skip_byte(cur_i)<=stop_flag then + if op_byte(cur_i)>=kern_flag then + begin p:=new_kern(char_kern(cur_f)(cur_i)); + link(p):=link(q); link(q):=p; return; + end + else begin check_interrupt; {allow a way out of infinite ligature loop} + case op_byte(cur_i) of + qi(1),qi(5): character(nucleus(q)):=rem_byte(cur_i); {\.{=:\?}, \.{=:\?>}} + qi(2),qi(6): character(nucleus(p)):=rem_byte(cur_i); {\.{\?=:}, \.{\?=:>}} + qi(3),qi(7),qi(11):begin r:=new_noad; {\.{\?=:\?}, \.{\?=:\?>}, \.{\?=:\?>>}} + character(nucleus(r)):=rem_byte(cur_i); + fam(nucleus(r)):=fam(nucleus(q));@/ + link(q):=r; link(r):=p; + if op_byte(cur_i)qi(3) then return; + math_type(nucleus(q)):=math_char; goto restart; + end +@z +@x module 862 +@!q,@!r,@!s:pointer; {miscellaneous nodes of temporary interest} +@y +@!q,@!r,@!s,@!prev_s:pointer; {miscellaneous nodes of temporary interest} +@z +@x module 892 +nodes $p_a$ and~$p_b$ in the description above are placed into variables +@y +nodes $p_{a-1}$ and~$p_b$ in the description above are placed into variables +@z +@x ibid +@!hc:array[0..65] of halfword; {word to be hyphenated} +@y +@!hc:array[0..65] of 0..256; {word to be hyphenated} +@z +@x ibid +@!hu:array[1..63] of ASCII_code; {like |hc|, before conversion to lowercase} +@y +@!hu:array[0..63] of 0..256; {like |hc|, before conversion to lowercase} +@z +@x module 894 +s:=link(cur_p); +@y +prev_s:=cur_p; s:=link(prev_s); +@z +@x module 895 +label done,found,not_found,found1,exit; +@y +label common_ending,done,found,found1,not_found,not_found+1,exit; +@z +@x module 896 + else if type(s)=ligature_node then + begin q:=lig_ptr(s); c:=qo(character(q)); hf:=font(q); + end +@y + else if type(s)=ligature_node then + if lig_ptr(s)=null then goto continue + else begin q:=lig_ptr(s); c:=qo(character(q)); hf:=font(q); + end +@z +@x ibid +continue: s:=link(s); +@y +continue: prev_s:=s; s:=link(prev_s); +@z +@x ibid +ha:=s +@y +ha:=prev_s +@z +@x module 898 +begin j:=hn; q:=lig_ptr(s); +if font(q)<>hf then goto done3; +repeat c:=qo(character(q)); +if lc_code(c)=0 then goto done3; +if j=63 then goto done3; +incr(j); hu[j]:=c; hc[j]:=lc_code(c);@/ +q:=link(q); +until q=null; +@y +begin if font(lig_char(s))<>hf then goto done3; +j:=hn; q:=lig_ptr(s); +while q>null do + begin c:=qo(character(q)); + if lc_code(c)=0 then goto done3; + if j=63 then goto done3; + incr(j); hu[j]:=c; hc[j]:=lc_code(c);@/ + q:=link(q); + end; +@z +@x module 900 gets three new global variables +@y +@!init_list:pointer; {list of punctuation characters preceding the word} +@!init_lig:boolean; {does |init_list| represent a ligature?} +@!init_lft:boolean; {if so, did the ligature involve a left boundary?} +@z +@x module 901 +@!q,@!r,@!s:pointer; {temporary registers for list manipulation} +@y +@!p,@!q,@!r,@!s:pointer; {temporary registers for list manipulation} +@!bchar:halfword; {right boundary character of hyphenated word, or |non_char|} +@z +@x module 903 should be entirely replaced +@y by the following: +@ If hyphens are in fact going to be inserted, \TeX\ first deletes the +subsequence of nodes between |ha| and~|hb|. An attempt is made to +preserve the effect that implicit boundary characters and punctuation marks +had on ligatures inside the hyphenated word, by storing a left boundary or +preceding character in |hu[0]| and by storing a possible right boundary +in |bchar|. We set |j:=0| if |hu[0]| is to be part of the reconstruction; +otherwise |j:=1|. +The variable |s| will point to the tail of the current hlist, and +|q| will point to the node following |hb|, so that +things can be hooked up after we reconstitute the hyphenated word. + +@= +q:=link(hb); link(hb):=null; r:=link(ha); link(ha):=null; bchar:=non_char; +if type(hb)=ligature_node then if odd(subtype(hb)) then + bchar:=font_bchar[hf]; +if is_char_node(ha) then + begin init_list:=ha; init_lig:=false; hu[0]:=qo(character(ha)); + end +else if type(ha)=ligature_node then + begin init_list:=lig_ptr(ha); init_lig:=true; init_lft:=(subtype(ha)>1); + hu[0]:=qo(character(lig_char(ha))); + if init_list=null then if init_lft then + begin hu[0]:=256; init_lig:=false; + end; {in this case a ligature will be reconstructed from scratch} + free_node(ha,small_node_size); + end +else goto not_found+1; {no punctuation found} +s:=cur_p; {we have |cur_p<>ha| because |type(cur_p)=glue_node|} +while link(s)<>ha do s:=link(s); +j:=0; goto common_ending; +not_found+1: j:=1; s:=ha; init_list:=null; +if not is_char_node(r) then if type(r)=ligature_node then + if subtype(r)>1 then + begin j:=0; hu[0]:=256; init_lig:=false; + end; +common_ending: flush_node_list(r); +@; +flush_list(init_list) +@z +@x modules 905--911 are entirely replaced +@y by the following new code: +Still further complications arise in the presence of ligatures that do not +delete the original characters. When punctuation precedes the word being +hyphenated, \TeX's method is not perfect under all possible scenarios, +because punctuation marks and letters can propagate information back and forth. +For example, suppose the original pre-hyphenation pair +\.{*a} changes to \.{*y} via a \.{\?=:} ligature, which changes to \.{xy} +via a \.{=:\?} ligature; if $p_{a-1}=\.x$ and $p_a=\.y$, the reconstitution +procedure isn't smart enough to obtain \.{xy} again. In such cases the +font designer should include a ligature that goes from \.{xa} to \.{xy}. + +@ The processing is facilitated by a subroutine called |reconstitute|. Given +a string of characters $x_j\ldots x_n$, there is a smallest index $m\ge j$ +such that the ``translation'' of $x_j\ldots x_n$ by ligatures and kerning +has the form $y_1\ldots y_t$ followed by the translation of $x_{m+1}\ldots x_n$, +where $y_1\ldots y_t$ is some nonempty sequence of character, ligature, and +kern nodes. We call $x_j\ldots x_m$ a ``cut prefix'' of $x_j\ldots x_n$. +For example, if $x_1x_2x_3=\.{fly}$, and if the font contains `fl' as a +ligature and a kern between `fl' and `y', then $m=2$, $y=2$, and $y_1$ will +be a ligature node for `fl' followed by an appropriate kern node~$y_2$. +In the most common case, $x_j$~forms no ligature with $x_{j+1}$ and we +simply have $m=j$, $y_1=x_j$. If $m= +@!hyphen_passed:small_number; {first hyphen in a ligature, if any} + +@ @= +function reconstitute(@!j,@!n:small_number;@!bchar,@!hchar:halfword): + small_number; +label continue,done; +var @!p:pointer; {temporary register for list manipulation} +@!t:pointer; {a node being appended to} +@!q:four_quarters; {character information or a lig/kern instruction} +@!cur_rh:halfword; {hyphen character for ligature testing} +@!test_char:halfword; {hyphen or other character for ligature testing} +@!w:scaled; {amount of kerning} +@!k:font_index; {position of current lig/kern instruction} +begin hyphen_passed:=0; t:=hold_head; w:=0; link(hold_head):=null; + {at this point |ligature_present=lft_hit=rt_hit=false|} +@; +continue:@; +@; +reconstitute:=j; +end; + +@ The reconstitution procedure shares many of the global data structures +by which \TeX\ has processed the words before they were hyphenated. +There is an implied ``cursor'' between characters |cur_l| and |cur_r|; +these characters will be tested for possible ligature activity. If +|ligature_present| then |cur_l| is a ligature character formed from the +original characters following |cur_q| in the current translation list. +There is a ``ligature stack'' between the cursor and character |j+1|, +consisting of pseudo-ligature nodes linked together by their |link| fields. +This stack is normally empty unless a ligature command has created a new +character that will need to be processed later. A pseudo-ligature is +a special node having a |character| field that represents a potential +ligature and a |lig_ptr| field that points to a |char_node| or is |null|. +We have +$$|cur_r|=\cases{|character(lig_stack)|,&if |lig_stack>null|;\cr + |qi(hu[j+1])|,&if |lig_stack=null| and |j= +@!cur_l,@!cur_r:halfword; {characters before and after the cursor} +@!cur_q:pointer; {where a ligature should be detached} +@!lig_stack:pointer; {unfinished business to the right of the cursor} +@!ligature_present:boolean; {should a ligature node be made for |cur_l|?} +@!lft_hit,@!rt_hit:boolean; {did we hit a ligature with a boundary character?} + +@ @d append_charnode_to_t(#)== begin link(t):=get_avail; t:=link(t); + font(t):=hf; character(t):=#; + end +@d set_cur_r==begin if j= +cur_l:=qi(hu[j]); cur_q:=t; +if j=0 then + begin ligature_present:=init_lig; p:=init_list; + if ligature_present then lft_hit:=init_lft; + while p>null do + begin append_charnode_to_t(character(p)); p:=link(p); + end; + end +else if cur_l= +if cur_l=non_char then + begin k:=bchar_label[hf]; + if k=non_address then goto done@+else q:=font_info[k].qqqq; + end +else begin q:=char_info(hf)(cur_l); + if char_tag(q)<>lig_tag then goto done; + k:=lig_kern_start(hf)(q); q:=font_info[k].qqqq; + if skip_byte(q)>stop_flag then + begin k:=lig_kern_restart(hf)(q); q:=font_info[k].qqqq; + end; + end; {now |k| is the starting address of the lig/kern program} +if cur_rh; + w:=char_kern(hf)(q); goto done; {this kern will be inserted below} + end; + if skip_byte(q)>=stop_flag then + if cur_rh=non_char then goto done + else begin cur_rh:=non_char; goto continue; + end; + k:=k+qo(skip_byte(q))+1; q:=font_info[k].qqqq; + end; +done: + +@ @d wrap_lig(#)==if ligature_present then + begin p:=new_ligature(hf,cur_l,link(cur_q)); + if lft_hit then + begin subtype(p):=2; lft_hit:=false; + end; + if # then if lig_stack=null then + begin incr(subtype(p)); rt_hit:=false; + end; + link(cur_q):=p; t:=p; ligature_present:=false; + end +@d pop_lig_stack==begin if lig_ptr(lig_stack)>null then + begin link(t):=lig_ptr(lig_stack); {this is a charnode for |hu[j+1]|} + t:=link(t); incr(j); + end; + p:=lig_stack; lig_stack:=link(p); free_node(p,small_node_size); + if lig_stack=null then set_cur_r@+else cur_r:=character(lig_stack); + end {if |lig_stack| isn't |null| we have |cur_rh=non_char|} + +@= +wrap_lig(rt_hit); +if w<>0 then + begin link(t):=new_kern(w); t:=link(t); w:=0; + end; +if lig_stack>null then + begin cur_q:=t; cur_l:=character(lig_stack); ligature_present:=true; + pop_lig_stack; goto continue; + end + +@ @= +begin if cur_l=non_char then lft_hit:=true; +if j=n then if lig_stack=null then rt_hit:=true; +check_interrupt; {allow a way out in case there's an infinite ligature loop} +case op_byte(q) of +qi(1),qi(5):begin cur_l:=rem_byte(q); {\.{=:\?}, \.{=:\?>}} + ligature_present:=true; + end; +qi(2),qi(6):begin cur_r:=rem_byte(q); {\.{\?=:}. \.{\?=:>}} + if lig_stack>null then character(lig_stack):=cur_r + else begin lig_stack:=new_lig_item(cur_r); + if j=n then bchar:=non_char + else begin p:=get_avail; lig_ptr(lig_stack):=p; + character(p):=qi(hu[j+1]); font(p):=hf; + end; + end; + end; +qi(3):begin cur_r:=rem_byte(q); {\.{\?=:\?}} + p:=lig_stack; lig_stack:=new_lig_item(cur_r); link(lig_stack):=p; + end; +qi(7),qi(11):begin wrap_lig(false); {\.{\?=:\?>}, \.{\?=:\?>>}} + cur_q:=t; cur_l:=rem_byte(q); ligature_present:=true; + end; +othercases begin cur_l:=rem_byte(q); ligature_present:=true; {\.{=:}} + if lig_stack>null then pop_lig_stack + else if j=n then goto done + else begin append_charnode_to_t(cur_r); incr(j); set_cur_r; + end; + end +endcases; +if op_byte(q)>qi(4) then if op_byte(q)<>qi(7) then goto done; +goto continue; +end +@z +@x module 912 +@!c:ASCII_code; {character temporarily replaced by a hyphen} +@y +@!c:ASCII_code; {character temporarily replaced by a hyphen} +@!c_loc:0..63; {where that character came from} +@!r_count:integer; {replacement count for discretionary} +@z +@x modules 913--918 are to be completely replaced +@y by the following code: +@ When the following code is performed, |hyf[0]| and |hyf[hn]| will be zero. + +@= +repeat l:=j; j:=reconstitute(j,hn,bchar,qi(hyf_char))+1; +if hyphen_passed=0 then + begin link(s):=link(hold_head); + while link(s)>null do s:=link(s); + if odd(hyf[j-1]) then + begin l:=j; hyphen_passed:=j-1; link(hold_head):=null; + end; + end; +if hyphen_passed>0 then + @; +until j>hn; +link(s):=q + +@ @d advance_major_tail==begin major_tail:=link(major_tail); incr(r_count); + end + +@= +begin r:=get_node(small_node_size); +link(r):=link(hold_head); type(r):=disc_node; +major_tail:=r; r_count:=0; +while link(major_tail)>null do advance_major_tail; +i:=hyphen_passed; +@; +@; +@; +end + +@ The new hyphen might combine with the previous character via ligature +or kern. At this point we have |l-1<=i<=j| and |i= +minor_tail:=null; pre_break(r):=null; hyf_node:=new_character(hf,hyf_char); +if hyf_node<>null then + begin incr(i); c:=hu[i]; hu[i]:=hyf_char; free_avail(hyf_node); + end; +while l<=i do + begin l:=reconstitute(l,i,font_bchar[hf],non_char)+1; + if link(hold_head)>null then + begin if minor_tail=null then pre_break(r):=link(hold_head) + else link(minor_tail):=link(hold_head); + minor_tail:=link(hold_head); + while link(minor_tail)>null do minor_tail:=link(minor_tail); + end; + end; +if hyf_node<>null then + begin hu[i]:=c; {restore the character in the hyphen position} + l:=i; decr(i); + end + +@ The synchronization algorithm begins with |l=i+1<=j|. + +@= +minor_tail:=null; post_break(r):=null; c_loc:=0; +if bchar_label[hf]0 then + begin hu[c_loc]:=c; c_loc:=0; + end; + if link(hold_head)>null then + begin if minor_tail=null then post_break(r):=link(hold_head) + else link(minor_tail):=link(hold_head); + minor_tail:=link(hold_head); + while link(minor_tail)>null do minor_tail:=link(minor_tail); + end; + until l>=j; + while l>j do + @; + end + +@ @= +begin j:=reconstitute(j,hn,bchar,non_char)+1; +link(major_tail):=link(hold_head); +while link(major_tail)>null do advance_major_tail; +end + +@ Ligature insertion can cause a word to grow exponentially in size. Therefore +we must test the size of |r_count| here, even though the hyphenated text +was at most 63 characters long. + +@= +if r_count>127 then {we have to forget the discretionary hyphen} + begin link(s):=link(r); link(r):=null; flush_node_list(r); + end +else begin link(s):=r; replace_count(r):=r_count; + end; +s:=major_tail +@z +@x module 1030 +@d main_loop=70 {go here to typeset |cur_chr| in the current font} +@d main_loop_1=71 {like |main_loop|, but |(f,c)| = current font and char} +@d main_loop_2=72 {like |main_loop_1|, but |c| is known to be in range} +@d main_loop_3=73 {like |main_loop_2|, but several variables are set up} +@d append_normal_space=74 {go here to append a normal space between words} +@y +@d main_loop=70 {go here to typeset a string of consecutive characters} +@d main_loop_wrapup=80 {go here to finish a character or ligature} +@d main_loop_move=90 {go here to advance the ligature cursor} +@d main_loop_move_lig=95 {same, when advancing past a generated ligature} +@d main_loop_lookahead=100 {go here to bring in another character, if any} +@d main_lig_loop=110 {go here to check for ligatures or kerning} +@d append_normal_space=120 {go here to append a normal space between words} +@z +@x ibid +label big_switch,reswitch,main_loop,main_loop_1,main_loop_2,main_loop_3, +@y +label big_switch,reswitch,main_loop,main_loop_wrapup, + main_loop_move,main_loop_move+1,main_loop_move+2,main_loop_move_lig, + main_loop_lookahead,main_loop_lookahead+1, + main_lig_loop,main_lig_loop+1,main_lig_loop+2, +@z +@x ibid +@@; +@y +@z +@x ibid +hmode+char_num: begin scan_char_num; cur_chr:=cur_val; goto main_loop; + end; +@y +hmode+char_num: begin scan_char_num; cur_chr:=cur_val; goto main_loop;@+end; +hmode+no_boundary: begin get_x_token; + if (cur_cmd=letter)or(cur_cmd=other_char)or(cur_cmd=char_given)or + (cur_cmd=char_num) then cancel_boundary:=true; + goto reswitch; + end; +@z +@x modules 1032--1040 are all to be replaced +@y by the following code: +@ The following part of the program was first written in a structured +manner, according to the philosophy that ``premature optimization is +the root of all evil.'' Then it was rearranged into pieces of +spaghetti so that the most common actions could proceed with little or +no redundancy. + +The original unoptimized form of this algorithm resembles the +|reconstitute| procedure, which was described earlier in connection with +hyphenation. Again we have an implied ``cursor`` between characters +|cur_l| and |cur_r|. The main difference is that the |lig_stack| can now +contain a charnode as well as pseudo-ligatures; that stack is now +usually nonempty, because the next character of input (if any) has been +appended to it. In |main_control| we have +$$|cur_r|=\cases{|character(lig_stack)|,&if |lig_stack>null|;\cr + |font_bchar[cur_font]|,&otherwise.\cr}$$ +Several additional global variables are needed. + +@= +@!main_f:internal_font_number; {the current font} +@!main_i:four_quarters; {character information bytes for |cur_l|} +@!main_j:four_quarters; {ligature/kern command} +@!main_k:font_index; {index into |font_info|} +@!main_p:pointer; {temporary register for list manipulation} +@!main_s:integer; {space factor value} +@!bchar:halfword; {right boundary character of current font, or |non_char|} +@!false_bchar:halfword; {nonexistent character matching |bchar|, or |non_char|} +@!cancel_boundary:boolean; {should the left boundary be ignored?} +@!ins_disc:boolean; {should we insert a discretionary node?} + +@ The boolean variables of the main loop are normally false, and always reset +to false before the loop is left. That saves us the extra work of initializing +each time. + +@= +ligature_present:=false; cancel_boundary:=false; lft_hit:=false; rt_hit:=false; +ins_disc:=false; + +@ We leave |space_factor| unchanged if |sf_code(cur_chr)=0|; otherwise we +set it to |sf_code(cur_chr)|, except that the space factor never changes +from a value less than 1000 to a value exceeding 1000. The most common +case is |sf_code(cur_chr)=1000|, so we want that case to be fast. + +The overall structure of the main loop is presented here. Some program labels +are inside the individual sections. + +@d adjust_space_factor==@t@>@;@/ + main_s:=sf_code(cur_chr); + if main_s=1000 then space_factor:=1000 + else if main_s<1000 then + begin if main_s>0 then space_factor:=main_s; + end + else if space_factor<1000 then space_factor:=1000 + else space_factor:=main_s + +@= +adjust_space_factor;@/ +main_f:=cur_font; +bchar:=font_bchar[main_f]; false_bchar:=font_false_bchar[main_f]; +if mode>0 then if language<>clang then fix_language; +fast_get_avail(lig_stack); font(lig_stack):=main_f; cur_l:=qi(cur_chr); +character(lig_stack):=cur_l;@/ +cur_q:=tail; +if cancel_boundary then + begin cancel_boundary:=false; main_k:=non_address; + end +else main_k:=bchar_label[main_f]; +if main_k=non_address then goto main_loop_move+2; {no left boundary processing} +cur_r:=cur_l; cur_l:=non_char; +goto main_lig_loop+1; {begin with cursor after left boundary} +@# +main_loop_wrapup:@; +main_loop_move:@; +main_loop_lookahead:@; +main_lig_loop:@; +main_loop_move_lig:@ + +@ If the current horizontal list is empty, the reference to |character(tail)| +here is not strictly legal, since |tail| will be a node freshly returned by +|get_avail|. But this should cause no problem on most implementations, and we +do want the inner loop to be fast. +@^dirty Pascal@> + +A discretionary break is not inserted for an explicit hyphen when we are in +restricted horizontal mode. In particular, this avoids putting discretionary +nodes inside of other discretionaries. + +@d pack_lig(#)== {the parameter is either |rt_hit| or |false|} + begin main_p:=new_ligature(main_f,cur_l,link(cur_q)); + if lft_hit then + begin subtype(main_p):=2; lft_hit:=false; + end; + if # then if lig_stack=null then + begin incr(subtype(main_p)); rt_hit:=false; + end; + link(cur_q):=main_p; tail:=main_p; ligature_present:=false; + end + +@d wrapup(#)==if cur_lnull then + ins_disc:=true; + if ligature_present then pack_lig(#); + if ins_disc then + begin ins_disc:=false; + if mode>0 then tail_append(new_disc); + end; + end + +@= +wrapup(rt_hit) + +@ @= +if lig_stack=null then goto reswitch; +cur_q:=tail; cur_l:=cur_r; {or |character(lig_stack)|} +main_loop_move+1:if not is_char_node(lig_stack) then goto main_loop_move_lig; +main_loop_move+2:if(cur_chrfont_ec[main_f]) then + begin char_warning(main_f,cur_chr); free_avail(lig_stack); goto big_switch; + end; +main_i:=char_info(main_f)(cur_l); +if not char_exists(main_i) then + begin char_warning(main_f,cur_chr); free_avail(lig_stack); goto big_switch; + end; +tail_append(lig_stack) {|main_loop_lookahead| is next} + +@ Here we are at |main_loop_move_lig|. +When we begin this code we have |cur_l=character(lig_stack)| and |cur_q=tail|. + +@= +main_p:=lig_ptr(lig_stack); +if main_p>null then tail_append(main_p); +temp_ptr:=lig_stack; lig_stack:=link(temp_ptr); +free_node(temp_ptr,small_node_size); +main_i:=char_info(main_f)(cur_l); ligature_present:=true; +if lig_stack=null then + if main_p>null then goto main_loop_lookahead + else cur_r:=bchar +else cur_r:=character(lig_stack); +goto main_lig_loop + +@ The result of \.{\\char} can participate in a ligature or kern, so we must +look ahead for it. + +@= +get_next; {set only |cur_cmd| and |cur_chr|, for speed} +if cur_cmd=letter then goto main_loop_lookahead+1; +if cur_cmd=other_char then goto main_loop_lookahead+1; +if cur_cmd=char_given then goto main_loop_lookahead+1; +x_token; {now expand and set |cur_cmd|, |cur_chr|, |cur_tok|} +if cur_cmd=letter then goto main_loop_lookahead+1; +if cur_cmd=other_char then goto main_loop_lookahead+1; +if cur_cmd=char_given then goto main_loop_lookahead+1; +if cur_cmd=char_num then + begin scan_char_num; cur_chr:=cur_val; goto main_loop_lookahead+1; + end; +if cur_cmd=no_boundary then bchar:=non_char; +cur_r:=bchar; lig_stack:=null; goto main_lig_loop; +main_loop_lookahead+1: adjust_space_factor; +fast_get_avail(lig_stack); font(lig_stack):=main_f; +cur_r:=qi(cur_chr); character(lig_stack):=cur_r; +if cur_r=false_bchar then cur_r:=non_char {this prevents spurious ligatures} + +@ Even though comparatively few characters have a lig/kern program, several +of the instructions here count as part of \TeX's inner loop, since a +potentially long sequential search must be performed. For example, tests with +Computer Modern Roman showed that about 40 per cent of all characters +actually encountered in practice had a lig/kern program, and that about four +lig/kern commands were investigated for every such character. + +At the beginning of this code we have |main_i=char_info(main_f)(cur_l)|. + +@= +if char_tag(main_i)<>lig_tag then goto main_loop_wrapup; +main_k:=lig_kern_start(main_f)(main_i); main_j:=font_info[main_k].qqqq; +if skip_byte(main_j)<=stop_flag then goto main_lig_loop+2; +main_k:=lig_kern_restart(main_f)(main_j); +main_lig_loop+1:main_j:=font_info[main_k].qqqq; +main_lig_loop+2:if next_char(main_j)=cur_r then + if skip_byte(main_j)<=stop_flag then + @; +if skip_byte(main_j)=qi(0) then incr(main_k) +else begin if skip_byte(main_j)>=stop_flag then goto main_loop_wrapup; + main_k:=main_k+qo(skip_byte(main_j))+1; + end; +goto main_lig_loop+1 + +@ When a ligature or kern instruction matches a character, we know from +|read_font_info| that the character exists in the font, even though we +haven't verified its existence in the normal way. + +This section could be made into a subroutine, if the code inside +|main_control| needs to be shortened. + +\chardef\?='174 % vertical line to indicate character retention + +@= +begin if op_byte(main_j)>=kern_flag then + begin wrapup(rt_hit); + tail_append(new_kern(char_kern(main_f)(main_j))); goto main_loop_move; + end; +if cur_l=non_char then lft_hit:=true +else if lig_stack=null then rt_hit:=true; +check_interrupt; {allow a way out in case there's an infinite ligature loop} +case op_byte(main_j) of +qi(1),qi(5):begin cur_l:=rem_byte(main_j); {\.{=:\?}, \.{=:\?>}} + main_i:=char_info(main_f)(cur_l); ligature_present:=true; + end; +qi(2),qi(6):begin cur_r:=rem_byte(main_j); {\.{\?=:}, \.{\?=:>}} + if lig_stack=null then {right boundary character is being consumed} + begin lig_stack:=new_lig_item(cur_r); bchar:=non_char; + end + else if is_char_node(lig_stack) then {|link(lig_stack)=null|} + begin main_p:=lig_stack; lig_stack:=new_lig_item(cur_r); + lig_ptr(lig_stack):=main_p; + end + else character(lig_stack):=cur_r; + end; +qi(3):begin cur_r:=rem_byte(main_j); {\.{\?=:\?}} + main_p:=lig_stack; lig_stack:=new_lig_item(cur_r); + link(lig_stack):=main_p; + end; +qi(7),qi(11):begin wrapup(false); {\.{\?=:\?>}, \.{\?=:\?>>}} + cur_q:=tail; cur_l:=rem_byte(main_j); + main_i:=char_info(main_f)(cur_l); ligature_present:=true; + end; +othercases begin cur_l:=rem_byte(main_j); ligature_present:=true; {\.{=:}} + if lig_stack=null then goto main_loop_wrapup + else goto main_loop_move+1; + end +endcases; +if op_byte(main_j)>qi(4) then + if op_byte(main_j)<>qi(7) then goto main_loop_wrapup; +if cur_l a function that returns one of +% four values; you goto a label based on the value returned. +@x module 1042 +begin p:=font_glue[cur_font]; +if p=null then + begin f:=cur_font; p:=new_spec(zero_glue); k:=param_base[f]+space_code; + width(p):=font_info[k].sc; {that's |space(f)|} + stretch(p):=font_info[k+1].sc; {and |space_stretch(f)|} + shrink(p):=font_info[k+2].sc; {and |space_shrink(f)|} + font_glue[f]:=p; +@y +begin main_p:=font_glue[cur_font]; +if main_p=null then + begin main_p:=new_spec(zero_glue); main_k:=param_base[cur_font]+space_code; + width(main_p):=font_info[main_k].sc; {that's |space(cur_font)|} + stretch(main_p):=font_info[main_k+1].sc; {and |space_stretch(cur_font)|} + shrink(main_p):=font_info[main_k+2].sc; {and |space_shrink(cur_font)|} + font_glue[cur_font]:=main_p; +@z +@x module 1045 +any_mode(relax),vmode+spacer,mmode+spacer,mmode+no_boundary:do_nothing; +@y +any_mode(relax),vmode+spacer,mmode+spacer:do_nothing; +@z +@x module 1090 + vmode+ex_space:@t@>@;@/ +@y + vmode+ex_space,vmode+no_boundary:@t@>@;@/ +@z +@x module 1322 +dump_int(font_glue[k]);@/ +@y +dump_int(font_glue[k]);@/ +dump_int(bchar_label[k]); +dump_int(font_bchar[k]); +dump_int(font_false_bchar[k]);@/ +@z +@x module 1323 +undump(min_halfword)(lo_mem_max)(font_glue[k]);@/ +@y +undump(min_halfword)(lo_mem_max)(font_glue[k]);@/ +undump(0)(font_mem_size)(bchar_label[k]); +undump(min_quarterword)(non_char)(font_bchar[k]); +undump(min_quarterword)(non_char)(font_false_bchar[k]); +@z + +363. New \inputlineno feature desired by Spivak +@x module 416 gets a new definition and a new statement +@y +@d input_line_no_code=glue_val+1 {code for \.{\\inputlineno}} +primitive("inputlineno",last_item,input_line_no_code); +@!@:input_line_no_}{\.{\\inputlineno} primitive@> +@z and module 417 changes in the obvious way +@x module 424 gets new code at the beginning +@y +if cur_chr>glue_val then + begin cur_val:=line; cur_val_level:=int_val; + end +else +@z + +364. New feature \holdinginserts suggested by Mittelbach. +@x modules 236--238 get a new integer parameter +@d int_pars=53 {total number of integer parameters} +@y +@d holding_inserts_code=53 {do not remove insertion nodes from \.{\\box255}} +@d int_pars=54 {total number of integer parameters} +@z and appropriate further lines are added to match all the other parameters +@x module 1014 +@; +q:=hold_head; link(q):=null; prev_p:=page_head; p:=link(prev_p); +while p<>best_page_break do + begin if type(p)=ins_node then @ +@y +if holding_inserts<=0 then + @; +q:=hold_head; link(q):=null; prev_p:=page_head; p:=link(prev_p); +while p<>best_page_break do + begin if type(p)=ins_node then + begin if holding_inserts<=0 then + @; + end +@z +% also insert begin...end around the Pascal code of module 1018 + +365. New \badness feature (which I'd been resisting for years) +@x module 416 gets a new definition and a new statement +@y +@d badness_code=glue_val+2 {code for \.{\\badness}} +primitive("badness",last_item,badness_code); +@!@:badness_}{\.{\\badness} primitive@> +@z and module 417 changes in the obvious way +@x module 424 (the new code just added in #363) + begin cur_val:=line; cur_val_level:=int_val; +@y + begin if cur_chr=input_line_no_code then cur_val:=line + else cur_val:=last_badness; {|cur_chr=badness_code|} + cur_val_level:=int_val; +@z +@x module 646 gets a new global variable +@y +@!last_badness:integer; {badness of the most recently packaged box} +@z +@x module 648 +@ @=adjust_tail:=null; +@y +@ @=adjust_tail:=null; last_badness:=0; +@z +@x modules 649 and 668 +@!b:integer; {badness of the new box} +begin r:=get_node(box_node_size); type(r):=hlist_node; +@y (except it's vlist_node in 668) +begin last_badness:=0; r:=get_node(box_node_size); type(r):=hlist_node; +@z (except it's vlist_node in 668) +% change b to last_badness in modules 660&674 (4 times), 667&678 (3 times) +@x modules 658 and 673 +if (hbadnessnull) then +@y (except it's vbadness in 673) +if o=normal then if list_ptr(r)<>null then +@z +@x modules 664 and 676 + begin set_glue_ratio_one(glue_set(r)); {this is the maximum shrinkage} +@y + begin last_badness:=1000000; + set_glue_ratio_one(glue_set(r)); {use the maximum shrinkage} +@z +@x ibid +else if (hbadness<100)and(o=normal)and(list_ptr(r)<>null) then +@y (except it's vbadness in 676) +else if o=normal then if list_ptr(r)<>null then +@z + +366. New \emergencystretch feature +@x modules 247--248 get a new dimen parameter +@d dimen_pars=20 {total number of dimension parameters} +@y +@d emergency_stretch_code=20 {reduces badnesses on final pass of line-breaking} +@d dimen_pars=21 {total number of dimension parameters} +@z and appropriate further lines are added to match all the other parameters +@x module 828 +@!second_pass:boolean; {is this our second attempt to break this paragraph?} +@y +@!second_pass:boolean; {is this our second attempt to break this paragraph?} +@!final_pass:boolean; {is this our final attempt to break this paragraph?} +@z +% change second_pass to final_pass in modules 854 and 873 +@x module 863 + second_pass:=false; + end +else begin threshold:=tolerance; second_pass:=true; +@y + second_pass:=false; final_pass:=false; + end +else begin threshold:=tolerance; second_pass:=true; + final_pass:=(emergency_stretch<=0); +@z +@x ibid + @!stat if tracing_paragraphs>0 then print_nl("@@secondpass");@;@+tats@/ + threshold:=tolerance; second_pass:=true; {if at first you don't + succeed, \dots} +@y + if not second_pass then + begin@!stat if tracing_paragraphs>0 then print_nl("@@secondpass");@;@+tats@/ + threshold:=tolerance; second_pass:=true; final_pass:=(emergency_stretch<=0); + end {if at first you don't succeed, \dots} + else begin @!stat if tracing_paragraphs>0 then + print_nl("@@finalpass");@;@+tats@/ + background[2]:=background[2]+emergency_stretch; final_pass:=true; + end; +@z + +367. New \errorcontextlines feature suggested by a TUG participant +@x modules 236--238 get a new integer parameter +@d int_pars=54 {total number of integer parameters} +@y +@d error_context_lines_code=54 {maximum intermediate line pairs shown} +@d int_pars=55 {total number of integer parameters} +@z and appropriate further lines are added to match all the other parameters +@x module 311 +@@/ +begin base_ptr:=input_ptr; input_stack[base_ptr]:=cur_input; + {store current state} +loop@+begin cur_input:=input_stack[base_ptr]; {enter into the context} + @; + if (state<>token_list) then + if (name>17) or (base_ptr=0) then goto done; +@y +@!nn:integer; {number of contexts shown so far, less one} +@!bottom_line:boolean; {have we reached the final context to be shown?} +@@/ +begin base_ptr:=input_ptr; input_stack[base_ptr]:=cur_input; + {store current state} +nn:=-1; bottom_line:=false; +loop@+begin cur_input:=input_stack[base_ptr]; {enter into the context} + if (state<>token_list) then + if (name>17) or (base_ptr=0) then bottom_line:=true; + if (base_ptr=input_ptr)or bottom_line or(nn + else if nn=error_context_lines then + begin print_nl("..."); incr(nn); {omitted if |error_context_lines<0|} + end; + if bottom_line then goto done; +@z +% also insert begin...end around the Pascal code of module 312 +% and add the statement "incr(nn)" to that module + +368. char_warning inside hyphenation could clobber old_setting +@x module 863 +done: @!stat if tracing_paragraphs>0 then end_diagnostic(true);@;@+tats@/ +@y +done: @!stat if tracing_paragraphs>0 then + begin end_diagnostic(true); normalize_selector; + end;@+tats@/ +@z + +369. Make ".fmt" more easily switchable (Don Hosek). +@x module 520 gets a new definition +@y +@d format_extension=".fmt" {the extension, as a \.{WEB} constant} +@z now replace ".fmt" by format_extension in modules 529 and 1328. + +370. Possible range check on weird nullfont (Breitenlohner, 16 Oct 89). +@x module 565 +if (bc>ec+1)or(ec>255) then abort; +@y +if (bc>ec+1)or(ec>255) then abort; +if bc>255 then {|bc=256| and |ec=255|} + begin bc:=1; ec:=0; + end; +@z + +371. (I sincerely hope that there won't be any more) + +* Possibly nice ideas that will not be implemented + +. Classes of marks analogous to classes of insertions + +. \showcontext to show the current location without stopping for error + +. \everyeof to insert tokens before an \input file ends + (strange example: \everyeof{\noexpand} will allow things + like \xdef\a{\input foo}!) + +. generalize \leftskip and \rightskip to token lists (problems with + displayed math then) + +. generalize \widowline and \clubline to go further into a paragraph + +* Bad ideas that will not be implemented + +. several people want to be able to remove arbitrary elements of lists, + but that must never be done because some of those elements (e.g. kerns + for accents) depend on floating point arithmetic + +. if anybody wants letter spacing desperately they should put it in their own + private version (e.g. generalize the hpack routine) and NOT call it TeX. diff --git a/info/digests/tex-implementors/023 b/info/digests/tex-implementors/023 new file mode 100644 index 0000000000..ecd29551b0 --- /dev/null +++ b/info/digests/tex-implementors/023 @@ -0,0 +1,1229 @@ +Date: 13 Mar 89 Message No: 023 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: Updates to TEX82.BUG, MF84.BUG + + +The last message was sent to this list two months ago, and though some +additional activity has occurred, I've been delayed in reporting it. +In fact, I'm not sure that what is included here is the latest news, +not having seen my paper mail for more than a week, and Don Knuth is no +longer corresponding with anyone electronically. (I'm preparing this +message from home, having returned from a standards meeting accompanied +by a cold germ.) + +When last I heard from Don, he reported that though a few "trivial" (his +word) bugs had been detected, there was nothing he considered serious +enough to delay his release of TeX 3.0 on the Ides of March -- two days +hence. So, barring the discovery of something of which I'm not aware, I +expect that by the end of this week there will be a new version of TEX.MF +at labrea, with a few inconsequential changes from version 2.993. I will +try to send the information as soon as possible, but I am facing a couple +of deadlines at the Math Society, and for the next week I have promised +to go into seclusion (the AMS thinks it's a vacation) to help prepare the +data for a 10-volume index to TUGboat. + +Enclosed are updates to the files TEX82.BUG and MF84.BUG. Owing to the +quantity of this material and the proximity of the Ides of March, lists +of differences between the new and old WEB files will be sent separately. + + +######################################################################## + +Updates to TEX82.BUG + +% note change in comment on #339; the change code remains the same + +339. \def\\#1{}\input a\\\z failed (Robert Messer, 24Apr88) + ... + +373. Allow multiple hyphenmins in the same paragraph (Mike Ferguson). +@x module 212, two new fields for list_state_record +@y + @!lhm_field,@!rhm_field: quarterword; +@z +@x module 213, two new macros to access those fields +@y +@d lhmin==cur_list.lhm_field {\.{\\lefthyphenmin} at start of paragraph} +@d rhmin==cur_list.rhm_field {\.{\\righthyphenmin} at start of paragraph} +@z +@x module 215, two new initializations +@y +lhmin:=0; rhmin:=0; +@z +@x module 218 + if nest[p].ml_field<0 then print(" (\output routine)"); +@y + if m=hmode then@+if(nest[p].lhm_field<>2)or(nest[p].rhm_field<>3)then + begin print(" (hyphenmin "); print_int(nest[p].lhm_field); print_char(","); + print_int(nest[p].rhm_field); print_char(")"); + end; + if nest[p].ml_field<0 then print(" (\output routine)"); +@z +@x module 891 +l_hyf:=left_hyphen_min-1;@+if l_hyf<0 then l_hyf:=0; +r_hyf:=right_hyphen_min-1;@+if r_hyf<0 then r_hyf:=0; +min_hyf:=l_hyf+r_hyf+2; cur_lang:=0; +@y +l_hyf:=lhmin; r_hyf:=rhmin; cur_lang:=0; +@z +@x module 892 +@!l_hyf,@!r_hyf,@!min_hyf:integer; {limits on fragment sizes} +@y +@!l_hyf,@!r_hyf:integer; {limits on fragment sizes} +@z +@x module 894 +begin if min_hyf>63 then goto done1; +prev_s:=cur_p; s:=link(prev_s); +if s<>null then + begin @; + @; + @; +@y +begin prev_s:=cur_p; s:=link(prev_s); +if s<>null then + begin @; + if l_hyf+r_hyf>63 then goto done1; + @; + @; +@z +@x module 899 +if hn=63 then norm_min:=63@+ +else norm_min:=h; +end; +@z +@x module 1091 then uses the new subroutine +push_nest; mode:=hmode; space_factor:=1000; clang:=0; +@y +lhmin:=norm_min(left_hyphen_min); rhmin:=norm_min(right_hyphen_min); +push_nest; mode:=hmode; space_factor:=1000; clang:=0; +@z +@x module 1341 +@d stored_language(#)==mem[#+1].int {language number, in the range |0..255|} +@y +@d what_lang(#)==link(#+1) {language number, in the range |0..255|} +@d what_lhm(#)==type(#+1) {minimum left fragment, in the range |1..63|} +@d what_rhm(#)==subtype(#+1) {minimum right fragment, in the range |1..63|} +@z +@x module 1356 + print_int(stored_language(p)); +@y + print_int(what_lang(p)); print(" (hyphenmin "); + print_int(what_lhm(p)); print_char(","); + print_int(what_rhm(p)); print_char(")"); +@z +@x modules 1362 and 1363 +@ @= +if subtype(cur_p)=language_node then cur_lang:=stored_language(cur_p) + +@ @= +if subtype(s)=language_node then cur_lang:=stored_language(s) +@y +@ @d adv_past(#)==@+if subtype(#)=language_node then + begin cur_lang:=what_lang(#); l_hyf:=what_lhm(#); r_hyf:=what_rhm(#);@+end + +@=@+ +adv_past(cur_p) + +@ @=@+ +adv_past(s) +@z +@x module 1376 + stored_language(tail):=l; clang:=l; +@y + what_lang(tail):=l; clang:=l;@/ + what_lhm(tail):=norm_min(left_hyphen_min); + what_rhm(tail):=norm_min(right_hyphen_min); +@z +@x module 1377 + stored_language(tail):=clang; +@y + what_lang(tail):=clang; + what_lhm(tail):=norm_min(left_hyphen_min); + what_rhm(tail):=norm_min(right_hyphen_min); +@z + +374. Make \par and end_template definitely non-character (Marc van Leeuwen) +@x module 14 gets a new line +@y +if mem_top<256+11 then bad:=7; {we will want |null_list>255|} +@z +@x module 334 +primitive("par",par_end,0); par_loc:=cur_val; par_token:=cs_token_flag+par_loc; +@y +primitive("par",par_end,256); {cf. |scan_file_name|} +par_loc:=cur_val; par_token:=cs_token_flag+par_loc; +@z + +375. Alignments must be more robust to prevent crashes (Marc van Leeuwen) +@x module 324 +else if token_type=u_template then align_state:=0; +@y +else if token_type=u_template then + if align_state>500000 then align_state:=0 + else fatal_error("(interwoven alignment preambles are not allowed)"); +@.interwoven alignment preambles...@> +@z +@x module 782 +if (cur_cmd=assign_glue)and(cur_chr=glue_base+tab_skip_code) then +@y +if cur_cmd=endv then + fatal_error("(interwoven alignment preambles are not allowed)"); +@.interwoven alignment preambles...@> +if (cur_cmd=assign_glue)and(cur_chr=glue_base+tab_skip_code) then +@z +@x module 791 +p:=link(q); +@y +if align_state<500000 then + fatal_error("(interwoven alignment preambles are not allowed)"); +@.interwoven alignment preambles...@> +p:=link(q); +@z + +376. Avoid kern removal in discretionary breaks (Marc van Leeuwen) +@x module 815 +label done,done1,done2,done3,done4,continue; +@y +label done,done1,done2,done3,done4,done5,continue; +@z +@x module 866 +glue_node: begin @; + @; +@y +glue_node: begin @; +@z +@x ibid +disc_node: @; +@y +disc_node: @; +@z +@x ibid +end +@y +done5:end +@z +Combine modules 868 and 869 into a single module, with a semicolon between. +@x module 870 (which becomes module 869) gets ... in its title +@y and the following new code just before its final "end": +r:=replace_count(cur_p); s:=link(cur_p); +while r>0 do + begin @; + decr(r); s:=link(s); + end; +prev_p:=cur_p; cur_p:=s; goto done5; +@z +@x Now module 871 becomes 870, and we add a new (very similar) module 871: +@y +@ @= +if is_char_node(s) then + begin f:=font(s); + act_width:=act_width+char_width(f)(char_info(f)(character(s))); + end +else case type(s) of + ligature_node: begin f:=font(lig_char(s)); + act_width:=act_width+ + char_width(f)(char_info(f)(character(lig_char(s)))); + end; + hlist_node,vlist_node,rule_node,kern_node: + act_width:=act_width+width(s); + othercases confusion("disc4") +@:this can't happen disc4}{\quad disc4@> + endcases +@z +@x module 877 +@!disc_break:boolean; {was the current break at a discretionary node?} +@y +@!disc_break:boolean; {was the current break at a discretionary node?} +@!post_disc_break:boolean; {and did it have a nonempty post-break part?} +@z +@x ibid +if cur_p<>null then @; +@y +if cur_p<>null then if not post_disc_break then + @; +@z +@x module 881 +q:=cur_break(cur_p); disc_break:=false; +@y +q:=cur_break(cur_p); disc_break:=false; post_disc_break:=false; +@z +@x module 883 + if not is_char_node(s) then if next_break(cur_p)<>null then + if cur_break(next_break(cur_p))=s then s:=r; +@y that subtle bug is no longer possible so we can remove the code +@z +@x module 884 +link(s):=r; r:=post_break(q); post_break(q):=null; +@y +link(s):=r; r:=post_break(q); post_break(q):=null; post_disc_break:=true; +@z + +377. Pick up a few discretionary hyphens that were lost because of +the new (cautious) algorithm. +@x module 914 +@ @d advance_major_tail==begin major_tail:=link(major_tail); incr(r_count); + end + +@= +begin r:=get_node(small_node_size); +@y +@ In this repeat loop we will insert another discretionary if |hyf[j-1]| is +odd, after both branches of the previous discretionary end at position |j-1|. +Strictly speaking, we aren't justified in doing this, because we don't know +that a hyphen after |j-1| is truly independent of those branches. But in almost +all applications we would rather not lose a potentially valuable hyphenation +point. (Consider the word `difficult', where the letter `c' is in position |j|.) + +@d advance_major_tail==begin major_tail:=link(major_tail); incr(r_count); + end + +@= +repeat r:=get_node(small_node_size); +@z +@x ibid +i:=hyphen_passed; +@y +i:=hyphen_passed; hyf[i]:=0; +@z +@x ibid +end +@y +hyphen_passed:=j-1; link(hold_head):=null; +until not odd(hyf[j-1]) +@z + +378. Undumped trie must also be dumpable again (Breitenlohner, 11 Dec 89) +@x module 1325 +undump_size(0)(trie_size)('trie size')(j); {|trie_max|} +for k:=0 to j do undump_hh(trie[k]); +undump_size(0)(trie_op_size)('trie op size')(j); {|trie_op_ptr|} +@y +undump_size(0)(trie_size)('trie size')(j); @+init trie_max:=j;@+tini +for k:=0 to j do undump_hh(trie[k]); +undump_size(0)(trie_op_size)('trie op size')(j); @+init trie_op_ptr:=j;@+tini +@z +@x ibid +k:=256; +while j>0 do + begin undump(0)(k-1)(k); undump(1)(j)(x); j:=j-x; op_start[k]:=qo(j); +@y +init for k:=0 to 255 do trie_used[k]:=min_quarterword;@+tini +k:=256; +while j>0 do + begin undump(0)(k-1)(k); undump(1)(j)(x);@+init trie_used[k]:=qi(x);@+tini + j:=j-x; op_start[k]:=qo(j); +@z + +379. Allow output routine to access page totals. (Suggested by Frank +Mittelbach and Chris Rowley, December 1989) +@x module 421 +begin if page_contents=empty then +@y +begin if (page_contents=empty) and (not output_active) then +@z + +380. (I sincerely hope that there won't be any more) + + +######################################################################## + +Updates to MF84.BUG + +% The following text has been added at the top of the file; the last +% two lines of this block correspond to the first two lines of the +% old file, with some changes. + +This file has been updated periodically ever since METAFONT84 was born. +What you are about to read is "authentic source material" from the +early days before the program converged. Module numbers on the first +entries may bear little relation to those in Volume D. + +Entries are in chronological order; thus the most recent news appears +at the bottom of the file. + +------------------------------------------------------------------------------- + +(rough list of all bugs found in MF after it passed syntax check) +Starting with Version -100.0: [Mar 27, first run, about 00:30] + + #################### + +% New material. + +547. String startup problems corresponding to TeX change 355 (17 Jul 89) +@x module 30 (Warning: This affects most change files!) + overflow("buffer size",buf_size); +@:METAFONT capacity exceeded buffer size}{\quad buffer size@> +@y + @; +@z +@x module 34 +consist of the remainder of the command line, after the part that invoked \MF. +@y +consist of the remainder of the command line, after the part that invoked \MF. + +The first line is special also because it may be read before \MF\ has +input a base file. In such cases, normal error messages cannot yet +be given. The following code uses concepts that will be explained later. + +@= +if base_ident=0 then + begin write_ln(term_out,'Buffer size exceeded!'); goto final_end; +@.Buffer size exceeded@> + end +else begin cur_input.loc_field:=first; cur_input.limit_field:=last-1; + overflow("buffer size",buf_size); +@:METAFONT capacity exceeded buffer size}{\quad buffer size@> + end +@z +@x module 1193 +k:=pool_ptr-4; undump_four_ASCII +@y +k:=pool_ptr-4; undump_four_ASCII; +init_str_ptr:=str_ptr; init_pool_ptr:=pool_ptr;@/ +max_str_ptr:=str_ptr; max_pool_ptr:=pool_ptr +@z +@x module 1204 +tini@/ +@y +init_str_ptr:=str_ptr; init_pool_ptr:=pool_ptr;@/ +max_str_ptr:=str_ptr; max_pool_ptr:=pool_ptr; fix_date_and_time; +tini@/ +@z +@x module 1204 +init_str_ptr:=str_ptr; init_pool_ptr:=pool_ptr;@/ +max_str_ptr:=str_ptr; max_pool_ptr:=pool_ptr;@/ +@y +@z + +548. Major changes to allow 8-bit input, cf. TeX82 #359 (11 Sep 89). +@x module 18 +@!ASCII_code=0..127; {seven-bit numbers} +@y +@!ASCII_code=0..255; {eight-bit numbers} +@z +@x module 19 +@d last_text_char=127 {ordinal number of the largest element of |text_char|} + +@= +@!i:0..last_text_char; +@y +@d last_text_char=255 {ordinal number of the largest element of |text_char|} + +@= +@!i:integer; +@z +@x module 21 +xchr[0]:=' '; xchr[@'177]:=' '; + {ASCII codes 0 and |@'177| do not appear in text} +@y +@z +@x module 22 +for i:=1 to @'37 do xchr[i]:=' '; +@y changing ' ' to chr(i) here will allow all 8-bit characters to get in +for i:=0 to @'37 do xchr[i]:=' '; +for i:=@'177 to @'377 do xchr[i]:=' '; +@z +@x module 23 +for i:=1 to @'176 do xord[xchr[i]]:=i; +@y +for i:=@'200 to @'377 do xord[xchr[i]]:=i; +for i:=0 to @'176 do xord[xchr[i]]:=i; +@z +@x module 37 +@= +@!pool_pointer = 0..pool_size; {for variables that point into |str_pool|} +@!str_number = 0..max_strings; {for variables that point into |str_start|} + +@ @= +@!str_pool:packed array[pool_pointer] of ASCII_code; {the characters} +@y [OK to make si(#)==#-128 and so(#)==#+128 (without parens) in change files] +Some \PASCAL\ compilers won't pack integers into a single byte unless the +integers lie in the range |-128..127|. To accommodate such systems +we access the string pool only via macros that can easily be redefined. + +@d si(#) == # {convert from |ASCII_code| to |packed_ASCII_code|} +@d so(#) == # {convert from |packed_ASCII_code| to |ASCII_code|} + +@= +@!pool_pointer = 0..pool_size; {for variables that point into |str_pool|} +@!str_number = 0..max_strings; {for variables that point into |str_start|} +@!packed_ASCII_code = 0..255; {elements of |str_pool| array} + +@ @= +@!str_pool:packed array[pool_pointer] of packed_ASCII_code; {the characters} +@z +@x module 41 +begin str_pool[pool_ptr]:=#; incr(pool_ptr); +@y +begin str_pool[pool_ptr]:=si(#); incr(pool_ptr); +@z +@x module 45 + begin if str_pool[j]<>buffer[k] then +@y + begin if so(str_pool[j])<>buffer[k] then +@z +@x module 47 +var k,@!l:0..127; {small indices or counters} +@y +var k,@!l:0..255; {small indices or counters} +@z +@x module 47 +@; +@y +@; +@z +@x module 48 +@ @= +for k:=0 to 127 do + begin if (@) then + begin append_char("^"); append_char("^"); + if k<@'100 then append_char(k+@'100) + else append_char(k-@'100); +@y +@ @d app_lc_hex(#)==l:=#; + if l<10 then append_char(l+"0)@+else append_char(l-10+"a") + +@= +for k:=0 to 255 do + begin if (@) then + begin append_char("^"); append_char("^"); + if k<@'100 then append_char(k+@'100) + else if k<@'200 then append_char(k-@'100) + else begin app_lc_hex(k div 16); app_lc_hex(k mod 16); + end; +@z +@x module 59 + begin print_char(str_pool[j]); incr(j); +@y + begin print_char(so(str_pool[j])); incr(j); +@z +@x module 60 + begin print(str_pool[j]); incr(j); +@y + begin print(so(str_pool[j])); incr(j); +@z +@x module 85 + begin if str_pool[j]<>"%" then print(str_pool[j]) + else if j+1=str_start[err_help+1] then print_ln + else if str_pool[j+1]<>"%" then print_ln +@y + begin if str_pool[j]<>si("%") then print(so(str_pool[j])) + else if j+1=str_start[err_help+1] then print_ln + else if str_pool[j+1]<>si("%") then print_ln +@z +@x module 199 +char_class[127]:=invalid_class; +@y +for k:=127 to 255 do char_class[k]:=invalid_class; +@z +@x module 200 +@d hash_is_full == (hash_used=1) {test if all positions are occupied} +@d eq_type(#) == eqtb[#].lh {the current ``meaning'' of a symbolic token} +@d equiv(#) == eqtb[#].rh {parametric part of a token's meaning} +@d hash_base=129 {hashing actually starts here} +@y [incidentally I fixed a bug re hash overflow here] +@d eq_type(#) == eqtb[#].lh {the current ``meaning'' of a symbolic token} +@d equiv(#) == eqtb[#].rh {parametric part of a token's meaning} +@d hash_base=257 {hashing actually starts here} +@d hash_is_full == (hash_used=hash_base) {are all positions occupied?} +@z +@x module 210 +for j:=0 to l-1 do buffer[j]:=str_pool[k+j]; +cur_sym:=id_lookup(0,l);@/ +if s>=128 then {we don't want to have the string twice} +@y +for j:=0 to l-1 do buffer[j]:=so(str_pool[k+j]); +cur_sym:=id_lookup(0,l);@/ +if s>=256 then {we don't want to have the string twice} +@z +@x module 223 +begin c:=char_class[str_pool[str_start[r]]]; +@y +begin c:=char_class[so(str_pool[str_start[r]])]; +@z +@x module 717 + begin buffer[first]:=str_pool[j]; incr(j); incr(first); +@y + begin buffer[first]:=so(str_pool[j]); incr(j); incr(first); +@z +@x module 774 +for j:=str_start[a] to str_start[a+1]-1 do append_to_name(str_pool[j]); +for j:=str_start[n] to str_start[n+1]-1 do append_to_name(str_pool[j]); +for j:=str_start[e] to str_start[e+1]-1 do append_to_name(str_pool[j]); +@y +for j:=str_start[a] to str_start[a+1]-1 do append_to_name(so(str_pool[j])); +for j:=str_start[n] to str_start[n+1]-1 do append_to_name(so(str_pool[j])); +for j:=str_start[e] to str_start[e+1]-1 do append_to_name(so(str_pool[j])); +@z +@x module 912 + else begin cur_exp:=round_unscaled(cur_exp) mod 128; cur_type:=string_type; + if cur_exp<0 then cur_exp:=cur_exp+128; +@y + else begin cur_exp:=round_unscaled(cur_exp) mod 256; cur_type:=string_type; + if cur_exp<0 then cur_exp:=cur_exp+256; +@z +@x module 913 + else n:=str_pool[str_start[cur_exp]] +@y + else n:=so(str_pool[str_start[cur_exp]]) +@z +@x ibid + begin m:=str_pool[k]; +@y + begin m:=so(str_pool[k]); +@z +@x module 976 +for k:=str_start[a] to str_start[a+1]-1 do append_char(str_pool[k]); +for k:=str_start[b] to str_start[b+1]-1 do append_char(str_pool[k]); +@y +for k:=str_start[a] to str_start[a+1]-1 do append_char(so(str_pool[k])); +for k:=str_start[b] to str_start[b+1]-1 do append_char(so(str_pool[k])); +@z +@x module 977 + for k:=str_start[s]+b-1 downto str_start[s]+a do append_char(str_pool[k]) +else for k:=str_start[s]+a to str_start[s]+b-1 do append_char(str_pool[k]); +@y + for k:=str_start[s]+b-1 downto str_start[s]+a do append_char(so(str_pool[k])) +else for k:=str_start[s]+a to str_start[s]+b-1 do append_char(so(str_pool[k])); +@z +@x module 1103 + begin c:=str_pool[str_start[cur_exp]]; goto found; +@y + begin c:=so(str_pool[str_start[cur_exp]]); goto found; +@z +@x module 1160 + for k:=str_start[s] to str_start[s+1]-1 do gf_out(str_pool[k]); + end; +if t<>0 then for k:=str_start[t] to str_start[t+1]-1 do gf_out(str_pool[k]); +@y + for k:=str_start[s] to str_start[s+1]-1 do gf_out(so(str_pool[k])); + end; +if t<>0 then for k:=str_start[t] to str_start[t+1]-1 do gf_out(so(str_pool[k])); +@z +@x module 1192 + w.b0:=str_pool[k]; w.b1:=str_pool[k+1]; + w.b2:=str_pool[k+2]; w.b3:=str_pool[k+3]; +@y [often qi(so(x))=x, but not e.g. when "quarterwords" are two bytes] + w.b0:=qi(so(str_pool[k])); w.b1:=qi(so(str_pool[k+1])); + w.b2:=qi(so(str_pool[k+2])); w.b3:=qi(so(str_pool[k+3])); +@z +@x module 1193 + str_pool[k]:=w.b0; str_pool[k+1]:=w.b1; + str_pool[k+2]:=w.b2; str_pool[k+3]:=w.b3 +@y + str_pool[k]:=si(qo(w.b0)); str_pool[k+1]:=si(qo(w.b1)); + str_pool[k+2]:=si(qo(w.b2)); str_pool[k+3]:=si(qo(w.b3)) +@z + +549. Make ".base" more easily switchable (see TeX82 log #369). +@x module 775 gets a new definition +@y +@d base_extension=".base" {the extension, as a \.{WEB} constant} +@z now replace ".base" by base_extension in modules 784 and 1200. + +550. "This can't happen" happened because of nonmonotonic rounding + (bug found by Mark Eklof, fixed 7 Oct 89) +@x module 411 +left_x(r):=x_coord(r); +@y +left_x(r):=x_coord(r); +if right_x(p)>x_coord(r) then right_x(p):=x_coord(r); + {we always have |x_coord(p)<=right_x(p)|} +@z +@x ibid +else if x_coord(r)>dest_x then x_coord(r):=dest_x; +@y +else begin if x_coord(r)>dest_x then + begin x_coord(r):=dest_x; left_x(r):=-x_coord(r); right_x(r):=x_coord(r); + end; + if left_x(q)>dest_x then left_x(q):=dest_x + else if left_x(q)x_coord(s) then left_x(q):=-x_coord(s) +else negate(left_x(q)); +negate(x_coord(s)); right_x(s):=x_coord(s); +@z +@x module 415 +if x_coord(r)>dest_x then x_coord(r):=dest_x +else if x_coord(r)y_coord(r) then right_y(pp):=y_coord(r); + {we always have |y_coord(pp)<=right_y(pp)|} +@z +@x ibid +else if y_coord(r)>dest_y then y_coord(r):=dest_y; +@y +else begin if y_coord(r)>dest_y then + begin y_coord(r):=dest_y; left_y(r):=-y_coord(r); right_y(r):=y_coord(r); + end; + if left_y(qq)>dest_y then left_y(qq):=dest_y + else if left_y(qq)dest_x then x_coord(s):=dest_x +else if x_coord(s)y_coord(s) then left_y(qq):=-y_coord(s) +else negate(left_y(qq)); +negate(y_coord(s)); right_y(s):=y_coord(s); +@z +@x module 424 +if y_coord(r)>dest_y then y_coord(r):=dest_y +else if y_coord(r)dest_x+dest_y then + begin y_coord(r):=dest_x+dest_y-x_coord(p); + if left_y(r)>y_coord(r) then + begin left_y(r):=y_coord(r); + if right_y(p)>y_coord(r) then right_y(p):=y_coord(r); + end; + end; +if x_coord(r)dest_x+dest_y then + x_coord(r):=dest_x+dest_y-y_coord(r); +left_x(r):=x_coord(r); +if right_x(p)>x_coord(r) then right_x(p):=x_coord(r); + {we always have |x_coord(p)<=right_x(p)|} +y_coord(r):=y_coord(r)+x_coord(r); right_y(r):=right_y(r)+x_coord(r);@/ +negate(x_coord(r)); right_x(r):=x_coord(r);@/ +left_y(q):=left_y(q)+left_x(q); negate(left_x(q));@/ +dest_y:=dest_y+dest_x; negate(dest_x); +if right_y(r)>dest_y then right_y(r):=dest_y; +if left_y(q)>dest_y then left_y(q):=dest_y +else if left_y(q)left_y(q) then right_y(r):=left_y(q); +@z +@x ibid +else if x_coord(r)>dest_x then x_coord(r):=dest_x +@y +else begin if x_coord(r)>dest_x then + begin x_coord(r):=dest_x; left_x(r):=-x_coord(r); right_x(r):=x_coord(r); + end; + if left_x(q)>dest_x then left_x(q):=dest_x + else if left_x(q)= +begin split_cubic(r,t,dest_x,dest_y); s:=link(r);@/ +if x_coord(r)+y_coord(s)>dest_x+dest_y then + begin y_coord(s):=dest_x+dest_y-x_coord(r); + if left_y(s)>y_coord(s) then + begin left_y(s):=y_coord(s); + if right_y(r)>y_coord(s) then right_y(r):=y_coord(s); + end; + end; +if x_coord(s)+y_coord(s)>dest_x+dest_y then x_coord(s):=dest_x+dest_y-y_coord(s) +else begin if x_coord(s)x_coord(s) then + begin left_y(q):=left_y(q)+x_coord(s); left_x(q):=-x_coord(s);@+end +else begin left_y(q):=left_y(q)+left_x(q); negate(left_x(q));@+end; +y_coord(s):=y_coord(s)+x_coord(s); right_y(s):=right_y(s)+x_coord(s);@/ +negate(x_coord(s)); right_x(s):=x_coord(s);@/ +dest_y:=dest_y+dest_x; +if right_y(s)>dest_y then right_y(s):=dest_y; +if left_y(q)>dest_y then left_y(q):=dest_y +else if left_y(q)left_y(q) then right_y(s):=left_y(q); +end +@z + +551. Major change for extended ligatures. +@x module 11 (this may affect change files) +@!lig_table_size=300; {maximum number of ligature/kern steps} +@y +@!lig_table_size=5000; {maximum number of ligature/kern steps, must be + at least 255 and at most 32510} +@!max_kerns=500; {maximum number of distinct kern amounts} +@z +@x module 14 gets a new line of code +@y +if(lig_table_size<255)or(lig_table_size>32510)then bad:=7; +@z +@x module 186 +@d lig_kern_token=76 {the operators `\&{kern}' and `\.{=:}'} +@d assignment=77 {the operator `\.{:=}'} +@d colon=78 {the operator `\.:'} +@# +@d comma=79 {the operator `\.,'} +@d end_of_statement==cur_cmd>comma +@d semicolon=80 {the operator `\.;', must be |comma+1|} +@d end_group=81 {end a group (\&{endgroup}), must be |semicolon+1|} +@d stop=82 {end a job (\&{end}, \&{dump}), must be |end_group+1|} +@y +@d lig_kern_token=76 + {the operators `\&{kern}' and `\.{=:}' and `\.{=:\char'174}, etc.} +@d assignment=77 {the operator `\.{:=}'} +@d skip_to=78 {the operation `\&{skipto}'} +@d bchar_label=79 {the operator `\.{\char'174\char'174:}'} +@d double_colon=80 {the operator `\.{::}'} +@d colon=81 {the operator `\.:'} +@# +@d comma=82 {the operator `\.,', must be |colon+1|} +@d end_of_statement==cur_cmd>comma +@d semicolon=83 {the operator `\.;', must be |comma+1|} +@d end_group=84 {end a group (\&{endgroup}), must be |semicolon+1|} +@d stop=85 {end a job (\&{end}, \&{dump}), must be |end_group+1|} +@z +@x module 190 +@d max_given_internal=warning_check +@y +@d boundary_char=41 {the right boundary character for ligatures} +@d max_given_internal=41 +@z +@x module 192 gets two new lines of code +@y +primitive("boundarychar",internal_quantity,boundary_char);@/ +@!@:boundary_char_}{\&{boundarychar} primitive@> +@z +@x and module 193 gets one too +@y +int_name[boundary_char]:="boundarychar"; +@z +@x and module 211 gets several +@y (to be inserted in appropriate places) +primitive("::",double_colon,0); +@!@::: }{\.{::} primitive@> +primitive("||:",bchar_label,0); +@!@:::: }{\.{\char'174\char'174:} primitive@> +primitive("skipto",skip_to,0);@/ +@!@:skip_to_}{\&{skipto} primitive@> +@z +@x as does module 212 +@y +bchar_label:print("||:"); +double_colon:print("::"); +skip_to:print("skipto"); +@z +@x module 1093 has new text (see TeX change 362 for module 545) and also this: +@d stop_bit(#)==lig_kern[#].b0 +@d next_char(#)==lig_kern[#].b1 +@d op_bit(#)==lig_kern[#].b2 +@y +@d skip_byte(#)==lig_kern[#].b0 +@d next_char(#)==lig_kern[#].b1 +@d op_byte(#)==lig_kern[#].b2 +@z +@x module 1096 gets a new definition +@y +@d undefined_label==lig_table_size {an undefined local label} +@z +@x ...and some changed declarations +@!char_remainder:array[eight_bits] of eight_bits; {the |remainder| byte} +@!header_byte:array[1..header_size] of -1..255; + {bytes of the \.{TFM} header, or $-1$ if unset} +@!lig_kern:array[0..lig_table_size] of four_quarters; {the ligature/kern table} +@!nl:0..lig_table_size; {the number of ligature/kern steps so far} +@!kern:array[eight_bits] of scaled; {distinct kerning amounts} +@!nk:0..256; {the number of distinct kerns so far} +@y +@!char_remainder:array[eight_bits] of 0..lig_table_size; {the |remainder| byte} +@!header_byte:array[1..header_size] of -1..255; + {bytes of the \.{TFM} header, or $-1$ if unset} +@!lig_kern:array[0..lig_table_size] of four_quarters; {the ligature/kern table} +@!nl:0..32767-256; {the number of ligature/kern steps so far} +@!kern:array[0..max_kerns] of scaled; {distinct kerning amounts} +@!nk:0..max_kerns; {the number of distinct kerns so far} +@z +@x ...and some new declarations +@y +@!skip_table:array[eight_bits] of 0..lig_table_size; {local label status} +@!lk_started:boolean; {has there been a lig/kern step in this command yet?} +@!bchar:integer; {right boundary character} +@!bch_label:0..lig_table_size; {left boundary starting location} +@!ll,@!lll:0..lig_table_size; {registers used for lig/kern processing} +@!label_loc:array[0..256] of -1..lig_table_size; {lig/kern starting addresses} +@!label_char:array[1..256] of eight_bits; {characters for |label_loc|} +@!label_ptr:0..256; {highest position occupied in |label_loc|} +@z +@x module 1097 + end; +for k:=1 to header_size do header_byte[k]:=-1; +bc:=255; ec:=0; nl:=0; nk:=0; ne:=0; np:=0; +@y + skip_table[k]:=undefined_label; + end; +for k:=1 to header_size do header_byte[k]:=-1; +bc:=255; ec:=0; nl:=0; nk:=0; ne:=0; np:=0;@/ +internal[boundary_char]:=-unity; +bch_label:=undefined_label;@/ +label_loc[0]:=-1; label_ptr:=0; +@z +@x module 1104 +procedure set_tag(@!c:eight_bits;@!t:small_number;@!r:eight_bits); +begin if char_tag[c]=no_tag then + begin char_tag[c]:=t; char_remainder[c]:=r; +@y +procedure set_tag(@!c:halfword;@!t:small_number;@!r:halfword); +begin if char_tag[c]=no_tag then + begin char_tag[c]:=t; char_remainder[c]:=r; + if t=lig_tag then + begin incr(label_ptr); label_loc[label_ptr]:=r; label_char[label_ptr]:=c; + end; +@z +@x module 1105 +if (c>" ")and(c<128) then print(c) +@y +if (c>" ")and(c<127) then print(c) +else if c=256 then print("||") +@z +@x module 1106 +label continue; +var @!c,@!cc:eight_bits; {character codes} +@!k:0..256; {index into the |kern| array} +@y +label continue,done; +var @!c,@!cc:0..256; {character codes} +@!k:0..max_kerns; {index into the |kern| array} +@z +% also the previous code of module 1107 is inserted into 1106 +@x modules 1107--1111 are completely replaced +@y by the following new code: +@ @= +begin lk_started:=false; +continue: get_x_next; +if(cur_cmd=skip_to)and lk_started then + @; +if cur_cmd=bchar_label then + begin c:=256; cur_cmd:=colon;@+end +else begin back_input; c:=get_code;@+end; +if(cur_cmd=colon)or(cur_cmd=double_colon)then + @; +if cur_cmd=lig_kern_token then @ +else begin print_err("Illegal ligtable step"); +@.Illegal ligtable step@> + help1("I was looking for `=:' or `kern' here."); + back_error; next_char(nl):=qi(0); op_byte(nl):=qi(0); rem_byte(nl):=qi(0);@/ + skip_byte(nl):=stop_flag+1; {this specifies an unconditional stop} + end; +if nl=lig_table_size then overflow("ligtable size",lig_table_size); +@:METAFONT capacity exceeded ligtable size}{\quad ligtable size@> +incr(nl); +if cur_cmd=comma then goto continue; +if skip_byte(nl-1)= +primitive("=:",lig_kern_token,0); +@!@:=:_}{\.{=:} primitive@> +primitive("=:|",lig_kern_token,1); +@!@:=:/_}{\.{=:\char'174} primitive@> +primitive("=:|>",lig_kern_token,5); +@!@:=:/>_}{\.{=:\char'174>} primitive@> +primitive("|=:",lig_kern_token,2); +@!@:=:/_}{\.{\char'174=:} primitive@> +primitive("|=:>",lig_kern_token,6); +@!@:=:/>_}{\.{\char'174=:>} primitive@> +primitive("|=:|",lig_kern_token,3); +@!@:=:/_}{\.{\char'174=:\char'174} primitive@> +primitive("|=:|>",lig_kern_token,7); +@!@:=:/>_}{\.{\char'174=:\char'174>} primitive@> +primitive("|=:|>>",lig_kern_token,11); +@!@:=:/>_}{\.{\char'174=:\char'174>>} primitive@> +primitive("kern",lig_kern_token,128); +@!@:kern_}{\&{kern} primitive@> + +@ @= +lig_kern_token: case m of +0:print("=:"); +1:print("=:|"); +2:print("|=:"); +3:print("|=:|"); +5:print("=:|>"); +6:print("|=:>"); +7:print("|=:|>"); +11:print("|=:|>>"); +othercases print("kern") +endcases; + +@ Local labels are implemented by maintaining the |skip_table| array, +where |skip_table[c]| is either |undefined_label| or the address of the +most recent lig/kern instruction that skips to local label~|c|. In the +latter case, the |skip_byte| in that instruction will (temporarily) +be zero if there were no prior skips to this label, or it will be the +distance to the prior skip. + +We may need to cancel skips that span more than 127 lig/kern steps. + +@d cancel_skips(#)==ll:=#; + repeat lll:=qo(skip_byte(ll)); skip_byte(ll):=stop_flag; ll:=ll-lll; + until lll=0 +@d skip_error(#)==begin print_err("Too far to skip"); +@.Too far to skip@> + help1("At most 127 lig/kern steps can separate skipto1 from 1::."); + error; cancel_skips(#); + end + +@= +begin c:=get_code; +if nl-skip_table[c]>128 then {|skip_table[c]<= +begin if cur_cmd=colon then + if c=256 then bch_label:=nl + else set_tag(c,lig_tag,nl) +else if skip_table[c]128 then + begin skip_error(ll); goto continue; + end; + skip_byte(ll):=qi(nl-ll-1); ll:=ll-lll; + until lll=0; + end; +goto continue; +end +@x module 1112 +next_char(nl):=qi(c); op_bit(nl):=qi(cur_mod); stop_bit(nl):=qi(0); +if cur_mod=0 then rem_byte(nl):=qi(get_code) +@y +begin next_char(nl):=qi(c); skip_byte(nl):=qi(0); +if cur_mod<128 then {ligature op} + begin op_byte(nl):=qi(cur_mod); rem_byte(nl):=qi(get_code); + end +@z +@x ibid + begin if nk=256 then overflow("kern",256); +@:METAFONT capacity exceeded kern}{\quad kern@> + incr(nk); + end; + rem_byte(nl):=qi(k); + end +@y + begin if nk=max_kerns then overflow("kern",max_kerns); +@:METAFONT capacity exceeded kern}{\quad kern@> + incr(nk); + end; + op_byte(nl):=kern_flag+(k div 256); + rem_byte(nl):=qi((k mod 256)); + end; +lk_started:=true; +end +@z +@x module 1135 +tfm_two(6+lh+(ec-bc+1)+nw+nh+nd+ni+nl+nk+ne+np); + {this is the total number of file words that will be output} +tfm_two(lh); tfm_two(bc); tfm_two(ec); tfm_two(nw); tfm_two(nh); +tfm_two(nd); tfm_two(ni); tfm_two(nl); tfm_two(nk); tfm_two(ne); tfm_two(np); +@y +@; +tfm_two(6+lh+(ec-bc+1)+nw+nh+nd+ni+nl+lk_offset+nk+ne+np); + {this is the total number of file words that will be output} +tfm_two(lh); tfm_two(bc); tfm_two(ec); tfm_two(nw); tfm_two(nh); +tfm_two(nd); tfm_two(ni); tfm_two(nl+lk_offset); tfm_two(nk); tfm_two(ne); +tfm_two(np); +@z +% modules 1137&1138 are combined into a single module +% and so are modules 1140--1141, to make room for two new modules. +@x module 1136 is moved to after old module 1141 +@y and changed to the following code: +@ @= +if bch_label= +bchar:=round_unscaled(internal[boundary_char]); +if(bchar<0)or(bchar>255)then + begin bchar:=-1; lk_started:=false; lk_offset:=0;@+end +else begin lk_started:=true; lk_offset:=1;@+end; +@; +if bch_label= +k:=label_ptr; {pointer to the largest unallocated label} +if label_loc[k]+lk_offset>255 then + begin lk_offset:=0; lk_started:=false; {location 0 can do double duty} + repeat char_remainder[label_char[k]]:=lk_offset; + while label_loc[k-1]=label_loc[k] do + begin decr(k); char_remainder[label_char[k]]:=lk_offset; + end; + incr(lk_offset); decr(k); + until lk_offset+label_loc[k]<256; + {N.B.: |lk_offset=256| satisfies this when |k=0|} + end; +if lk_offset>0 then + while k>0 do + begin char_remainder[label_char[k]] + :=char_remainder[label_char[k]]+lk_offset; + decr(k); + end + +@ @= +for k:=0 to 255 do if skip_table[k] + cancel_skips(skip_table[k]); + end; +if lk_started then {|lk_offset=1| for the special |bchar|} + begin tfm_out(255); tfm_out(bchar); tfm_two(0); + end +else for k:=1 to lk_offset do {output the redirection specs} + begin ll:=label_loc[label_ptr]; + if bchar<0 then + begin tfm_out(254); tfm_out(0); + end + else begin tfm_out(255); tfm_out(bchar); + end; + tfm_two(ll+lk_offset); + repeat decr(label_ptr); + until label_loc[label_ptr] () +% Backslash, slash, vertical bar: \ / | +% Punctuation: . ? ! , : ; +% Underscore, hyphen, equals sign: _ - = +% Quotes--right left double: ' ` " +%"at", "number" "dollar", "percent", "and": @ # $ % & +% "hat", "star", "plus", "tilde": ^ * + ~ +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +[ end of message 023 ] diff --git a/info/digests/tex-implementors/024 b/info/digests/tex-implementors/024 new file mode 100644 index 0000000000..2a939b131c --- /dev/null +++ b/info/digests/tex-implementors/024 @@ -0,0 +1,1054 @@ +Date: 27 Mar 90 Message No: 024 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: TeX 3.0 is here; BibTeX; inquiry from Peter Breitenlohner + + +The files for TeX 3.0 were installed at labrea on Sunday, Mar 25. +I shall confine this message to just a few items: the differences +between TeX 2.993 and 3.0, updates to TEX82.BUG, and a list of the +files that have been updated at labrea since 6 Jan 90. (That is a +random date, but I think it should include just about everything +that is really important, and should save some of you from having +to spend the time getting a directory.) + +There have been some new names added to the list, and some address +changes, so I would appreciate an acknowledgement that everyone has +received this message. + +I am still trying to figure out how to get copies of the TRIP and TRAP +files to everyone. I have received simple C programs for encoding and +decoding files, and that may be a practical option. Please send the +following information along with your acknowledgement: + + 1 Do you have access to FTP? (In other words, you can get all the + files you need direct from labrea.) + 2 Would you be willing to provide copies of the TRIP files to other + implementors in your area? (That is, I would have to send copies + of the TRIP and TRAP files to fewer people, but everyone would + still be taken care of.) + 3 Do you have a C compiler? (In other words, if I sent copies of + the encoding/decoding programs, you could compile them and then + use them to convert files encoded here and sent to you back into + useful form.) + 4 Would you prefer getting the TRIP and TRAP files on diskette, and + if so, in what format? (I can create only IBM PC compatible + diskettes myself, and that isn't really convenient. To get other + formats, I will have to find someone else to do it. So either of + these options may take longer than electronic mail.) + 5 If you have any other suggestions, I'd be delighted to hear them. + +On another topic, I spoke yesterday with Oren Patashnik, who has finally +finished his dissertation and is now working on BibTeX 1.0. Although +he does not want to be deluged with requests for new features, he did +express a concern that he may have missed some things that are important +to European users of BibTeX. He is also interested in hearing about any +bugs that may still be present in the code. If anyone has anything to +say about either concern, I am preparing a summary of the things I've +seen mentioned in UKTeX, TEX-NL and GUT (he already watches TeXhax) to +send to him, and will be happy to include other information. Or you +could send your comments directly to him: + opbibtex@Neon.Stanford.EDU + +Peter Breitenlohner (PEB@DM0MPI11.Bitnet) reported this problem: + When running the TRIP/TRAP test on the CMS versions of TeX/MF + I get a discrepancy in the buf_stack usage. To be precise I + get one less than the files from Stanford say. + In the TRIP test I get: + 5i,7n,9p,113b,38s stack positions out of 200i,... + instead of: + 5i,7n,9p,114b,38s stack positions out of 200i,... + in the TRIP test I get: + 8i,43n,14r,8p,167b stack positions out of 30i,... + instead of: + 8i,43n,14r,8p,168b stack positions out of 30i,... + Yes we have modified the function input_ln for efficiency, + but I have tried to check very carefully that max_buf_stack + is computed as in the original version. + To be sure I just redid the TRIP test with all modifications of + input_ln removed (i.e. with the original version of input_ln). + I still get the same discrepancy ???????????????? + Do you know of anyone else having a similar problem. +Can anyone help? + +By the way, if anyone wants to send a message to this list, it should +be very easy. The address is on the Internet: + TeX-implementors@Math.AMS.com +Be warned, though, that depending on the phase of the moon and the whim +of the mail forwarding software at various gateways, some addresses may +get bounced, and some may just fall into the void. There are several +implementors who don't have any e-mail access at all, and if you would +like them included in a message distribution, please send me a separate +note, and I will ask the TUG office to handle the postal distribution. + + +######################################################################## + +Differences between TEX.WEB 2.993 and 3.0 + +;COMPARISON OF TX:TEX-2-993.WEB.1 AND TX:TEX-3-0.WEB.1 +;OPTIONS ARE /E /3 + +**** FILE TX:TEX-2-993.WEB.1, 1-41 (2739) +% A reward of $163.84 will be paid to the first finder of any remaining bug, + +% not counting changes introduced after August 1989. +% (This amount will double again in 1990.) + +% Although considerable effort has been expended to make the TeX program +**** FILE TX:TEX-3-0.WEB.1, 1-40 (2737) +% Version 3.0 fixed unusual displays; was more \output robust (March 1990). + +% A reward of $327.68 will be paid to the first finder of any remaining bug, +% not counting changes introduced after August 1989. + +% Although considerable effort has been expended to make the TeX program +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-186 (10245) +@d banner=='This is TeX, Version 2.993' {printed when \TeX\ starts} + +@ Different \PASCAL s have slightly different conventions, and the present +**** FILE TX:TEX-3-0.WEB.1, 1-186 (10278) +@d banner=='This is TeX, Version 3.0' {printed when \TeX\ starts} + +@ Different \PASCAL s have slightly different conventions, and the present +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-434 (23068) + about |(mem_max-mem_min)/10|, but 2100 is already quite generous} +@d hash_prime=1777 {a prime number equal to about 85\pct! of |hash_size|} +**** FILE TX:TEX-3-0.WEB.1, 1-434 (23099) + about |(mem_max-mem_min)/10|} +@d hash_prime=1777 {a prime number equal to about 85\pct! of |hash_size|} +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-1012 (48416) +@= +**** FILE TX:TEX-3-0.WEB.1, 1-1011 (48409) +(If the \PASCAL\ compiler does not support non-local |@!goto|, the +@^system dependencies@> +statement `|goto final_end|' should be replaced by something that +quietly terminates the program.) + +@= +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-1829 (81516) +goes to |end_of_TEX|. This is the only nonlocal |@!goto| statement in the +whole program. It is used when there is no recovery from a particular error. +**** FILE TX:TEX-3-0.WEB.1, 1-1833 (81705) +goes to |end_of_TEX|. This is the only nontrivial |@!goto| statement in the +whole program. It is used when there is no recovery from a particular error. +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-6151 (274364) +definitions, marks, and \.{\\write} texts are kept in \TeX's memory in the +form of token lists, preceded by a node that has a reference count in its +|token_ref_count| field. The token stored in location |p| is called +**** FILE TX:TEX-3-0.WEB.1, 1-6155 (274555) +definitions, marks, \.{\\write} texts, and a few other things +are remembered by \TeX\ in the form +of token lists, usually preceded by a node with a reference count in its +|token_ref_count| field. The token stored in location |p| is called +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-6523 (291727) +@!input_file : array[1..max_in_open] of alpha_file; +**** FILE TX:TEX-3-0.WEB.1, 1-6528 (291941) +@!open_parens : 0..max_in_open; {the number of open text files} +@!input_file : array[1..max_in_open] of alpha_file; +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-7053 (313800) +in_open:=0; max_buf_stack:=0; +param_ptr:=0; max_param_stack:=0; +**** FILE TX:TEX-3-0.WEB.1, 1-7059 (314079) +in_open:=0; open_parens:=0; max_buf_stack:=0; +param_ptr:=0; max_param_stack:=0; +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-7497 (331520) + begin if (end_line_char<0)or(end_line_char>127) then incr(limit); + if limit=start then {previous line was empty} +**** FILE TX:TEX-3-0.WEB.1, 1-7503 (331815) + begin if end_line_char_inactive then incr(limit); + if limit=start then {previous line was empty} +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-7531 (332655) + begin print_char(")"); force_eof:=false; + update_terminal; {show user that file has been read} + end_file_reading; {resume previous level} +**** FILE TX:TEX-3-0.WEB.1, 1-7537 (332934) + begin print_char(")"); decr(open_parens); + update_terminal; {show user that file has been read} + force_eof:=false; + end_file_reading; {resume previous level} +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-8039 (354643) +end + +@ If |long_state=outer_call|, a runaway argument has already been reported. +**** FILE TX:TEX-3-0.WEB.1, 1-8046 (354944) +end {a white lie; the \.{\\par} won't always trigger a runaway} + +@ If |long_state=outer_call|, a runaway argument has already been reported. +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-9811 (423493) +$$\vbox{\halign{\.{#}\hfil\cr + {}\\def\\a\{\\c\}\cr + {}\\def\\b\{\\d\}\cr + {}\\def\\c\{\}\cr + {}\\def\\d\{\}\cr}}$$ +**** FILE TX:TEX-3-0.WEB.1, 1-9818 (423854) +$$\vbox{\halign{\.{#}\hfil&\qquad\.{#}\hfil\cr + {}\\def\\a\{\\c\}& + {}\\def\\c\{\}\cr + {}\\def\\b\{\\d\}& + {}\\def\\d\{\}\cr}}$$ +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-9819 (423724) +while (p<>null)and(q<>null) do + if info(p)<>info(q) then p:=null + else begin p:=link(p); q:=link(q); + end; +b:=((p=null)and(q=null)); +end +**** FILE TX:TEX-3-0.WEB.1, 1-9826 (424098) +if p=q then b:=true +else begin while (p<>null)and(q<>null) do + if info(p)<>info(q) then p:=null + else begin p:=link(p); q:=link(q); + end; + b:=((p=null)and(q=null)); + end; +end +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-10334 (445117) +print_char("("); print(name); update_terminal; state:=new_line; +if name=str_ptr-1 then {we can conserve string pool space now} +**** FILE TX:TEX-3-0.WEB.1, 1-10343 (445539) +print_char("("); incr(open_parens); print(name); update_terminal; +state:=new_line; +if name=str_ptr-1 then {we can conserve string pool space now} +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-10348 (445589) +begin if not input_ln(cur_file,false) then do_nothing; +firm_up_the_line; +**** FILE TX:TEX-3-0.WEB.1, 1-10358 (446031) +begin if input_ln(cur_file,false) then do_nothing; +firm_up_the_line; +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-14297 (620139) +@= +**** FILE TX:TEX-3-0.WEB.1, 1-14306 (620575) +@!@:non_script_}{\.{\\nonscript} primitive@> + +@= +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-15757 (682439) + begin if type(q)=unset_node then + @ + else if type(q)=rule_node then + @; + s:=q; q:=link(q); +**** FILE TX:TEX-3-0.WEB.1, 1-15768 (682923) + begin if not is_char_node(q) then + if type(q)=unset_node then + @ + else if type(q)=rule_node then + @; + s:=q; q:=link(q); +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-16291 (708908) +@!artificial_badness:boolean; {has |b| been forced to zero?} +@!save_link:pointer; {temporarily holds value of |link(cur_p)|} +**** FILE TX:TEX-3-0.WEB.1, 1-16303 (709433) +@!artificial_demerits:boolean; {has |d| been forced to zero?} +@!save_link:pointer; {temporarily holds value of |link(cur_p)|} +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-16327 (710517) +@!minimal_demerits:array[very_loose_fit..tight_fit] of scaled; {best total + demerits known for current line class and position, given the fitness} +@!minimum_demerits:scaled; {best total demerits known for current line class + and position} +**** FILE TX:TEX-3-0.WEB.1, 1-16339 (711043) +@!minimal_demerits:array[very_loose_fit..tight_fit] of integer; {best total + demerits known for current line class and position, given the fitness} +@!minimum_demerits:integer; {best total demerits known for current line class + and position} +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-16372 (712390) +minimum_demerits:=minimum_demerits+abs(adj_demerits); +for fit_class:=very_loose_fit to tight_fit do +**** FILE TX:TEX-3-0.WEB.1, 1-16384 (712918) +if abs(adj_demerits)>=awful_bad-minimum_demerits then + minimum_demerits:=awful_bad-1 +else minimum_demerits:=minimum_demerits+abs(adj_demerits); +for fit_class:=very_loose_fit to tight_fit do +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-16648 (724003) +begin @!stat artificial_badness:=false;@+tats@/ +@^inner loop@> +**** FILE TX:TEX-3-0.WEB.1, 1-16662 (724624) +begin artificial_demerits:=false;@/ +@^inner loop@> +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-16715 (726855) + begin b:=0; {set badness zero, this break is forced} + @!stat artificial_badness:=true;@+tats + end +else if b>threshold then goto deactivate; +**** FILE TX:TEX-3-0.WEB.1, 1-16729 (727464) + artificial_demerits:=true {set demerits zero, this break is forced} +else if b>threshold then goto deactivate; +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-16730 (727496) +@; +@!stat if tracing_paragraphs>0 then +**** FILE TX:TEX-3-0.WEB.1, 1-16742 (728071) +if artificial_demerits then d:=0 +else @; +@!stat if tracing_paragraphs>0 then +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-16759 (728599) +if artificial_badness then print_char("*")@+else print_int(b); +@.*\relax@> +print(" p="); print_int(pi); +print(" d="); print_int(d); +end +**** FILE TX:TEX-3-0.WEB.1, 1-16772 (729213) +if b>inf_bad then print_char("*")@+else print_int(b); +@.*\relax@> +print(" p="); print_int(pi); print(" d="); +if artificial_demerits then print_char("*")@+else print_int(d); +end +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-16789 (729635) +d:=line_penalty+b; d:=d*d; +if pi<>0 then +**** FILE TX:TEX-3-0.WEB.1, 1-16802 (730290) +begin d:=line_penalty+b; +if abs(d)>=10000 then d:=100000000@+else d:=d*d; +if pi<>0 then +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-16796 (729893) +if abs(fit_class-fitness(r))>1 then d:=d+adj_demerits + +@ When an active node disappears, we must delete an adjacent delta node if the +**** FILE TX:TEX-3-0.WEB.1, 1-16810 (730596) +if abs(fit_class-fitness(r))>1 then d:=d+adj_demerits; +end + +@ When an active node disappears, we must delete an adjacent delta node if the +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-17443 (757502) +label common_ending,done,found,found1,not_found,not_found+1,exit; +var @@; +**** FILE TX:TEX-3-0.WEB.1, 1-17458 (758211) +label common_ending,done,found,found1,found2,not_found,exit; +var @@; +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-17573 (762590) +if type(hb)=ligature_node then if odd(subtype(hb)) then + bchar:=font_bchar[hf]; +if is_char_node(ha) then + begin init_list:=ha; init_lig:=false; hu[0]:=qo(character(ha)); + end +else if type(ha)=ligature_node then + begin init_list:=lig_ptr(ha); init_lig:=true; init_lft:=(subtype(ha)>1); + hu[0]:=qo(character(lig_char(ha))); + if init_list=null then if init_lft then + begin hu[0]:=256; init_lig:=false; + end; {in this case a ligature will be reconstructed from scratch} + free_node(ha,small_node_size); + end +else goto not_found+1; {no punctuation found} +s:=cur_p; {we have |cur_p<>ha| because |type(cur_p)=glue_node|} +**** FILE TX:TEX-3-0.WEB.1, 1-17588 (763294) +if not is_char_node(hb) then + if type(hb)=ligature_node then if odd(subtype(hb)) then + bchar:=font_bchar[hf]; +if is_char_node(ha) then + if font(ha)<>hf then goto found2 + else begin init_list:=ha; init_lig:=false; hu[0]:=qo(character(ha)); + end +else if type(ha)=ligature_node then + if font(lig_char(ha))<>hf then goto found2 + else begin init_list:=lig_ptr(ha); init_lig:=true; init_lft:=(subtype(ha)>1); + hu[0]:=qo(character(lig_char(ha))); + if init_list=null then if init_lft then + begin hu[0]:=256; init_lig:=false; + end; {in this case a ligature will be reconstructed from scratch} + free_node(ha,small_node_size); + end +else begin {no punctuation found; look for left boundary} + if not is_char_node(r) then if type(r)=ligature_node then + if subtype(r)>1 then goto found2; + j:=1; s:=ha; init_list:=null; goto common_ending; + end; +s:=cur_p; {we have |cur_p<>ha| because |type(cur_p)=glue_node|} +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-17590 (763293) +not_found+1: j:=1; s:=ha; init_list:=null; +if not is_char_node(r) then if type(r)=ligature_node then + if subtype(r)>1 then + begin j:=0; hu[0]:=256; init_lig:=false; + end; +common_ending: flush_node_list(r); +**** FILE TX:TEX-3-0.WEB.1, 1-17612 (764306) +found2: s:=ha; j:=0; hu[0]:=256; init_lig:=false; init_list:=null; +common_ending: flush_node_list(r); +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-19734 (856246) +else begin wait:=false; s:=ins_ptr(p); + link(last_ins_ptr(r)):=s; s:=last_ins_ptr(r); + if best_ins_ptr(r)=p then +**** FILE TX:TEX-3-0.WEB.1, 1-19752 (857149) +else begin wait:=false; s:=last_ins_ptr(r); link(s):=ins_ptr(p); + if best_ins_ptr(r)=p then +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-19752 (856951) + split_top_skip:=split_top_ptr(p); +**** FILE TX:TEX-3-0.WEB.1, 1-19769 (857831) + link(s):=null; + split_top_skip:=split_top_ptr(p); +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-19759 (857236) + link(s):=null; + end; +**** FILE TX:TEX-3-0.WEB.1, 1-19777 (858136) + end; +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-19816 (859123) +begin if loc<>null then @; +end_token_list; {conserve stack space in case more outputs are triggered} +**** FILE TX:TEX-3-0.WEB.1, 1-19833 (860003) +begin if (loc<>null) or + ((token_type<>output_text)and(token_type<>backed_up)) then + @; +end_token_list; {conserve stack space in case more outputs are triggered} +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-19836 (859949) +help2("Your sneaky output routine has fewer real {'s than }'s.")@/ +("I can't handle that very well; good luck."); error; +**** FILE TX:TEX-3-0.WEB.1, 1-19855 (860894) +help2("Your sneaky output routine has problematic {'s and/or }'s.")@/ +("I can't handle that very well; good luck."); error; +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-19840 (860108) +end + +@ @= +**** FILE TX:TEX-3-0.WEB.1, 1-19859 (861056) +end {loops forever if reading from a file, since |null=min_halfword<=0|} + +@ @= +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-20367 (883423) + build_page; {append \.{\\hbox to \\hsize\{\}\\vss\\penalty-'10000000000}} + end; +**** FILE TX:TEX-3-0.WEB.1, 1-20386 (884440) + build_page; {append \.{\\hbox to \\hsize\{\}\\vfill\\penalty-'10000000000}} + end; +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-20568 (891433) +@ It's very hard to get this error message; indeed, the case didn't arise +until more than two years after it had been programmed. + +@= +begin print_err("Extra "); print_cmd_chr(cur_cmd,cur_chr); +**** FILE TX:TEX-3-0.WEB.1, 1-20587 (892452) +@ @= +begin print_err("Extra "); print_cmd_chr(cur_cmd,cur_chr); +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-22187 (951719) +removed when they surround a single Ord character or, when they +surround an accent that is the nucleus of an Ord atom. +**** FILE TX:TEX-3-0.WEB.1, 1-22203 (952606) +removed when they surround a single Ord without sub/superscripts, or when they +surround an accent that is the nucleus of an Ord atom. +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-22278 (954827) + begin cur_mlist:=p; cur_style:=text_style; mlist_penalties:=false; + mlist_to_hlist; a:=hpack(link(temp_head),natural); +**** FILE TX:TEX-3-0.WEB.1, 1-22294 (955729) + begin @; + cur_mlist:=p; cur_style:=text_style; mlist_penalties:=false; + mlist_to_hlist; a:=hpack(link(temp_head),natural); +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-22282 (955044) + if danger then flush_math; + m:=mode; p:=fin_mlist(null); +**** FILE TX:TEX-3-0.WEB.1, 1-22299 (955986) + danger:=false; + @; + m:=mode; p:=fin_mlist(null); +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-22287 (955165) +else begin @; + @; +**** FILE TX:TEX-3-0.WEB.1, 1-22306 (956229) +else begin if a=null then @; + @; +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-22365 (958481) +adjust_tail:=adjust_head; b:=hpack(p,natural); +t:=adjust_tail; adjust_tail:=null;@/ +**** FILE TX:TEX-3-0.WEB.1, 1-22384 (959560) +adjust_tail:=adjust_head; b:=hpack(p,natural); p:=list_ptr(b); +t:=adjust_tail; adjust_tail:=null;@/ +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-22425 (960728) + if p<>null then if type(p)=glue_node then d:=0; + end +**** FILE TX:TEX-3-0.WEB.1, 1-22444 (961823) + if p<>null then if not is_char_node(p) then if type(p)=glue_node then d:=0; + end +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-22458 (961923) +shift_amount(b):=s+d; append_to_vlist(b); +if t<>adjust_head then + begin link(tail):=link(adjust_head); tail:=t; + end + +@ @= +**** FILE TX:TEX-3-0.WEB.1, 1-22477 (963046) +shift_amount(b):=s+d; append_to_vlist(b) + +@ @= +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-22468 (962255) + tail_append(new_penalty(post_display_penalty)); + end +else begin tail_append(new_penalty(post_display_penalty)); + tail_append(new_param_glue(g2)); + end + +@ When \.{\\halign} appears in a display, the alignment routines operate +**** FILE TX:TEX-3-0.WEB.1, 1-22484 (963296) + g2:=0; + end; +if t<>adjust_head then {migrating material comes after equation number} + begin link(tail):=link(adjust_head); tail:=t; + end; +tail_append(new_penalty(post_display_penalty)); +if g2>0 then tail_append(new_param_glue(g2)) + +@ When \.{\\halign} appears in a display, the alignment routines operate +*************** + +**** FILE TX:TEX-2-993.WEB.1, 1-24221 (1024814) +if cur_level>level_one then +**** FILE TX:TEX-3-0.WEB.1, 1-24239 (1025936) +while open_parens>0 do + begin print(" )"); decr(open_parens); + end; +if cur_level>level_one then +*************** + + +######################################################################## + +Updates to TEX82.BUG + +380. Slightly more robust recovery and detection of \output anomalies. +(Suggested by Chris Thompson, provoked by George Russell, January 1990) +@x module 1026 +begin if loc<>null then @; +@y +begin if (loc<>null) or + ((token_type<>output_text)and(token_type<>backed_up)) then + @; +@z +@x module 1027 +help2("Your sneaky output routine has fewer real {'s than }'s.")@/ +@y +help2("Your sneaky output routine has problematic {'s and/or }'s.")@/ +@z + +381. \eqno\aftergroup*$$ should yield * after the $$ (Michael Downes, 29 Jan 90) +@x module 1194 + begin cur_mlist:=p; cur_style:=text_style; mlist_penalties:=false; +@y + begin @; + cur_mlist:=p; cur_style:=text_style; mlist_penalties:=false; +@z +@x ibid +else begin @; +@y +else begin if a=null then @; +@z + +382. Missed a case in the 8-bit change (Wayne Sullivan, 1 Feb 1990) +@x module 360 + begin if (end_line_char<0)or(end_line_char>127) then incr(limit); +@y + begin if end_line_char_inactive then incr(limit); +@z + +383. Linebreaking needs to be more robust when total demerits get +very high (Frank Mittelbach, 22 Feb 1990) +@x module 830 +@!artificial_badness:boolean; {has |b| been forced to zero?} +@y +@!artificial_demerits:boolean; {has |d| been forced to zero?} +@z +@x module 833 (this change is cosmetic only) +@!minimal_demerits:array[very_loose_fit..tight_fit] of scaled; {best total + demerits known for current line class and position, given the fitness} +@!minimum_demerits:scaled; {best total demerits known for current line class +@y +@!minimal_demerits:array[very_loose_fit..tight_fit] of integer; {best total + demerits known for current line class and position, given the fitness} +@!minimum_demerits:integer; {best total demerits known for current line class +@z +@x module 836 here we want to ensure that total_demerits < awful_bad +minimum_demerits:=minimum_demerits+abs(adj_demerits); +@y +if abs(adj_demerits)>=awful_bad-minimum_demerits then + minimum_demerits:=awful_bad-1 +else minimum_demerits:=minimum_demerits+abs(adj_demerits); +@z +@x module 851 +begin @!stat artificial_badness:=false;@+tats@/ +@y +begin artificial_demerits:=false;@/ +@z +@x module 854 + begin b:=0; {set badness zero, this break is forced} + @!stat artificial_badness:=true;@+tats + end +@y + artificial_demerits:=true {set demerits zero, this break is forced} +@z +@x module 855 +@; +@y +if artificial_demerits then d:=0 +else @; +@z +@x module 856 +if artificial_badness then print_char("*")@+else print_int(b); +@.*\relax@> +print(" p="); print_int(pi); +print(" d="); print_int(d); +@y +if b>inf_bad then print_char("*")@+else print_int(b); +@.*\relax@> +print(" p="); print_int(pi); print(" d="); +if artificial_demerits then print_char("*")@+else print_int(d); +@z +@x module 859 +d:=line_penalty+b; d:=d*d; +@y +begin d:=line_penalty+b; +if abs(d)>=10000 then d:=100000000@+else d:=d*d; +@z +@x ibid +if abs(fit_class-fitness(r))>1 then d:=d+adj_demerits +@y +if abs(fit_class-fitness(r))>1 then d:=d+adj_demerits; +end +@z + +384. Math fonts may disappear outside of \eqno (Marc van Leeuwen). +@x module 1194 + if danger then flush_math; +@y + danger:=false; + @; +@z + +385. Forgot to rule out charnode when testing for node type (Marc van Leeuwen). +@x module 805 + begin if type(q)=unset_node then + @ + else if type(q)=rule_node then + @; +@y + begin if not is_char_node(q) then + if type(q)=unset_node then + @ + else if type(q)=rule_node then + @; +@z +@x module 903 +if type(hb)=ligature_node then if odd(subtype(hb)) then +@y +if not is_char_node(hb) then + if type(hb)=ligature_node then if odd(subtype(hb)) then +@z +@x module 1202 + if p<>null then if type(p)=glue_node then d:=0; +@y + if p<>null then if not is_char_node(p) then if type(p)=glue_node then d:=0; +@z + +386. Don't change the font of punctuation before a hyphenated word + (Scott Allendorf, reported 7 Mar 90) +@x module 895 +label common_ending,done,found,found1,not_found,not_found+1,exit; +@y +label common_ending,done,found,found1,found2,not_found,exit; +@z +@x module 903 +if is_char_node(ha) then + begin init_list:=ha; init_lig:=false; hu[0]:=qo(character(ha)); + end +else if type(ha)=ligature_node then + begin init_list:=lig_ptr(ha); init_lig:=true; init_lft:=(subtype(ha)>1); + hu[0]:=qo(character(lig_char(ha))); + if init_list=null then if init_lft then + begin hu[0]:=256; init_lig:=false; + end; {in this case a ligature will be reconstructed from scratch} + free_node(ha,small_node_size); + end +else goto not_found+1; {no punctuation found} +s:=cur_p; {we have |cur_p<>ha| because |type(cur_p)=glue_node|} +while link(s)<>ha do s:=link(s); +j:=0; goto common_ending; +not_found+1: j:=1; s:=ha; init_list:=null; +if not is_char_node(r) then if type(r)=ligature_node then + if subtype(r)>1 then + begin j:=0; hu[0]:=256; init_lig:=false; + end; +@y +if is_char_node(ha) then + if font(ha)<>hf then goto found2 + else begin init_list:=ha; init_lig:=false; hu[0]:=qo(character(ha)); + end +else if type(ha)=ligature_node then + if font(lig_char(ha))<>hf then goto found2 + else begin init_list:=lig_ptr(ha); init_lig:=true; init_lft:=(subtype(ha)>1); + hu[0]:=qo(character(lig_char(ha))); + if init_list=null then if init_lft then + begin hu[0]:=256; init_lig:=false; + end; {in this case a ligature will be reconstructed from scratch} + free_node(ha,small_node_size); + end +else begin {no punctuation found; look for left boundary} + if not is_char_node(r) then if type(r)=ligature_node then + if subtype(r)>1 then goto found2; + j:=1; s:=ha; init_list:=null; goto common_ending; + end; +s:=cur_p; {we have |cur_p<>ha| because |type(cur_p)=glue_node|} +while link(s)<>ha do s:=link(s); +j:=0; goto common_ending; +found2: s:=ha; j:=0; hu[0]:=256; init_lig:=false; init_list:=null; +@z + +387. Balance the parens showing on the terminal (for Lispers). +@x module 304 +@!in_open : 0..max_in_open; {the number of lines in the buffer, less one} +@y +@!in_open : 0..max_in_open; {the number of lines in the buffer, less one} +@!open_parens : 0..max_in_open; {the number of open text files} +@z +@x module 331 +in_open:=0; max_buf_stack:=0; +@y +in_open:=0; open_parens:=0; max_buf_stack:=0; +@z +@x module 362 + begin print_char(")"); force_eof:=false; + update_terminal; {show user that file has been read} +@y + begin print_char(")"); decr(open_parens); + update_terminal; {show user that file has been read} + force_eof:=false; +@z +@x module 537 +print_char("("); print(name); update_terminal; state:=new_line; +@y +print_char("("); incr(open_parens); print(name); update_terminal; +state:=new_line; +@z +@x module 1334 +if job_name=0 then open_log_file; +@y +if job_name=0 then open_log_file; +while open_parens>0 do + begin print(" )"); decr(open_parens); + end; +@z + +388. Optimize \ifx\p\q after \let\p=\q (Marc van Leeuwen says that + AmS-TeX uses this a lot). +@x module 508 + while (p<>null)and(q<>null) do + if info(p)<>info(q) then p:=null + else begin p:=link(p); q:=link(q); + end; +b:=((p=null)and(q=null)); +@y +if p=q then b:=true +else begin while (p<>null)and(q<>null) do + if info(p)<>info(q) then p:=null + else begin p:=link(p); q:=link(q); + end; + b:=((p=null)and(q=null)); + end; +@z +@x module 538 (while we're at it, might as well optimize this too) +begin if not input_ln(cur_file,false) then do_nothing; +@y +begin if input_ln(cur_file,false) then do_nothing; +@z +@x module 1020 (and this) +else begin wait:=false; s:=ins_ptr(p); + link(last_ins_ptr(r)):=s; s:=last_ins_ptr(r); +@y +else begin wait:=false; s:=last_ins_ptr(r); link(s):=ins_ptr(p); +@z + +389. Treat migration properly in displays (Marc van Leeuwen). +@x module 1199 (a bad bug that really has bitten) +adjust_tail:=adjust_head; b:=hpack(p,natural); +@y +adjust_tail:=adjust_head; b:=hpack(p,natural); p:=list_ptr(b); +@z +@x module 1204 +shift_amount(b):=s+d; append_to_vlist(b); +if t<>adjust_head then + begin link(tail):=link(adjust_head); tail:=t; + end +@y +shift_amount(b):=s+d; append_to_vlist(b) +@z +@x module 1205 + tail_append(new_penalty(post_display_penalty)); + end +else begin tail_append(new_penalty(post_display_penalty)); + tail_append(new_param_glue(g2)); + end +@y + g2:=0; + end; +if t<>adjust_head then {migrating material comes after equation number} + begin link(tail):=link(adjust_head); tail:=t; + end; +tail_append(new_penalty(post_display_penalty)); +if g2>0 then tail_append(new_param_glue(g2)) +@z + +-----------Here I draw the line with respect to further changes + +390. (I sincerely hope that there won't be any more) + + +######################################################################## + +New files at labrea.stanford.edu since 6 Jan 90 + +/tex: +-rw-rw-r-- 1 0 5 1444 Jan 8 22:34 CHANGES.Jan90 * +-rw-rw-r-- 1 0 5 928 Mar 25 16:44 CHANGES.Mar90 * +-rw-rw-r-- 1 0 5 3283 Mar 25 16:43 README * + +/tex/cm: +-rw-r--r-- 1 0 5 39792 Mar 25 16:16 romanl.mf * +-rw-r--r-- 1 0 5 43157 Mar 25 16:16 symbol.mf * + +/tex/errata: +-rw-r--r-- 1 0 5 39891 Mar 25 16:16 cm85.bug * +-rw-r--r-- 1 0 5 12359 Mar 25 16:16 errata.tex * +-rw-r--r-- 1 0 5 121688 Mar 25 16:17 errorlog.tex * +-rw-r--r-- 1 0 5 78087 Mar 25 16:17 mf84.bug * +-rw-r--r-- 1 0 5 293189 Mar 25 16:17 tex82.bug * + +/tex/etc: +-rw-r--r-- 1 0 5 87839 Feb 7 11:25 vftovp.web * +-rw-r--r-- 1 0 5 122079 Jan 30 09:48 vptovf.web * + +/tex/fonts: +-rw-rw-r-- 1 0 5 256 Mar 19 13:52 logo9.tfm * +-rw-rw-r-- 1 0 5 552 Jan 28 1989 ransom10.tfm * + +/tex/gf: +-rw-r--r-- 1 0 5 7464 Jan 28 1989 ransom10.300gf * + +/tex/latex: + [ lcircle*.mf renamed from circle*.mf ] +-rw-rw-r-- 1 0 5 125 Apr 3 1986 lcircle10.mf * +-rw-rw-r-- 1 0 5 125 Apr 3 1986 lcirclew10.mf * + +/tex/lib: +-rw-r--r-- 1 0 5 22394 Mar 25 16:17 plain.mf * +-rw-r--r-- 1 0 5 43760 Mar 25 16:17 plain.tex * +-rw-r--r-- 1 0 5 9204 Mar 25 16:17 testfont.tex * +-rw-r--r-- 1 0 5 9992 Mar 25 16:18 webmac.tex * + +/tex/latex: + [ lcircle*.mf renamed from circle*.mf ] +-rw-rw-r-- 1 0 5 125 Apr 3 1986 lcircle10.mf * +-rw-rw-r-- 1 0 5 125 Apr 3 1986 lcirclew10.mf * + +/tex/local/etc: +-rw-r--r-- 1 0 5 772 Jan 3 18:10 Makefile * +-rw-r--r-- 1 0 5 10843 Mar 25 16:18 vftovp.ch * +-rw-r--r-- 1 0 5 4384 Jan 3 23:26 vptovf.ch * + +/tex/local/lib: +-rw-r--r-- 1 0 5 5307 Jan 7 22:39 epsf.tex * +-rw-r--r-- 1 0 5 3201 Jan 6 02:17 fontchart.tex * +-rw-r--r-- 1 0 5 33672 Jan 7 13:32 gkpmac.tex * +-rw-r--r-- 1 0 5 4300 Jan 8 09:59 letter.tex * +-rw-r--r-- 1 0 5 1485 Jan 5 18:24 list.tex * +-rw-r--r-- 1 0 5 2083 Jan 5 20:22 llist.tex * +-rw-r--r-- 1 0 5 8220 Mar 25 16:18 picmac.tex * +-rw-r--r-- 1 0 5 1936 Jan 7 22:39 rotate.tex * + +/tex/local/man1: +-rwxr--r-- 1 0 5 6513 Oct 29 20:13 tex.1 * +-rw-r--r-- 1 0 5 791 Dec 30 23:07 vftovp.1 * +-rw-r--r-- 1 0 5 848 Dec 30 23:14 vptovf.1 * + +/tex/local/mf: +-rw-r--r-- 1 0 5 1958 Jan 7 21:53 Makefile * +-rw-r--r-- 1 0 5 54080 Mar 25 16:18 inimf.ch * +-rw-r--r-- 1 0 5 22157 Mar 25 16:18 mf.pool * +-rw-r--r-- 1 0 5 690 Mar 25 16:18 plain.log * + +/tex/local/mfware: +-rw-r--r-- 1 0 5 996 Nov 8 11:59 Makefile * +-rw-r--r-- 1 0 5 11456 Nov 23 00:04 gftopk.ch * +-rw-r--r-- 1 0 5 8404 Nov 18 21:58 pktype.ch * +-rw-r--r-- 1 0 5 47330 Nov 18 21:56 pktype.web * + +/tex/local/tex: +-rw-r--r-- 1 0 5 1873 Jan 7 21:51 Makefile * +-rwxr--r-- 1 0 5 664 Oct 30 18:21 ini_to_trip * +-rwxr--r-- 1 0 5 447 Nov 30 14:03 ini_to_vir * +-rw-r--r-- 1 0 5 53593 Mar 25 16:18 initex.ch * +-rw-r--r-- 1 0 5 165468 Jan 8 00:31 plain.fmt * +-rw-r--r-- 1 0 5 2367 Mar 25 16:18 plain.log * +-rw-r--r-- 1 0 5 25675 Mar 25 16:18 tex.pool * + +/tex/local/texware: +-rw-r--r-- 1 0 5 809 Dec 11 23:14 Makefile * +-rw-r--r-- 1 0 5 16127 Jan 2 18:07 dvitype.ch * +-rw-r--r-- 1 0 5 4454 Jan 3 23:30 pltotf.ch * +-rw-r--r-- 1 0 5 7033 Dec 10 23:40 tftopl.ch * + +/tex/local/web: +-rw-r--r-- 1 0 5 682 Nov 8 12:00 Makefile * +-rw-r--r-- 1 0 5 20055 Mar 25 16:18 weave.ch * + +/tex/mf: +total 2013 +-rw-r--r-- 1 0 5 916616 Mar 25 16:20 mf.web * +-rw-r--r-- 1 0 5 938281 Mar 25 16:21 mfbook.tex * +-rw-r--r-- 1 0 5 1703 Mar 25 16:21 trap.fot * +-rw-r--r-- 1 0 5 121719 Mar 25 16:21 trap.log * +-rw-r--r-- 1 0 5 11842 Mar 25 16:21 trap.mf * +-rw-r--r-- 1 0 5 10388 Dec 20 13:04 trap.pl +-rw-r--r-- 1 0 5 4550 Mar 25 16:21 trap.typ * +-rw-r--r-- 1 0 5 4586 Mar 25 16:21 trapin.log * +-rw-r--r-- 1 0 5 18249 Dec 4 20:32 trapman.tex + +/tex/mfware: +-rw-r--r-- 1 0 5 186565 Jan 2 14:16 gftodvi.web * +-rw-r--r-- 1 0 5 92291 Nov 23 00:04 gftopk.web * +-rw-r--r-- 1 0 5 74981 Dec 4 16:19 mft.web * + +/tex/patches: +total 131 +-rw-rw-r-- 1 0 5 842 Mar 25 16:40 TeX3.0.patch1 * +-rw-rw-r-- 1 0 5 2999 Mar 25 16:40 TeX3.0.patch2 * +-rw-rw-r-- 1 0 5 48519 Mar 25 16:40 TeX3.0.patch3 * +-rw-rw-r-- 1 0 5 39542 Mar 25 16:40 TeX3.0.patch4 * +-rw-rw-r-- 1 0 5 40546 Mar 25 16:40 TeX3.0.patch5 * + +/tex/tex: +total 2662 +-rw-r--r-- 1 0 5 1025443 Mar 25 16:23 tex.web * +-rw-r--r-- 1 0 5 1381711 Mar 25 16:25 texbook.tex * +-rw-r--r-- 1 0 5 2437 Mar 25 16:25 trip.fot * +-rw-r--r-- 1 0 5 182686 Mar 25 16:25 trip.log * +-rw-r--r-- 1 0 5 16990 Oct 6 09:35 trip.pl +-rw-r--r-- 1 0 5 22555 Mar 25 16:25 trip.tex * +-rw-r--r-- 1 0 5 18025 Mar 25 16:25 trip.typ * +-rw-r--r-- 1 0 5 12931 Mar 25 16:25 tripin.log * +-rw-r--r-- 1 0 5 19227 Dec 4 19:51 tripman.tex +-rw-r--r-- 1 0 5 58 May 30 1983 tripos.tex + +/tex/tugboat: +-rw-r--r-- 1 0 5 32405 Feb 26 13:36 guidepro.tex * +-rw-r--r-- 1 0 5 12488 Feb 26 13:35 ltugboat.sty * +-rw-r--r-- 1 0 5 22349 Feb 26 13:35 tugboat.com * +-rw-r--r-- 1 0 5 64456 Feb 26 13:35 tugboat.sty * +-rw-r--r-- 1 0 5 6154 Feb 26 13:35 tugproc.sty * + +/tex/web: +total 416 +-rw-r--r-- 1 0 5 129556 Oct 6 17:57 tangle.web +-rw-r--r-- 1 0 5 185497 Mar 25 16:26 weave.web * +-rw-r--r-- 1 0 5 89194 Mar 25 16:26 webman.tex * + + +######################################################################## + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Character code reference +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Upper case letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ +% Lower case letters: abcdefghijklmnopqrstuvwxyz +% Digits: 0123456789 +% Square, curly, angle braces, parentheses: [] {} <> () +% Backslash, slash, vertical bar: \ / | +% Punctuation: . ? ! , : ; +% Underscore, hyphen, equals sign: _ - = +% Quotes--right left double: ' ` " +%"at", "number" "dollar", "percent", "and": @ # $ % & +% "hat", "star", "plus", "tilde": ^ * + ~ +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +[ end of message 024 ] diff --git a/info/digests/tex-implementors/025 b/info/digests/tex-implementors/025 new file mode 100644 index 0000000000..843358cfb4 --- /dev/null +++ b/info/digests/tex-implementors/025 @@ -0,0 +1,730 @@ +Date: 1 Apr 90 Message No: 025 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: TeX memory capacity; new errata; MF 2.0 changes; WEAVE 3.1 + + +Now that implementation of TeX 3.0 is underway, I'd like to plan to +publish a new edition of the memory capacity charts that appeared in +TUGboat 7#1 (pp 67-70). I would like to include all implementations +of TeX 3.0 that have passed the TRIP test. The next issue is probably +too early to have complete information, so I will ask now for you to +send me the block of code from your change file (or the equivalent) +giving the memory values so that it can be included in the fall issue. +Please make sure you include the following: machine and operating +system for which this implementation is intended, version distributed, +and form of files distributed (e.g., web, exec, exec only). The +editorial deadline for the fall issue is September 11. + +One area of memory that is coming under increasing strain is the hash +size. Syntheses of LaTeX and AMS-TeX must resort to modular design to +avoid overflowing the allowable number of control sequence names. +TEX.WEB for 3.0 still only provides 2100 entries of hash_size (although +the comment that this is generous has been removed). I don't know of +any actual implementation that provides fewer than 2500 entries, and +most implementations, i suspect, provide even more. (At the AMS, we +use hash_size=5000 and hash_prime=4253.) I would like to encourage +all implementors to provide a large enough hash_size (and other memory +values) to accommodate reasonably straightforward use of LaTeX on +book-size documents. I will ask Frank Mittelbach and Rainer Schoepf +for their recommendations. + +Some macro packages like PicTeX simply need all the memory they can get. +Most C versions have been extended to provide main memory beyond 64K, +and some implementations for other systems as well. If you have such +a version, or know about one, please send me whatever information you +have. (This information will also be included in the memory chart +mentioned earlier.) In particular, i have received an inquiry asking +whether there are any huge implementations for the PC. + +TeX 3.0 contains new features for multilingual hyphenation, but it is +likely that the memory allocations for patterns (trie_size, trie_op_size, +others?) will have to be increased. (I have also received an inquiry +on this topic.) Since i have no experience with multilingual TeX, I +would appreciate receiving relevant information from anyone who does. + +Peter Breitenlohner (see question in message #24) has informed me that +he received a reply from Don Knuth confirming that his numbers are right. +The correction has been made in the most recent trip.log, and probably +trap.log as well, though Peter had not seen that yet. + +Enclosed is the full listing of the latest ERRATA.TEX from labrea. +Don decided to start a new file after publication of the last errata +list with TUGboat 10 #3; that instalment corresponds to ERRATA.FIV. +Note that, unlike previous errata listings, this one contains the +instruction (represented by the caret, ^ ) to place a term in the index. +This probably won't do anything more than put spurious entries into the +index file that's generated when you run the errata through TeX, but it +was a surprise to me, so I thought it worth mentioning. I did make one +change, namely to put a % in front of the ^L page markers that appear +above every volume break. + +The second enclosure consists of the latest additions to MF84.BUG. +Please note that number 553 reported in message 23 has been superseded. +The change first reported is actually in the new MF.WEB file, so it is +not lost, just apparently considered by Don to be a "cosmetic change". + +Two more enclosures contain changes to bring WEAVE.WEB to version 3.1, +and the changes to WEBMAC.TEX to support the new WEAVE. + +The differences between version 2.0 of MF.WEB and the last one reported +to you, version 1.7, will be sent separately in 4 parts. (I am keeping +the files to under 30Kb as requested by Wayne Sullivan.) + + +######################################################################## + +% Bugs (sigh) in Computers \& Typesetting --- the most recent errata + +\input manmac +\font\sltt=cmsltt10 +\font\niness=cmss9 +\font\ninessi=cmssi9 +\proofmodefalse +\raggedbottom +\output{\hsize=29pc \onepageout{\unvbox255\kern-\dimen@ \vfil}} + +\def\today{\number\day\ + \ifcase\month\or + Jan\or Feb\or Mar\or Apr\or May\or Jun\or + Jul\or Aug\or Sep\or Oct\or Nov\or Dec\fi + \ \number\year} + +\def\cutpar{{\parfillskip=0pt\par}} + +\def\rhead{Bugs in {\tensl Computers \& Typesetting as of \today}} +\def\bugonpage#1(#2) \par{\bigbreak\tenpoint + \hrule width\hsize + \line{\lower3.5pt\vbox to13pt{}Page #1\hfil(#2)}\hrule width\hsize + \nobreak\medskip} +\def\buginvol#1(#2) \par{\bigbreak\penalty-1000\tenpoint + \hrule width\hsize + \line{\lower3.5pt\vbox to13pt{}Volume #1\hfil(#2)}\hrule width\hsize + \nobreak\medskip} +\def\slMF{{\manual 89:;}\-{\manual <=>:}} % slant the logo +\def\0{\raise.7ex\hbox{$\scriptstyle\#$}} +\newcount\nn +\newdimen\nsize \newdimen\msize \newdimen\ninept \ninept=9pt +\newbox\eqbox \setbox\eqbox=\hbox{\kern2pt\eightrm=\kern2pt} + +\tenpoint +\noindent This is a list of all corrections made to {\sl Computers \& +Typesetting}, Volumes A,~C, and E\null, since 30 September 1989 (when +the revisions for \TeX\ Version 3.0 and \MF\ Version 2.0 were made). +Corrections made to the softcover version of {\sl The \TeX book\/} are +the same as corrections to Volume~A\null. Corrections to the softcover +version of {\sl The \slMF\kern1ptbook\/} are the same as corrections +to Volume~C\null. Some of the corrections below have already been made in +reprintings of the books. Hundreds of changes, too many to list here, +have been made to Volumes B~and~D because of the upgrades to \TeX\ and +\MF\null. Readers who need up-to-date information on the \TeX\ and +\MF\ programs should refer to the |WEB| source files until new +printings of Volumes B~and~D are issued. \looseness=-1 + +% +% volume A + +\bugonpage A99, line 4 from the bottom (2/22/90) + +\ninepoint\indent +to be chosen because there was no feasible +way to keep total demerits small. + +\bugonpage A156, line 2 (11/18/89) + +\ninepoint +Commands like |\mathchardef\alpha="010B| are used in +Appendix~B to define\cutpar + +\bugonpage A171, lines 24--26 (3/13/90) + +\ninepoint\noindent +formula produces a result exactly equivalent to +`|\left(|\|\right)|', when the \ doesn't end +with Punct, except that the {delimiters} are forced to +be of the |\big| size regardless of the height and depth of the subformula. + +\bugonpage A193, lines 16--18 (12/2/89) + +\ninepoint\noindent +line if you insert +`^|\noalign||{|^|\break||}|' +after the |\cr| for that line. You can prohibit {\sl all\/} breaks +in an |\eqalignno| if you set ^|\interdisplaylinepenalty||=10000|; or you +can enclose the whole works in a ^|\vbox|: + +\bugonpage A233, bottom 9 lines, and top three on next page (12/2/89) + +\danger The |\+| macro in Appendix~B works +by putting the \ for each column that's followed by~|&| +into an hbox as follows: +\begindisplay +|\hbox to |\|{|\|\hss}| +\enddisplay +The ^|\hss| means that the text is normally flush left, and that it can +extend to the right of its box. Since |\hfill| is ``more infinite'' than +|\hss| in its ability to stretch, it has the effect of right-justifying or +centering as stated above. Note that |\hfill| doesn't shrink, but |\hss| +does; if the text doesn't fit in its column, it will stick out at the right. +You could cancel the shrinkability of |\hss| by adding ^|\hfilneg|; then +an oversize text would produce an overfull box. +You could also center some text by putting `|\hss|' before it and just +`|&|' after it; in that case the text would be allowed to extend to the +left and right of its column. + The last column of a |\+|~line (i.e., the column entry that is +followed by |\cr|) is treated differently: The +\ is simply put into an hbox with its natural~width.\looseness=-1 + +\bugonpage A254, line 5 from the bottom (10/5/89) + +\ninepoint\noindent +|\vsize| hasn't changed, and if all insertions have been +held in place, the same page break\cutpar + +\bugonpage A286, lines 30--32 (3/13/90) + +\ninepoint\noindent +reading and expanding this \cstok{par} +token, \TeX\ will see the \ token again. \ (The current +meaning of the control sequence ^|\par| will be used; \cstok{par} might no +longer stand for \TeX's |\par| primitive.) + +\bugonpage A290, lines 12--13 (3/24/90) + +\ninepoint\noindent +simply a single Ord atom without subscripts or superscripts, +or an Acc whose nucleus is an Ord, the +enclosing braces are effectively removed. + +\bugonpage A340, nonblank line 11 (3/13/90) + +\tenpoint\noindent +|\topglue 1in % This makes an inch of blank space (1in=2.54cm).| + +\bugonpage A342, line 6 ( 3/13/90) + +\tenpoint\noindent +|\topglue| but not |\hglue|. It does not +illustrate |\raggedright| setting of para-\cutpar + +\bugonpage A346, lines 20--21 (12/3/89) + +\ninepoint\noindent +streams used by ^|\read| and ^|\write|, to math +^{families} used by ^|\fam|, to sets of hyphenation rules used by +^|\language|, and to insertions (which require +^|\box|, ^|\count|, ^|\dimen|, and ^|\skip| registers all having the +same number). + +\bugonpage A346, line 20 from the bottom (12/3/89) + +\ninepoint\noindent +manent value. These macros use registers +|\count10| through |\count20| to hold the\cutpar + +\bugonpage A346, lines 8--13 from the bottom (12/3/89) + +\ninepoint\noindent +number was allocated. The inside story of how allocation is actually performed +should be irrelevant when the allocation macros are used at a higher level; +you mustn't assume that |plain.tex| really does allocation in any +particular way. +\beginlines +|\count10=22 % this counter allocates \count registers 23, 24, 25, ...| +\endgroup + +\bugonpage A347, lines 2--5 (12/3/89) + +\ninepoint{\parindent=0pt +|\count19=0 % this counter allocates language codes 1, 2, 3, ...|\parbreak +|\count20=255 % this counter allocates insertions 254, 253, 252, ...|\parbreak +|\countdef\insc@unt=20 % nickname for the insertion counter|\parbreak +|\countdef\allocationnumber=21 % the most recent allocation|\parbreak +|\countdef|^|\m@ne||=22 \m@ne=-1 % a handy constant|\par} + +\bugonpage A347, new line after former line 17 (12/3/89) + +\ninepoint\noindent +|\outer\def|^|\newlanguage||{\alloc@9\language\chardef\@cclvi}| + +\bugonpage A352, new line before line 6 from the bottom (3/13/90) + +\ninepoint\noindent +|\def\topglue{\nointerlineskip \vglue-\topskip \vglue} % for top of page| + +\bugonpage A355, line 8 from the bottom (12/3/89) + +\ninepoint\noindent +| \noindent{\bf#1.\enspace}{\sl#2\par}%| + +\bugonpage A363, lines 8--9 from the bottom (12/8/89) + +{\ninepoint\parindent=0pt +| \if@mid \dimen@=\ht0 \advance\dimen@ by\dp\z@ |% + |\advance\dimen@ by12\p@|\parbreak% +| \advance\dimen@ by\pagetotal \advance\dimen@ by-\pageshrink| +\par} + +\bugonpage A375, line 27 (10/30/89) + +\ninepoint\noindent +depending on whether or not |\t|~contains +an asterisk. \ (Do you see why?) \ And here's\cutpar + +\bugonpage A393, lines 3--5 from the bottom (12/3/89) + +\ninepoint +|\hskip-.17em plus-3em minus.11em|\par +|\vadjust{}\penalty10000|\par +|\leaders\copy\dbox\hskip3.3\wd\dbox plus1fil minus.3\wd\dbox| + +\bugonpage A444, line 4 (3/13/90) + +\ninepoint\noindent +Shift box~$x$ down by ${1\over2}\bigl(h(x)-d(x)\bigr) +-a$, where $a=\sigma_{22}$, so that the operator character\cutpar + +\bugonpage A450, line 8 (12/3/89) + +\def\\#1{$_{\kern\scriptspace#1}$} +\ninepoint\indent +{\qquad\tt\\0h\\0e\\0n\\5a\\0t\\0 \\1n\\0a\\0 \\0n\\2a\\0t\\0 + \\1t\\0i\\0o\\0 \\2i\\0o\\0 \\0o\\2n\\0} + +\bugonpage A450, line 14 (12/3/89) + +\ninepoint +{\tt.\\0h\\0y$_3$p\\0h\\0e\\2n\\5a\\4t\\2i\\0o\\2n\\0.} + +\bugonpage A450, lines 19 and 20 (12/3/89) + +\ninepoint\vskip-10pt +\begindisplay +\tt\\0o\\2n\\0 +\\0o\\0n\\1c\\0 +\\1c\\0a\\0 +\\1n\\0a\\0 +\\0n\\2a\\0t\\0 +\\1t\\0i\\0o\\0 +\\2i\\0o\\0 +\\0o\\2n\\0 +\enddisplay +and this yields `{\tt\\0c\\0o\\2n\\1c\\0a\\0t\\0e\\1n\\2a\\1t\\2i\\0o\\2n\\0}', +i.e., `|con-cate-na-tion|'. + +\bugonpage A455, last lines before the quotes (11/30/89) + +\ninepoint\noindent +sit yourself (even in restricted horizontal mode) by saying +^|\setlanguage|\;\break + this changes the current language but it +does not change |\language|. Each what-\break +sit records the current +|\lefthyphenmin| and |\righthyphenmin|. + +\bugonpage A467, right column (12/3/89) + +\eightpoint\indent\hbox to0pt{\hss\lower1pt\hbox{*}}% +|\hfilneg|, 72, 100, 233, 283, 285, 290, 397. + +\bugonpage A468, right column (12/2/89) + +\eightpoint +|\interdisplaylinepenalty|, {\it193}, 349, 362. + +\bugonpage A469, left column (12/3/89) + +\eightpoint\indent\hbox to0pt{\hss\lower1pt\hbox{*}}% +|\language| (hyphenation method), 273, 346, $\underline{455}$. + +\bugonpage A469, right column (10/30/89) + +\eightpoint\indent\hbox to0pt{\hss\lower1pt\hbox{*}}% +|\lefthyphenmin|, 273, {\it364}, $\underline{454}$, 455. + +\bugonpage A472, left column (12/3/89) + +\eightpoint +|\newlanguage|, 346, $\underline{347}$. + +\bugonpage A476, left column (10/30/89) + +\eightpoint\indent\hbox to0pt{\hss\lower1pt\hbox{*}}% +|\righthyphenmin|, 273, {\it364}, $\underline{454}$, 455. + +\bugonpage A479, new entry (3/13/90) + +\eightpoint +|\topglue|, {\it340}, $\underline{352}$. + +\bugonpage A480, right column (3/13/90) + +\eightpoint +|\vglue|, $\underline{352}$, {\it408}. + +\bugonpage A483, the Providence lines (10/8/89) + +\noindent[Change the first one to +\begintt +Providence RI 02940\kern.05em-9506, USA. +\endtt +Then the second one will be +\begindisplay +Providence RI 02940\kern.05em-9506, USA. +\enddisplay +The second line will also appear on page C361.] + +% +% volume B +\hsize=35pc +\def\\#1{\hbox{\it#1\/\kern.05em}} % italic type for identifiers +\def\to{\mathrel{.\,.}} % double dot, used only in math mode + + +% +% volume C +\hsize=29pc +\def\\#1{\hbox{\it#1\/\kern.05em}} % italic type for identifiers + +\bugonpage C220, top line (3/13/90) + +\ninepoint\noindent +modes you get into by hitting +`|S|', `|R|', or `|Q|', respectively, in response to error messages\cutpar + +\bugonpage C252, line 16 (3/13/90) + +\ninepoint\indent +| for i:=1 upto n_windows: display blankpicture inwindow i; endfor| + +\bugonpage C264, lines 4--6 from the bottom (3/24/90) + +\ninepoint\noindent +|vardef |^|counterclockwise|| primary c =|\par\noindent +| if turningcheck>0:|\par\noindent +| interim |^|autorounding||:=0;|\par\noindent +| if |^|turningnumber|| c <= 0: reverse fi fi c enddef;| + +\bugonpage C306, line 6 (3/13/90) + +\ninepoint\noindent +| ligtable "'": "'" =: oct"042", % close quotes| + +\bugonpage C309, second line from bottom (11/18/89) + +\ninepoint\noindent +| define_whole_vertical_blacker_pixels(vair,slab,| $\cdots$ |);| + +\bugonpage C315, line 9 from the bottom (1/2/90) + +\ninepoint\noindent +units of printer's points): + +\bugonpage C337, line 4 from the bottom (1/7/90) + +\ninepoint\noindent +|\def\startfont{\font\testfont=\fontname \spaceskip=0pt| + +% +% Volume D +\hsize=35pc +\def\\#1{\hbox{\it#1\/\kern.05em}} % italic type for identifiers +\def\to{\mathrel{.\,.}} % double dot, used only in math mode + +% +% volume E +\hsize=29pc +\def\dashto{\mathrel{\hbox{-\kern-.05em}\mkern3.9mu\hbox{-\kern-.05em}}} + +\bugonpage E325, line 13 (3/13/90) + +\ninepoint\noindent +{\bf if} \\{serifs}: $x_{3r}=\max(x_{1r},{\rm hround}(x_1+.5\\{dot\_diam} + -.2\\{jut})-.5\\{tiny})$\par\noindent +{\bf else}: $x_3=x_1-.5$ {\bf fi}; + +\bugonpage E483, line 4 (3/13/90) + +\ninepoint +\rightline{\% Character codes \oct{000}--\oct{100} and \oct{133}--\oct{177} + are generated.} + +\bugonpage E544, line 5 (3/13/90) + +\ninepoint\noindent +\hskip 3em\vdots\hskip2em\raise2pt\hbox{(the rest of the + program for `$\gamma$' in |greekl| comes here)} + +\bugonpage E557, line 9 (3/13/90) + +\ninepoint +\rightline{\sl`Nevermore---Ah nevermore.'\thinspace''} + +\bugonpage E558, line 21 (3/13/90) + +\eightpoint\noindent +|Clasp a rare and radiant maiden whom the angels name Lenore."| + +\bugonpage E570, lines 27--28 look better with proper skewchars (3/13/90) + +\begingroup +\tenpoint\bf +\textfont0=\tenbf \scriptfont0=\sevenbf +\font\boldi=cmmib10 \font\boldsy=cmbsy10 +\skewchar\boldi='177 \skewchar\boldsy='60 +\textfont1=\boldi +\textfont2=\boldsy +\noindent Here's some bold 10-point math: +${\hat A}^\Gamma_0 ++{\check B}^\Delta_1 +-{\tilde C}^\Theta_2 +\times{\acute D}^\Lambda_3 +/{\grave E}^\Xi_4 +\oplus{\dot F}^\Pi_5 +\ominus{\ddot G}^\Sigma_6 +\otimes{\breve H}^\Phi_7 +\oslash{\bar I}^\Psi_8 +\odot{\vec J}^{\,\Omega}_9$. +\endgroup + +% +\bye + + +######################################################################## + +Additions to MF84.BUG as of 25 Mar 90 + +553. Global variable used prematurely in do_add_to (Alan Jeffrey, 9 Feb 90) +@x module 403 +@!cur_path_type:double_path_code..also_code; {likewise} +@y +@!cur_path_type:double_path_code..contour_code; {likewise} +@z +@x module 1059 +begin get_x_next; var_flag:=thing_to_add; scan_primary; +if cur_type<>token_list then + @ +else begin lhs:=cur_exp; cur_path_type:=cur_mod;@/ + cur_type:=vacuous; get_x_next; scan_expression; + if cur_path_type=also_code then @ +@y +@!add_to_type:double_path_code..also_code; {modifier of \&{addto}} +begin get_x_next; var_flag:=thing_to_add; scan_primary; +if cur_type<>token_list then + @ +else begin lhs:=cur_exp; add_to_type:=cur_mod;@/ + cur_type:=vacuous; get_x_next; scan_expression; + if add_to_type=also_code then @ +@z +@x module 1064 +else begin lhs:=null; +@y +else begin lhs:=null; cur_path_type:=add_to_type; +@z + +554. Balance the parens showing on the terminal (for Lispers). +@x module 631 +@!in_open : 0..max_in_open; {the number of lines in the buffer, less one} +@y +@!in_open : 0..max_in_open; {the number of lines in the buffer, less one} +@!open_parens : 0..max_in_open; {the number of open text files} +@z +@x module 657 +in_open:=0; max_buf_stack:=0; +@y +in_open:=0; open_parens:=0; max_buf_stack:=0; +@z +@x module 681 + begin print_char(")"); force_eof:=false; + update_terminal; {show user that file has been read} +@y + begin print_char(")"); decr(open_parens); + update_terminal; {show user that file has been read} + force_eof:=false; +@z +@x module 793 +print_char("("); print(name); update_terminal; +@y +print_char("("); incr(open_parens); print(name); update_terminal; +@z +@x module 1209 +if job_name=0 then open_log_file; +@y +if job_name=0 then open_log_file; +while open_parens>0 do + begin print(" )"); decr(open_parens); + end; +@z + +-----------Here I draw the line with respect to further changes + +555. (I sincerely hope that there won't be any more) + + +######################################################################## + +Differences between WEAVE.WEB versions 3.0 and 3.1 + +;COMPARISON OF TX:WEAVE-40.WEB.1 AND TX:WEAVE-41.WEB.1 +;OPTIONS ARE /E /3 + +**** FILE TX:WEAVE-40.WEB.1, 1-22 (1401) +% Version 3, for Sewell's book, fixed a long-line bug in input_ln (March, 1989). +% Version 3.1 fixed a bug for programs with only one module (April, 1989). +% Version 4 was major change to allow 8-bit input (September, 1989). + +% Here is TeX material that gets inserted after \input webmac +**** FILE TX:WEAVE-41.WEB.1, 1-22 (1401) +% Version 3, for Sewell's book, fixed long-line bug in input_ln (March, 1989). +% Version 3.1 fixed a bug for programs with only one module (April, 1989). +% Version 4 was major change to allow 8-bit input (September, 1989). +% Version 4.1, for Breitenlohner, avoids English-only output (March, 1990). + +% Here is TeX material that gets inserted after \input webmac +*************** + +**** FILE TX:WEAVE-40.WEB.1, 1-45 (2420) + \centerline{(Version 4)} + \vfill} +**** FILE TX:WEAVE-41.WEB.1, 1-46 (2495) + \centerline{(Version 4.1)} + \vfill} +*************** + +**** FILE TX:WEAVE-40.WEB.1, 1-72 (3524) +@d banner=='This is WEAVE, Version 4' + +@ The program begins with a fairly normal header, made up of pieces that +**** FILE TX:WEAVE-41.WEB.1, 1-73 (3601) +@d banner=='This is WEAVE, Version 4.1' + +@ The program begins with a fairly normal header, made up of pieces that +*************** + +**** FILE TX:WEAVE-40.WEB.1, 1-4450 (175079) +`\.{\\A\ section 101.}'; `\.{\\U\ sections 370 and 1009.}'; +`\.{\\A\ sections 8, 27\\*, and 64.}'. + +@p procedure footnote(@!flag:sixteen_bits); {outputs module cross-references} +**** FILE TX:WEAVE-41.WEB.1, 1-4451 (175158) +`\.{\\A101.}'; `\.{\\Us370\ET1009.}'; `\.{\\As8, 27\\*, 51\ETs64.}'. + +@p procedure footnote(@!flag:sixteen_bits); {outputs module cross-references} +*************** + +**** FILE TX:WEAVE-40.WEB.1, 1-4461 (175460) +out4(" ")("s")("e")("c"); out4("t")("i")("o")("n"); +@; +**** FILE TX:WEAVE-41.WEB.1, 1-4461 (175508) +@; +*************** + +**** FILE TX:WEAVE-40.WEB.1, 1-4472 (175912) +out("~"); +loop@+ begin out_mod(num(cur_xref)-flag); +**** FILE TX:WEAVE-41.WEB.1, 1-4471 (175907) +@.\\As@> +@.\\Us@> +loop@+ begin out_mod(num(cur_xref)-flag); +*************** + +**** FILE TX:WEAVE-40.WEB.1, 1-4476 (176085) + if (num(xlink(cur_xref))>flag)or(cur_xref<>xlink(q)) then out(","); + {not the last of two} + out(" "); + if num(xlink(cur_xref))<=flag then out4("a")("n")("d")("~"); {the last} + end; +**** FILE TX:WEAVE-41.WEB.1, 1-4476 (176089) + if num(xlink(cur_xref))>flag then out2(",")(" ") {not the last} + else begin out3("\")("E")("T"); {the last} +@.\\ET@> + if cur_xref<>xlink(q) then out("s"); {the last of more than two} +@.\\ETs@> + end; + end; +*************** + + +######################################################################## + +Differences between old WEBMAC.TEX and new + +;COMPARISON OF TX:WEBMAC.CM.1 AND TX:WEBMAC.TEX.1 +;OPTIONS ARE /E /3 + +**** FILE TX:WEBMAC.CM.1, 1-2 (63) +\xdef\fmtversion{\fmtversion+WEBMAC1.4} +\parskip 0pt % no stretch between paragraphs +**** FILE TX:WEBMAC.TEX.1, 1-2 (63) +\xdef\fmtversion{\fmtversion+WEBMAC4.0} % identifies current set of macros +\parskip 0pt % no stretch between paragraphs +*************** + +**** FILE TX:WEBMAC.CM.1, 1-58 (2559) +\def\note#1#2.{\Y\noindent{\hangindent2em\baselineskip10pt\eightrm#1 #2.\par}} +\def\lapstar{\rlap{*}} +**** FILE TX:WEBMAC.TEX.1, 1-58 (2594) +\def\note#1#2.{\Y\noindent{\hangindent2em\baselineskip10pt\eightrm#1~#2.\par}} +\def\lapstar{\rlap{*}} +*************** + +**** FILE TX:WEBMAC.CM.1, 1-62 (2808) +\def\A{\note{See also}} % cross-reference for multiply defined section names +\def\B{\ma@\{}}egin olled comment +**** FILE TX:WEBMAC.TEX.1, 1-62 (2843) +\def\A{\note{See also section}} % crossref for doubly defined section name +\def\As{\note{See also sections}} % crossref for multiply defined section name +\def\B{\mathopen{\.{@\{}}} % begin controlled comment +*************** + +**** FILE TX:WEBMAC.CM.1, 1-68 (3169) +\def\F{\defin{format}} % format definition +**** FILE TX:WEBMAC.TEX.1, 1-69 (3282) +\def\ET{ and~} % conjunction between two section numbers +\def\ETs{, and~} % conjunction between the last two of several section numbers +\def\F{\defin{format}} % format definition +*************** + +**** FILE TX:WEBMAC.CM.1, 1-96 (4553) +\def\U{\note{This code is used in}} % cross-reference for uses of sections +\let\V=\lor % logical or +**** FILE TX:WEBMAC.TEX.1, 1-99 (4804) +\def\U{\note{This code is used in section}} % crossref for use of a section +\def\Us{\note{This code is used in sections}} % crossref for uses of a section +\let\V=\lor % logical or +*************** + +**** FILE TX:WEBMAC.CM.1, 1-186 (9074) + \def\U{\note{Used in}} % cross-reference for uses of sections + \def\:{\par\hangindent 2em}\let\*=*\let\.=\ttentry} +**** FILE TX:WEBMAC.TEX.1, 1-190 (9406) + \def\U{\note{Used in section}} % crossref for use of a section + \def\Us{{Used in sections}} % cro for uses on + \def\:{\par\hangindent 2em}\let\*=*\let\.=\ttentry} +*************** + + +######################################################################## + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Character code reference +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Upper case letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ +% Lower case letters: abcdefghijklmnopqrstuvwxyz +% Digits: 0123456789 +% Square, curly, angle braces, parentheses: [] {} <> () +% Backslash, slash, vertical bar: \ / | +% Punctuation: . ? ! , : ; +% Underscore, hyphen, equals sign: _ - = +% Quotes--right left double: ' ` " +%"at", "number" "dollar", "percent", "and": @ # $ % & +% "hat", "star", "plus", "tilde": ^ * + ~ +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +[ end of message 025 ] diff --git a/info/digests/tex-implementors/026 b/info/digests/tex-implementors/026 new file mode 100644 index 0000000000..d1cafa76fc --- /dev/null +++ b/info/digests/tex-implementors/026 @@ -0,0 +1,217 @@ +Date: 14 Aug 90 Message No: 026 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: Some corrections; TFtoPL 3.1; catching up + + +I started putting this message together in April, but was interrupted +and never sent it. Fortunately, there has not been too much activity in +the intervening months that has required new versions of TeX/ware and +MF/ware to be retrieved and installed; however, I recently received a +message from Knuth saying that he expected to spend some of August +tending to his TeX correspondence, so it's time to clear the decks. + +It was called to my attention that some lines in difference listings in +these messages have been corrupted. Below are corrections as necessary. +The corrected passages include the complete difference segments, not just +individual lines. Please replace the offending segments as appropriate. +(Note that if you received andy of the affected messages after the initial +mailing, the original files have been corrected.) + +A short explanation may be useful. I use the TOPS-20 SRCCOM program to +generate the difference lists. This program has a couple of flaws (it +omits blank lines, for example), but it has the virtue that it does not +extend lines beyond their original length, unlike the VMS DIF program, +which is the only other option available to me. This makes for more +reliable transmission across network gateways. After creating and +validating a difference file, I transfer it to a VAX for construction of +the message and mailing. This sometimes runs afoul of a TOPS-20/VMS +imcompatibility, namely that the DEC-20 is a 36-bit-word machine, and +ascii is packed at 5 characters to a word with one slack bit. If the +slack bit happens to be turned on, that word will be lost in the 20-to-VAX +transfer. In the examples corrected here, I forgot to take one more step, +namely running the difference files through a program that turns off all +slack bits. I realize there are undoubtedly better tools available to do +this job automatically, but the local systems programming staff hasn't +come up with any. Apologies for any problems caused by these errors. + +Although it's probably general knowledge by now, having been posted to +TeXhax, Karl Berry is now "more or less maintaining" web2c. To quote +his most recent message to me, "the port for TeX 3.0 and Metafont 2.0 +is released, and now on ics.uci.edu and labrea.stanford.edu, as well +as in Europe." Any questions can be sent to Karl at karl@cs.umb.edu +on CSnet. + +The afore-mentioned TOPS-20 machine is scheduled to be unplugged at the +end of the year. One of my biggest jobs is to migrate all the Math +Society's TeX archives and records from the 20 to the VAX, and I'm +spending every spare moment on that. In the process, I keep finding +things that should have been announced here, so I will announce them, +regardless of how late. For a start, TFtoPL was upgraded to version 3.1 +last November. Differences between versions 3.0 and 3.1 below. + +Oren Patashnik has announced the availability of a set of TeX macros that +make BibTeX work with plain TeX; the message to TeXhax will be distributed +in due course, but here's a copy of the advance notice he sent me: + + Date: Tue, 14 Aug 1990 10:19:50 PDT + From: Oren Patashnik + To: texhax@cs.washington.edu + Subject: BibTeX-for-plain-TeX macros + + There is now distributed with BibTeX a set of TeX macros that makes + BibTeX work with plain TeX (and presumably with other macro packages + that don't deviate too far from plain TeX). The file is btxmac.tex, + stored on Labrea.Stanford.EDU's BibTeX area (pub/tex/bibtex). + + --Oren Patashnik + +Finally, it's now been about four months since I last sent a message to +this list, and quite a few address changes have been made. Please help +out by acknowledging receipt. (I should hear about the bounces sooner +than I'd like to.) + + +######################################################################## + +Corrections to differences between WEBMAC.TEX versions 1.4 and 4.0 +(message #25) + +**** FILE TX:WEBMAC.CM.1, 1-62 (2808) +\def\A{\note{See also}} % cross-reference for multiply defined section names +\def\B{\mathopen{\.{@\{}}} % begin controlled comment +**** FILE TX:WEBMAC.TEX.1, 1-62 (2843) +\def\A{\note{See also section}} % crossref for doubly defined section name +\def\As{\note{See also sections}} % crossref for multiply defined section name +\def\B{\mathopen{\.{@\{}}} % begin controlled comment +*************** + +**** FILE TX:WEBMAC.CM.1, 1-186 (9074) + \def\U{\note{Used in}} % cross-reference for uses of sections + \def\:{\par\hangindent 2em}\let\*=*\let\.=\ttentry} +**** FILE TX:WEBMAC.TEX.1, 1-190 (9406) + \def\U{\note{Used in section}} % crossref for use of a section + \def\Us{\note{Used in sections}} % crossref for uses of a section + \def\:{\par\hangindent 2em}\let\*=*\let\.=\ttentry} +*************** + + +######################################################################## + +Differences between TFtoPL.WEB versions 3.0 and 3.1 + +;COMPARISON OF TX:TFTOPL-30.WEB.1 AND TX:TFTOPL-31.WEB.1 +;OPTIONS ARE /E /3 + +**** FILE TX:TFTOPL-30.WEB.1, 1-15 (852) +% Here is TeX material that gets inserted after \input webmac +**** FILE TX:TFTOPL-31.WEB.1, 1-14 (850) +% Version 3.1 (November 1989) renamed z[] to lig_z[] for better portability. + +% Here is TeX material that gets inserted after \input webmac +*************** + +**** FILE TX:TFTOPL-30.WEB.1, 1-32 (1473) + \centerline{(Version 3, October 1989)} + \vfill} +**** FILE TX:TFTOPL-31.WEB.1, 1-33 (1551) + \centerline{(Version 3.1, November 1989)} + \vfill} +*************** + +**** FILE TX:TFTOPL-30.WEB.1, 1-63 (2869) +@d banner=='This is TFtoPL, Version 3' {printed when the program starts} + +@ This program is written entirely in standard \PASCAL, except that +**** FILE TX:TFTOPL-31.WEB.1, 1-64 (2950) +@d banner=='This is TFtoPL, Version 3.1' {printed when the program starts} + +@ This program is written entirely in standard \PASCAL, except that +*************** + +**** FILE TX:TFTOPL-30.WEB.1, 1-1256 (48904) + end; + right; +**** FILE TX:TFTOPL-31.WEB.1, 1-1257 (48987) + end; {there are no other cases} + right; +*************** + +**** FILE TX:TFTOPL-30.WEB.1, 1-1409 (54539) +@!z:array[0..hash_size] of 0..257; +@!hash_ptr:0..hash_size; {the number of nonzero entries in |hash|} +**** FILE TX:TFTOPL-31.WEB.1, 1-1410 (54649) +@!lig_z:array[0..hash_size] of 0..257; +@!hash_ptr:0..hash_size; {the number of nonzero entries in |hash|} +*************** + +**** FILE TX:TFTOPL-30.WEB.1, 1-1471 (57148) + t:=z[h]; z[h]:=zz; zz:=t; + end; +**** FILE TX:TFTOPL-31.WEB.1, 1-1472 (57262) + t:=lig_z[h]; lig_z[h]:=zz; zz:=t; + end; +*************** + +**** FILE TX:TFTOPL-30.WEB.1, 1-1475 (57240) +hash[h]:=key; class[h]:=cc; z[h]:=zz; incr(hash_ptr); hash_list[hash_ptr]:=h; +30:end; +**** FILE TX:TFTOPL-31.WEB.1, 1-1476 (57362) +hash[h]:=key; class[h]:=cc; lig_z[h]:=zz; incr(hash_ptr); + hash_list[hash_ptr]:=h; +30:end; +*************** + +**** FILE TX:TFTOPL-30.WEB.1, 1-1513 (58592) +left_z: begin class[h]:=pending; z[h]:=eval(z[h],y); class[h]:=simple; + end; +right_z: begin class[h]:=pending; z[h]:=eval(x,z[h]); class[h]:=simple; + end; +both_z: begin class[h]:=pending; z[h]:=eval(eval(x,z[h]),y); class[h]:=simple; + end; +pending: begin x_lig_cycle:=x; y_lig_cycle:=y; z[h]:=257; class[h]:=simple; + end; {the value 257 will break all cycles, since it's not in |hash|} +end; {there are no other cases} +f:=z[h]; +end; +**** FILE TX:TFTOPL-31.WEB.1, 1-1514 (58718) +left_z: begin class[h]:=pending; lig_z[h]:=eval(lig_z[h],y); class[h]:=simple; + end; +right_z: begin class[h]:=pending; lig_z[h]:=eval(x,lig_z[h]); class[h]:=simple; + end; +both_z: begin class[h]:=pending; lig_z[h]:=eval(eval(x,lig_z[h]),y); + class[h]:=simple; + end; +pending: begin x_lig_cycle:=x; y_lig_cycle:=y; lig_z[h]:=257; class[h]:=simple; + end; {the value 257 will break all cycles, since it's not in |hash|} +end; {there are no other cases} +f:=lig_z[h]; +end; +*************** + + +######################################################################## + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Character code reference +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Upper case letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ +% Lower case letters: abcdefghijklmnopqrstuvwxyz +% Digits: 0123456789 +% Square, curly, angle braces, parentheses: [] {} <> () +% Backslash, slash, vertical bar: \ / | +% Punctuation: . ? ! , : ; +% Underscore, hyphen, equals sign: _ - = +% Quotes--right left double: ' ` " +%"at", "number" "dollar", "percent", "and": @ # $ % & +% "hat", "star", "plus", "tilde": ^ * + ~ +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +[ end of message 026 ] +------- + diff --git a/info/digests/tex-implementors/027 b/info/digests/tex-implementors/027 new file mode 100644 index 0000000000..7e7cbb25af --- /dev/null +++ b/info/digests/tex-implementors/027 @@ -0,0 +1,229 @@ +Date: 22 October 90 Message No: 027 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: AMSFonts bug; TeX 3.1; MF 2.7 + + +This will be a short message. I am constrained by a TUGboat printer +deadlne, but it's been so long since anything has been reported, I +wanted to let you know I'm still alive. + +A bug was reported in the AMSSYM.DEF file in the AMSFonts package. The +fix has not yet been posted to the file on e-Math, but is listed below. +The symptom is "unidentified control sequence" for \setboxz@h when +trying to use \widetilde or \widehat. If you have not yet heard about +e-Math (most of you should have received a message from Regina Girouard +describing what is available there and how to retrieve it), please let +me know, and I will send information. + +Chris Thompson has suggested that, similar to the occasional reports +of files changed at labrea, I include in these messages a report of +files changed at e-Math. I will try to get a baseline listing of the +e-Math holdings for later comparison, and make reports as suggested. + +As of August 15, I had completed my scan of old mail files and double +checked that all bug reports and questions forwarded to me had been +delivered to Don Knuth. (Actually, the last of the pending reports had +been delivered earlier, but I can say with a clear conscience that I +think i found all messages that had arrived electronically and passed +them on. A few have arrived since then, and I will forward them as +soon as TUGboat has been delivered.) I have received from Don (on paper) +a pile of annotated reports and several checks; I will forward those to +the proper people as soon as TUGboat, ... + +In the meantime, TeX is now at version 3.1, MF is at version 2.7, and +at least some of you may have seen Don's announcement that the numbers +will converge to $\pi$ for TeX and $e$ for MF. (It will be published +in TUGboat 11#4, but I will forward it to this list if I have time +before that appears.) There was a massive update of files at labrea +on September 21. On some (e.g. cm85.bug) only the dates have changed; +too bad the Unix file system isn't better about keeping meaningful +dates. In any case, the new errata and bug additions for TeX and MF +are attached below. + + +######################################################################## + +Bug fix for AMSSYM.DEF (AMSFonts package) + +************ +File SYSA:[AMSFONTS.DISTRIB.2-0]AMSSYM.DEF;5 (line 33) +\def\newsymbol#1#2#3#4#5{\let\next@\relax +****** +File SYSA:[AMSFONTS.DISTRIB.WORK]AMSSYM.DEF;6 (line 33) +\def\setboxz@h{\setbox\z@\hbox} +\def\wdz@{\wd\z@} +\def\newsymbol#1#2#3#4#5{\let\next@\relax +************ + +Number of difference sections found: 1 +Number of difference records found: 2 + +DIFFERENCES /IGNORE=()/MERGED=1- + SYSA:[AMSFONTS.DISTRIB.2-0]AMSSYM.DEF;5- + SYSA:[AMSFONTS.DISTRIB.WORK]AMSSYM.DEF;6 + + +######################################################################## + +Addenda to TEX82.BUG as of 21 September 90 + +390. Uninitialized nullfont parameters (found by Lance Carnes, 11 May 90). +@x module 552 +hyphen_char[null_font]:="-"; skew_char[null_font]:=-1; +@y +hyphen_char[null_font]:="-"; skew_char[null_font]:=-1; +bchar_label[null_font]:=non_address; +font_bchar[null_font]:=non_char; font_false_bchar[null_font]:=non_char; +@z + +391. Disable \write{\the\prevgraf} (B. Jackowski, July 1990). +@x module 422 +begin nest[nest_ptr]:=cur_list; p:=nest_ptr; +while abs(nest[p].mode_field)<>vmode do decr(p); +scanned_result(nest[p].pg_field)(int_val); +end +@y +if mode=0 then scanned_result(0)(int_val) {|prev_graf=0| within \.{\\write}} +else begin nest[nest_ptr]:=cur_list; p:=nest_ptr; + while abs(nest[p].mode_field)<>vmode do decr(p); + scanned_result(nest[p].pg_field)(int_val); + end +@z + +392. Report correct line number when buffer overflows (George Russell). +@x module 538 +begin if input_ln(cur_file,false) then do_nothing; +firm_up_the_line; +if end_line_char_inactive then decr(limit) +else buffer[limit]:=end_line_char; +first:=limit+1; loc:=start; line:=1; +@y +begin line:=1; +if input_ln(cur_file,false) then do_nothing; +firm_up_the_line; +if end_line_char_inactive then decr(limit) +else buffer[limit]:=end_line_char; +first:=limit+1; loc:=start; +@z + +393. (I sincerely hope that there won't be any more) + + +######################################################################## + +Addenda to MF84.BUG as of 21 September 90 + +555. Don't try system area if an area was given (see tex82.bug number 312; +found by Jonathan Kew, May 1990) +@x + pack_file_name(cur_name,MF_area,cur_ext); + if a_open_in(cur_file) then goto done; +@y + if cur_area="" then + begin pack_file_name(cur_name,MF_area,cur_ext); + if a_open_in(cur_file) then goto done; + end; +@z + +556. Report correct line number when buffer overflows (CET, Jul 90). +@x module 794 +begin if not input_ln(cur_file,false) then do_nothing; +firm_up_the_line; +buffer[limit]:="%"; first:=limit+1; loc:=start; line:=1; +@y +begin line:=1; +if input_ln(cur_file,false) then do_nothing; +firm_up_the_line; +buffer[limit]:="%"; first:=limit+1; loc:=start; +@z + +557. (I sincerely hope that there won't be any more) + + +######################################################################## + +Changes to ERRATA.FIVE as of 21 September 90 + +\bugonpage A336, lines 4--8 from the bottom (9/23/89) +% was \bugonpage A336, lines 4--8 (9/23/89) + +\bugonpage A337, lines 2--16 (9/23/89) +% was \bugonpage A336, lines 2--16 (9/23/89) + + +######################################################################## + +New errata in ERRATA.TEX as of 21 September 90 + +\bugonpage A124, lines 18--21 (9/5/90) + +\ninepoint\noindent +Floating insertions can be accommodated +as a special case of split insertions, by making each floating topinsert +start with a small penalty, and by having +zero as the associated |\floatingpenalty|; non-floating insertions +like footnotes are accommodated by associating larger penalties with +split insertions (see Appendix~B). + +\bugonpage A165, lines 2--3 (8/13/90) + +\ninepoint + Type the formula $\bf\bar x^{\rm T}Mx={\rm0}\iff x=0$, +using as few keystrokes as possible. +\ (The first `0' is roman, the second is bold. The superscript `T' is roman.) + +\bugonpage A317, line 17 (5/17/90) + +\ninepoint +|\pretolerance=9999 \tolerance=9999 \parindent=0pt| + +\bugonpage A321, lines 16--17 (8/13/90) + +\ninepoint\noindent +\hbox to\parindent{\bf\hss18.6.\enspace}\ignorespaces +|$\bf\bar x^{\rm T}Mx={\rm0}\iff x=0$|. \ (If you typed a space between +|\rm| and~|0|, you wasted a keystroke; but don't feel guilty about it.) + +\bugonpage Exiii, replacement for last four lines (4/30/90) + +\textindent{\bull}``AMS Euler---A new typeface for mathematics'' + by Donald~E. Knuth +and Hermann Zapf, {\sl Scholarly Publishing\/ \bf21} (1989), 131--157. +\ {\it The story of a design project that helps bridge the gulf between +mathematics and art.} + +\smallskip +\textindent{\bull}``Meta-Marks: + Preliminary studies for a Pandora's Box of shapes'' +by Neenie Billawala, Stanford Computer Science report 1259 (Stanford, +California, July 1989), 132~pp. +\ {\it Lavishly illus\-trated studies in parameter variation, +leading to the design of a new typeface called Pandora.} + + +######################################################################## + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Character code reference +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Upper case letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ +% Lower case letters: abcdefghijklmnopqrstuvwxyz +% Digits: 0123456789 +% Square, curly, angle braces, parentheses: [] {} <> () +% Backslash, slash, vertical bar: \ / | +% Punctuation: . ? ! , : ; +% Underscore, hyphen, equals sign: _ - = +% Quotes--right left double: ' ` " +%"at", "number" "dollar", "percent", "and": @ # $ % & +% "hat", "star", "plus", "tilde": ^ * + ~ +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +[ end of message 027 ] +------- + diff --git a/info/digests/tex-implementors/028 b/info/digests/tex-implementors/028 new file mode 100644 index 0000000000..a8091fcaad --- /dev/null +++ b/info/digests/tex-implementors/028 @@ -0,0 +1,705 @@ +Date: 19 Mar 90 Message No: 028 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: Updates to TeX.WEB, MF.WEB, GFtoDVI, et al. + + +New versions of TeX.WEB, MF.WEB and other updates have been installed +at labrea, as Dan Kolkowitz has reported. For the benefit of those who +may not be able to ftp these files easily, this message contains some +of the more important details: + + New files at labrea since 3 January 91 + Changes to the errata list (ERRATA.SIX) + Addenda to TeX82.BUG as of 13 March 91 + Addenda to MF84.BUG as of 13 March 91 + Differences between TeX.WEB 3.1 and 3.14 (as of 18 March 1991) + Differences between TeX.WEB 3.0 and 3.1 (as of 21 September 1990) + Differences between MF.WEB 2.0 and MF.WEB 2.7 (as of 13 March 1991) + Cosmetic change, GFTODVI.WEB, ver 3.0 + +Differences in TeX.WEB are provided in two parts since the details of the +update from version 3.0 to 3.1 was never reported in one of these messages. +In fact, both TeX.WEB and MF.WEB have been updated twice, with only one +version change, since the previous update. The most recent changes were, +as Don Knuth says in the prose at the top, only cosmetic; cosmetic changes +do not usually appear in the bug listings, but should generally be made to +the main WEB files anyhow in order to keep in synch. + +This is the last time that it will be possible to provide the difference +listings in this form. These difference listings were prepared with a +TOPS-20 utility, and the Math Society's DEC-20 is being unplugged and +de-installed tomorrow. We now have a couple of Unix workstations, and +the Unix differencing utility seems to be the best replacement (as soon +as I learn how to use it). Although the VAX/VMS DIFF utility does a good +job of identifying differences, it adds a line number to each difference +line, often resulting in lines of more than 80 characters in length; not +a robust format for sending in e-mail across random network gateways. + +As usual, there have been a number of updates to this mailing list since +the last time I sent a message directly, so if everyone receiving this +message could please acknowledge it, that will help keep the list in +good shape. + + +######################################################################## + +New files at labrea.stanford.edu since 3 Jan 91 + +/tex: +-rw-r--r-- 1 468 fsuser 52165 Mar 13 17:03 DIFFS.Mar91 +-rw-r--r-- 1 468 fsuser 0 Mar 13 17:24 tex.log + +/tex/OLD.pre-Mar91: +total 7 +drwxr-xr-x 2 468 fsuser 512 Mar 13 17:14 cweb +drwxr-xr-x 2 468 fsuser 512 Mar 13 17:19 errata +drwxr-xr-x 6 468 fsuser 512 Mar 13 17:14 local +drwxr-xr-x 2 468 fsuser 512 Mar 13 17:18 mf +drwxr-xr-x 2 468 fsuser 512 Mar 13 17:16 mfware +drwxr-xr-x 2 468 fsuser 512 Mar 13 17:18 tex +drwxr-xr-x 2 468 fsuser 512 Mar 13 17:14 tugboat + +/tex/bibtex: +-rw-rw-r-- 1 weening ftp 27577 Mar 15 15:45 btxmac.tex + +/tex/errata: +-rw-rw-rw- 1 468 fsuser 15838 Mar 15 21:40 errata.six +-rw-r--r-- 1 468 fsuser 2528 Mar 13 17:05 errata.tex +-rw-r--r-- 1 468 fsuser 79228 Mar 13 17:05 mf84.bug +-rw-r--r-- 1 468 fsuser 295236 Mar 13 17:05 tex82.bug + +/tex/latex: +-rw-rw-r-- 1 root ftp 15834 Jan 14 18:58 addendum.tex +-r--r--r-- 1 root fsuser 40243 Feb 8 21:02 latex.bug +-r--r--r-- 1 root fsuser 286412 Feb 8 21:02 latex.tex +-r--r--r-- 1 root fsuser 48458 Feb 8 21:02 lplain.tex +-r--r--r-- 1 root fsuser 48804 Feb 8 21:03 splain.tex + +/tex/local/cm: +-rw-rw-rw- 1 468 fsuser 3561 Mar 15 21:44 ccmic9.mf +-rw-rw-rw- 1 468 fsuser 217 Mar 15 21:44 odigs.mf + +/tex/local/lib: +-rw-r--r-- 1 468 fsuser 3133 Mar 13 17:08 art.mf +-rw-rw-r-- 1 468 fsuser 33699 Mar 13 17:09 gkpmac.tex +-rw-r--r-- 1 468 fsuser 1581 Mar 13 17:09 list.tex +-rw-r--r-- 1 468 fsuser 2179 Mar 13 17:09 llist.tex +-rw-r--r-- 1 468 fsuser 263 Mar 13 17:09 oneone.mf +-rw-r--r-- 1 468 fsuser 8240 Mar 13 17:09 picmac.tex + +/tex/local/mf: +-rw-r--r-- 1 468 fsuser 691 Mar 13 17:09 plain.log + +/tex/local:/tex/local/mfware: +-rw-r--r-- 1 468 fsuser 28547 Mar 13 17:10 gftodvi.ch + +/tex/local/tex: +-rw-r--r-- 1 468 fsuser 53657 Mar 13 17:10 initex.ch + +/tex/mf: +-rw-r--r-- 1 468 fsuser 916840 Mar 13 17:06 mf.web +-rw-r--r-- 1 468 fsuser 938679 Mar 13 17:06 mfbook.tex +-rw-r--r-- 1 468 fsuser 18238 Mar 5 23:56 trapman.tex + +/tex/mfware: +-rw-r--r-- 1 468 fsuser 186545 Mar 13 17:06 gftodvi.web + +/tex/tex: +-rw-r--r-- 1 468 fsuser 1025435 Mar 18 21:20 tex.web +-rw-r--r-- 1 468 fsuser 1381907 Mar 13 17:07 texbook.tex +-rw-r--r-- 1 468 fsuser 2438 Mar 13 17:07 trip.fot +-rw-r--r-- 1 468 fsuser 182701 Mar 13 17:07 trip.log +-rw-r--r-- 1 468 fsuser 18025 Mar 13 17:07 trip.typ +-rw-r--r-- 1 468 fsuser 12930 Mar 13 17:08 tripin.log + +/tex/tugboat: +-rw-r--r-- 1 468 fsuser 30903 Mar 11 19:44 guidepro.tex +-rw-r--r-- 1 468 fsuser 14810 Mar 11 19:44 ltugboat.sty +-rw-r--r-- 1 468 fsuser 3785 Mar 11 19:44 ltugproc.sty +-rw-r--r-- 1 468 fsuser 25567 Mar 11 19:44 tugboat.com +-rw-r--r-- 1 468 fsuser 66791 Mar 11 19:44 tugboat.sty +-rw-r--r-- 1 468 fsuser 8901 Mar 11 19:44 tugproc.sty + + +######################################################################## + +Addenda to TeX82.BUG as of 13 March 91 + +------------- +Note: When making change 376, I forgot to delete the redundant +code in module 883, and I should also have changed the name of that +module. These cosmetic changes (and some changes to the comments) +were made in version 3.14; but TeX 3.14 is functionally +equivalent to TeX 3.1 and only a tiny bit faster. + +------------- +393. The absolutely final change (to be made after my death) +@x module 2 +@d banner=='This is TeX, Version 3.14' {printed when \TeX\ starts} +@y +@d banner=='This is TeX, Version $\pi$' {printed when \TeX\ starts} +@z +My last will and testament for TeX is that no further changes be made +under any circumstances. Improved systems should not be called simply `TeX'; +that name, unqualified, should refer only to the program for which I have +taken personal responsibility. -- Don Knuth + + +######################################################################## + +Addenda to MF84.BUG as of 13 March 91 + +------------- +557. The absolutely final change (to be made after my death) +@x module 2 +@d banner=='This is METAFONT, Version 2.7' {printed when \MF\ starts} +@y +@d banner=='This is METAFONT, Version $e$' {printed when \MF\ starts} +@z +My last will and testament for METAFONT is that no further changes be made +under any circumstances. Improved systems should not be called simply +`METAFONT'; that name, unqualified, should refer only to the program for which +I have taken personal responsibility. -- Don Knuth + + +######################################################################## + +Changes to the errata list (ERRATA.SIX) + +[ This is NOT a difference list. ] + +\def\rhead{Bugs in {\tensl Computers \& Typesetting, 1990}} + + ... + +\noindent This is a list of all corrections made to {\sl Computers \& +Typesetting}, Volumes A,~C, and E\null, between 30 September 1989 (when +the revisions for \TeX\ Version 3.0 and \MF\ Version 2.0 were made) and +December 31, 1990. + + ... + +\bugonpage A137, lines 2 and 3 from the bottom (11/9/90) + +{\eightssi +\rightline{and you shouldn't even be reading this manual,} +\rightline{which is undoubtedly all English to you.} +} + +\bugonpage A141, line 15 from the bottom (10/18/90) + +\tenpoint\noindent +Thus if you type `|$1\over2$|' (in a text) you get $1\over2$, namely style +$S$ over style~$S'$;\cutpar + + ... + +\bugonpage C11, replacement for second quotation at bottom of page (9/27/90) + +\begingroup + \eightpoint \let\tt=\ninett + \baselineskip 10pt + \parfillskip \z@ + \interlinepenalty 10000 + \leftskip \z@ plus 40pc minus \parindent + \let\rm=\eightss \let\sl=\eightssi + \everypar{\sl} + \def\par{\ifhmode\/\endgraf\fi}\obeylines +To anyone who has lived in a modern American city (except Boston) +at least one of the underlying ideas of ^{Descartes}' analytic geometry +will seem ridiculously evident. Yet, as remarked, +it took mathematicians all of two thousand years +to arrive at this simple thing. +\author ERIC TEMPLE ^{BELL}, {\sl Mathematics: Queen and Servant of % + Science\/} (1951) % p123 + +\endgroup + +\bugonpage C262, lines 19--21 (11/9/90) + +\ninepoint\noindent +for commonly occurring idioms. +For example, `{\bf stop} |"hello"|' displays `|hello|' on the terminal and waits +until \ is typed. +\beginlines +|def |^|upto|| = step 1 until enddef; def |^|downto|| = step -1 until enddef;| +\endgroup + + ... + +\bugonpage C329, line 325 (12/29/90) + +\ninepoint\noindent +which can be used to specify a nonstandard file area +or directory name for the gray\cutpar + + ... + +\bugonpage C347, left column (9/27/90) + +\eightpoint\noindent +Bell, Eric Temple, 11. + +\bugonpage C349, left column (9/27/90) + +\eightpoint\noindent +Descartes, Ren\'e, 6, 11, 19. + +\bugonpage C356, right column (9/27/90) + +\eightpoint\noindent +[remove the entry for Rex Stout.] + +\bugonpage C358, right column (9/27/90) + +\eightpoint\noindent +[remove the entry for Nero Wolfe.] + + +######################################################################## + +Differences between TeX.WEB 3.1 and 3.14 (as of 18 March 1991) + +;COMPARISON OF TX:TEX-31.WEB.1 AND TX:TEX-314.WEB.1 +;OPTIONS ARE /E /3 + +**** FILE TX:TEX-31.WEB.1, 1-43 (2896) + +% A reward of $327.68 will be paid to the first finder of any remaining bug, +**** FILE TX:TEX-314.WEB.1, 1-42 (2894) +% Version 3.14 was a cosmetic change for new Volume B (February 1991). + +% A reward of $327.68 will be paid to the first finder of any remaining bug, +*************** + +**** FILE TX:TEX-31.WEB.1, 1-183 (10169) +@d banner=='This is TeX, Version 3.1' {printed when \TeX\ starts} + +@ Different \PASCAL s have slightly different conventions, and the present +**** FILE TX:TEX-314.WEB.1, 1-184 (10241) +@d banner=='This is TeX, Version 3.14' {printed when \TeX\ starts} + +@ Different \PASCAL s have slightly different conventions, and the present +*************** + +**** FILE TX:TEX-31.WEB.1, 1-1008 (48300) +(If the \PASCAL\ compiler does not support non-local |@!goto|, the +@^system dependencies@> +**** FILE TX:TEX-314.WEB.1, 1-1009 (48373) +(If the \PASCAL\ compiler does not support non-local |@!goto|\unskip, the +@^system dependencies@> +*************** + +**** FILE TX:TEX-31.WEB.1, 1-4856 (215250) + {that's |text(font_id_base+equiv(n))|} +end +**** FILE TX:TEX-314.WEB.1, 1-4857 (215330) + {that's |font_id_text(equiv(n))|} +end +*************** + +**** FILE TX:TEX-31.WEB.1, 1-8209 (361639) + if (cur_cs=0)and@| +**** FILE TX:TEX-314.WEB.1, 1-8210 (361714) +@^recursion@> + if (cur_cs=0)and@| +*************** + +**** FILE TX:TEX-31.WEB.1, 1-9674 (418737) + +@p procedure conditional; +**** FILE TX:TEX-314.WEB.1, 1-9675 (418825) +@^recursion@> + +@p procedure conditional; +*************** + +**** FILE TX:TEX-31.WEB.1, 1-14080 (611160) + +The box returned by |clean_box| is ``clean'' in the +**** FILE TX:TEX-314.WEB.1, 1-14082 (611263) +@^recursion@> + +The box returned by |clean_box| is ``clean'' in the +*************** + +**** FILE TX:TEX-31.WEB.1, 1-14175 (615068) + +The second pass eliminates all noads and inserts the correct glue and +**** FILE TX:TEX-314.WEB.1, 1-14178 (615186) +@^recursion@> + +The second pass eliminates all noads and inserts the correct glue and +*************** + +**** FILE TX:TEX-31.WEB.1, 1-14760 (639342) + cur_style:=save_style; @; +**** FILE TX:TEX-314.WEB.1, 1-14765 (639477) +@^recursion@> + cur_style:=save_style; @; +*************** + +**** FILE TX:TEX-31.WEB.1, 1-15438 (669367) +but we clear |aux| to zero just to be tidy. + +@p @t\4@>@@t@>@/ +**** FILE TX:TEX-314.WEB.1, 1-15444 (669517) +but we clear them to zero just to be tidy. + +@p @t\4@>@@t@>@/ +*************** + +**** FILE TX:TEX-31.WEB.1, 1-17263 (749496) +@; +if post_break(q)<>null then @; +**** FILE TX:TEX-314.WEB.1, 1-17269 (749645) +@; +if post_break(q)<>null then @; +*************** + +**** FILE TX:TEX-31.WEB.1, 1-17277 (749957) + if not is_char_node(s) then if next_break(cur_p)<>null then + if cur_break(next_break(cur_p))=s then s:=r; + r:=link(s); link(s):=null; +**** FILE TX:TEX-314.WEB.1, 1-17283 (750062) + r:=link(s); link(s):=null; +*************** + +**** FILE TX:TEX-31.WEB.1, 1-17624 (764945) +hyphen can be considerably more complex than that. For example, suppose that +\.{abcdef} is a word in a font for which the only ligatures are \.{b\!c}, +\.{c\!d}, \.{d\!e}, and \.{e\!f}. If this word is to permit hyphenation +between \.b and \.c, the two patterns with and without hyphenation are +**** FILE TX:TEX-314.WEB.1, 1-17628 (764937) +hyphen can be considerably more complex than that. Suppose +\.{abcdef} is a word in a font for which the only ligatures are \.{b\!c}, +\.{c\!d}, \.{d\!e}, and \.{e\!f}. If this word permits hyphenation +between \.b and \.c, the two patterns with and without hyphenation are +*************** + +**** FILE TX:TEX-31.WEB.1, 1-19977 (866921) +hyphenation. Again we have an implied ``cursor`` between characters +|cur_l| and |cur_r|. The main difference is that the |lig_stack| can now +**** FILE TX:TEX-314.WEB.1, 1-19981 (866890) +hyphenation. Again we have an implied ``cursor'' between characters +|cur_l| and |cur_r|. The main difference is that the |lig_stack| can now +*************** + +**** FILE TX:TEX-31.WEB.1, 1-21590 (929845) +begin get_token; {|get_x_token| would fail on \.{\\ifmmode}!} +if (cur_cmd=math_shift)and(mode>0) then @ +**** FILE TX:TEX-314.WEB.1, 1-21594 (929814) +begin get_token; {|get_x_token| would fail on \.{\\ifmmode}\thinspace!} +if (cur_cmd=math_shift)and(mode>0) then @ +*************** + +**** FILE TX:TEX-31.WEB.1, 1-22413 (960656) +by making its width zero. + +@= +**** FILE TX:TEX-314.WEB.1, 1-22417 (960635) +by causing its width to be zero. + +@= +*************** + +**** FILE TX:TEX-31.WEB.1, 1-23152 (987557) +|info(par_shape_ptr)| can hold any positive~|n| such |get_node(2*n+1)| +doesn't overflow the memory capacity. +**** FILE TX:TEX-314.WEB.1, 1-23156 (987543) +|info(par_shape_ptr)| can hold any positive~|n| for which |get_node(2*n+1)| +doesn't overflow the memory capacity. +*************** + +**** FILE TX:TEX-31.WEB.1, 1-23239 (990682) +if scan_keyword("at") then @ +@.at@> +**** FILE TX:TEX-314.WEB.1, 1-23243 (990673) +if scan_keyword("at") then @ +@.at@> +*************** + +**** FILE TX:TEX-31.WEB.1, 1-23254 (991149) +@ @= +begin scan_normal_dimen; s:=cur_val; +**** FILE TX:TEX-314.WEB.1, 1-23258 (991144) +@ @= +begin scan_normal_dimen; s:=cur_val; +*************** + +**** FILE TX:TEX-31.WEB.1, 1-23484 (998722) +@= +**** FILE TX:TEX-314.WEB.1, 1-23487 (998719) +@^data structure assumptions@> + +@= +*************** + +**** FILE TX:TEX-31.WEB.1, 1-24036 (1017828) +init for k:=0 to 255 do trie_used[k]:=min_quarterword;@+tini +k:=256; +while j>0 do + begin undump(0)(k-1)(k); undump(1)(j)(x);@+init trie_used[k]:=qi(x);@+tini + j:=j-x; op_start[k]:=qo(j); +**** FILE TX:TEX-314.WEB.1, 1-24041 (1017859) +init for k:=0 to 255 do trie_used[k]:=min_quarterword;@+tini@;@/ +k:=256; +while j>0 do + begin undump(0)(k-1)(k); undump(1)(j)(x);@+init trie_used[k]:=qi(x);@+tini@;@/ + j:=j-x; op_start[k]:=qo(j); +*************** + +**** FILE TX:TEX-31.WEB.1, 1-24175 (1023526) + +This program doesn't bother to close the input files that may still be open. +**** FILE TX:TEX-314.WEB.1, 1-24179 (1023563) +@^recursion@> + +This program doesn't bother to close the input files that may still be open. +*************** + + +######################################################################## + +Differences between TeX.WEB 3.0 and 3.1 (as of 21 September 1990) + +;COMPARISON OF TX:TEX-30.WEB.1 AND TX:TEX-31.WEB.1 +;OPTIONS ARE /E /3 + +**** FILE TX:TEX-30.WEB.1, 1-42 (2816) + +% A reward of $327.68 will be paid to the first finder of any remaining bug, +**** FILE TX:TEX-31.WEB.1, 1-41 (2814) +% Version 3.1 fixed nullfont, disabled \write{\the\prevgraf} (September 1990). + +% A reward of $327.68 will be paid to the first finder of any remaining bug, +*************** + +**** FILE TX:TEX-30.WEB.1, 1-68 (4055) +\def\drop{\kern-.1667em\lower.5ex\hbox{E}\kern-.125em} % middle of TeX +\catcode`E=13 \uppercase{\def E{e}} +\def\\#1{\hbox{\let E=\drop\it#1\/\kern.05em}} % italic type for identifiers + +\outer\def\N#1. \[#2]#3.{\MN#1.\vfil\eject % begin starred section +**** FILE TX:TEX-31.WEB.1, 1-69 (4135) + +\outer\def\N#1. \[#2]#3.{\MN#1.\vfil\eject % begin starred section +*************** + +**** FILE TX:TEX-30.WEB.1, 1-186 (10278) +@d banner=='This is TeX, Version 3.0' {printed when \TeX\ starts} + +@ Different \PASCAL s have slightly different conventions, and the present +**** FILE TX:TEX-31.WEB.1, 1-183 (10169) +@d banner=='This is TeX, Version 3.1' {printed when \TeX\ starts} + +@ Different \PASCAL s have slightly different conventions, and the present +*************** + +**** FILE TX:TEX-30.WEB.1, 1-8472 (372855) +begin nest[nest_ptr]:=cur_list; p:=nest_ptr; +while abs(nest[p].mode_field)<>vmode do decr(p); +scanned_result(nest[p].pg_field)(int_val); +end + +@ @= +**** FILE TX:TEX-31.WEB.1, 1-8469 (372746) +if mode=0 then scanned_result(0)(int_val) {|prev_graf=0| within \.{\\write}} +else begin nest[nest_ptr]:=cur_list; p:=nest_ptr; + while abs(nest[p].mode_field)<>vmode do decr(p); + scanned_result(nest[p].pg_field)(int_val); + end + +@ @= +*************** + +**** FILE TX:TEX-30.WEB.1, 1-10358 (446031) +begin if input_ln(cur_file,false) then do_nothing; +firm_up_the_line; +**** FILE TX:TEX-31.WEB.1, 1-10356 (446011) +begin line:=1; +if input_ln(cur_file,false) then do_nothing; +firm_up_the_line; +*************** + +**** FILE TX:TEX-30.WEB.1, 1-10362 (446183) +first:=limit+1; loc:=start; line:=1; +end +**** FILE TX:TEX-31.WEB.1, 1-10361 (446173) +first:=limit+1; loc:=start; +end +*************** + +**** FILE TX:TEX-30.WEB.1, 1-10737 (464779) +font_bc[null_font]:=1; font_ec[null_font]:=0; +**** FILE TX:TEX-31.WEB.1, 1-10736 (464760) +bchar_label[null_font]:=non_address; +font_bchar[null_font]:=non_char; font_false_bchar[null_font]:=non_char; +font_bc[null_font]:=1; font_ec[null_font]:=0; +*************** + +**** FILE TX:TEX-30.WEB.1, 1-11673 (506824) +if at all. Like |nop| commands and \\{xxx} commands, font definitions can +appear before the first |bop|, or between an |eop| and a |bop|. +**** FILE TX:TEX-31.WEB.1, 1-11674 (506916) +if at all. Like |nop| commands, font definitions can +appear before the first |bop|, or between an |eop| and a |bop|. +*************** + +**** FILE TX:TEX-30.WEB.1, 1-18295 (794479) +is |trie_op_ptr|. If the table overflows, the excess ops are ignored. +Statistics printed during a dump make it possible for users to tell +if this has happened. + +@= +**** FILE TX:TEX-31.WEB.1, 1-18296 (794550) +is |trie_op_ptr|. + +@= +*************** + +**** FILE TX:TEX-30.WEB.1, 1-24730 (1045367) + {disable \.{\\prevdepth}, \.{\\spacefactor}, \.{\\lastskip}} +cur_cs:=write_loc; q:=scan_toks(false,true); {expand macros, etc.} +**** FILE TX:TEX-31.WEB.1, 1-24729 (1045294) + {disable \.{\\prevdepth}, \.{\\spacefactor}, \.{\\lastskip}, \.{\\prevgraf}} +cur_cs:=write_loc; q:=scan_toks(false,true); {expand macros, etc.} +*************** + + +######################################################################## + +Differences between MF.WEB 2.0 and MF.WEB 2.7 (as of 13 March 1991) + +;COMPARISON OF TX:MF-20.WEB.1 AND TX:MF-27.WEB.1 +;OPTIONS ARE /E /3 + +**** FILE TX:MF-20.WEB.1, 1-22 (1390) +% A few "harmless" optimizations have been made without changing versions. + +% A reward of $81.92 will be paid to the first finder of any remaining bug, +% except bugs introduced after August 1989. +**** FILE TX:MF-27.WEB.1, 1-22 (1390) +% Version 2.7 made consistent with TeX version 3.1 (September 1990). +% A few "harmless" optimizations have been made without changing versions. + +% A reward of $163.84 will be paid to the first finder of any remaining bug, +% except bugs introduced after August 1989. +*************** + +**** FILE TX:MF-20.WEB.1, 1-153 (8073) +@d banner=='This is METAFONT, Version 2.0' {printed when \MF\ starts} + +@ Different \PASCAL s have slightly different conventions, and the present +**** FILE TX:MF-27.WEB.1, 1-154 (8144) +@d banner=='This is METAFONT, Version 2.7' {printed when \MF\ starts} + +@ Different \PASCAL s have slightly different conventions, and the present +*************** + +**** FILE TX:MF-20.WEB.1, 1-2995 (123730) +fractions. Using the recurrence $x_n=(x_{n-55}-x_{n-31})\bmod 2^{28}$, +we generate batches of 55 new $x_n$'s at a time by calling |new_randoms|. +**** FILE TX:MF-27.WEB.1, 1-2996 (123801) +fractions. Using the recurrence $x_n=(x_{n-55}-x_{n-24})\bmod 2^{28}$, +we generate batches of 55 new $x_n$'s at a time by calling |new_randoms|. +*************** + +**** FILE TX:MF-20.WEB.1, 1-3005 (124184) +and then it will fetch |randoms[j_random]|. + +@d next_random==if j_random=0 then new_randoms +**** FILE TX:MF-27.WEB.1, 1-3006 (124255) +and then it will fetch |randoms[j_random]|. The |next_random| macro +actually accesses the numbers backwards; blocks of 55~$x$'s are +essentially being ``flipped.'' But that doesn't make them less random. + +@d next_random==if j_random=0 then new_randoms +*************** + +**** FILE TX:MF-20.WEB.1, 1-11094 (468472) +numerators and denominators is to generalize the Stern-Peirce tree +[cf.~{\sl The Art of Computer Programming\/ \bf2}, exercise 4.5.3--40] +@^Peirce, Charles Santiago Sanders@> +@^Stern, Moriz Abraham@> +to a ``Stern-Peirce wreath'' as follows: Begin with four nodes +arranged in a circle, containing the respective directions +**** FILE TX:MF-27.WEB.1, 1-11097 (468704) +numerators and denominators is to generalize the Stern-Brocot tree +[cf.~{\sl Concrete Mathematics}, section 4.5] +@^Brocot, Achille@> +@^Stern, Moriz Abraham@> +to a ``Stern-Brocot wreath'' as follows: Begin with four nodes +arranged in a circle, containing the respective directions +*************** + +**** FILE TX:MF-20.WEB.1, 1-15894 (663124) + pack_file_name(cur_name,MF_area,cur_ext); + if a_open_in(cur_file) then goto done; + end_file_reading; {remove the level that didn't work} +**** FILE TX:MF-27.WEB.1, 1-15897 (663314) + if cur_area="" then + begin pack_file_name(cur_name,MF_area,cur_ext); + if a_open_in(cur_file) then goto done; + end; + end_file_reading; {remove the level that didn't work} +*************** + +**** FILE TX:MF-20.WEB.1, 1-15919 (664150) +begin if not input_ln(cur_file,false) then do_nothing; +firm_up_the_line; +buffer[limit]:="%"; first:=limit+1; loc:=start; line:=1; +end +**** FILE TX:MF-27.WEB.1, 1-15924 (664383) +begin line:=1; +if input_ln(cur_file,false) then do_nothing; +firm_up_the_line; +buffer[limit]:="%"; first:=limit+1; loc:=start; +end +*************** + + +######################################################################## + +Cosmetic change, GFTODVI.WEB, ver 3.0 + +;COMPARISON OF TX:GFTODVI.WEB AND TX:GFTODVI.WEB.1 +;OPTIONS ARE /3 + +**** FILE TX:GFTODVI.WEB, 1-2553 (117187) +if a |"/"| was removed at the end of the file name; this user that the +user will have a chance to issue special instructions online just before +**** FILE TX:GFTODVI.WEB, 1-2553 (117187) +if a |"/"| was removed at the end of the file name; this means that the +user will have a chance to issue special instructions online just before +*************** + + +######################################################################## + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Character code reference +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Upper case letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ +% Lower case letters: abcdefghijklmnopqrstuvwxyz +% Digits: 0123456789 +% Square, curly, angle braces, parentheses: [] {} <> () +% Backslash, slash, vertical bar: \ / | +% Punctuation: . ? ! , : ; +% Underscore, hyphen, equals sign: _ - = +% Quotes--right left double: ' ` " +%"at", "number" "dollar", "percent", "and": @ # $ % & +% "hat", "star", "plus", "tilde": ^ * + ~ +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +[ end of message 028 ] +------- + diff --git a/info/digests/tex-implementors/029 b/info/digests/tex-implementors/029 new file mode 100644 index 0000000000..e570480dd2 --- /dev/null +++ b/info/digests/tex-implementors/029 @@ -0,0 +1,460 @@ +Date: 8 April 90 Message No: 029 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: Additional changes, TeX 3.14, MF 2.7; ERRATA.TeX; security report + + +This message contains only the most urgent changes. I am extremely +short on time, and will be out of town from Apr 11-20 at a standards +meeting in Kyoto. (I will probably be quite incoherent when I return; +14-hour time shifts and I don't get along too well.) + +Included here are the following + Addenda to TeX82.BUG as of 26 March 91 + New errata list (ERRATA.TEX) -- full list + Differences between TeX.WEB 3.14 as of 18 March 1991 and as of 26 Mar 1991 + Differences between MF.WEB 2.7 as of 13 March 1991 and as of 26 Mar 1991 + +The differences lists were run under VAX/VMS and hand-edited to provide +the starting line number for each code block. This is the closest I can +come to the former TOPS-20 differences lists. I was very careful to +check the hand work, and didn't catch any errors. However, you should +be aware that this was not entirely machine generated. + +I received on paper today a package of commented bug reports from Knuth. +I have added the comments to the original file, and will send that as +message #30. I am doing this to save time. Several people will get +rewards from their reports; I will be in touch with them indivudually. +Although this package arrived only today, I believe that all the bugs +that Knuth accepted were fixed in the versions of March 26 referred to +below. + +I have had another report, one that I really don't like to advertise. +I have passed it along to Knuth, and also checked it out with another +expert. This report dealt with a "security flaw", specifically in +Unix implementations, but possibly able to be activated within other +operating system environments as well. Here is the introduction to +the report: + + Date: Tue, 26 Mar 91 12:52:33 -0500 + From: Zbigniew Fiedorowicz + To: tug@math.ams.com + Cc: tech-support@math.ams.com + Subject: TeX security problem + + Please pass this on to Prof. Knuth, or whoever maintains the + official TeX source code: + + I am writing to inform you about a security flaw affecting Unix + implementations of TeX (perhaps other operating systems as well). The + problem is that one can easily imbed TeX commands in ordinary TeX files + to write arbitrary text into a user's system files, such as .login, + .cshrc, .profile, .logout, etc. When a file with such commands is typeset, + they may execute silently without the user being any the wiser. This + provides a mechanism for anything from harmless pranks to serious + vandalism. To illustrate the problem, I enclose below a "TeX virus". + + To prevent this sort of thing, TeX should check commands of the form + \openoutn=filename + is not something like .login, ../.logout, etc. It would seem reasonable + to impose the condition that the only filenames acceptable to TeX must + end in the form + x.xxx...x + where x denotes an alphanumeric character. + + Zbigniew Fiedorowicz + +The report was accompanied by a "demo virus", both a summary of the +strategy and the code. In order to contain this as well as possible, +I will not send out the code or strategy without a specific request, +and then, only to people whose credentials I am sure of. I asked the +moderator of the VIRUS-L discussion list to look at the strategy and +determine whether it is plausible. He did so, and here is his analysis. + + Date: Thu, 28 Mar 91 09:56:48 EST + From: Kenneth R. van Wyk + + Ms. Beeton, + + Thank you for your letter regarding the use of TeX for propagating + viruses. While I am only slightly familiar with TeX, I do fully + understand the nature of the problem. Without even looking at the + example code (though I would be happy to do so), I can imagine ways in + which it could be exploited. I see the problem as being more general + in scope than just viruses; indeed, a trojan horse login "program" + could easily be implemented which could be used to collect usernames + and passwords. This is along the lines of pranks that have been seen + in (among other places, no doubt) university computing environments + for years. + + On the other hand, I would imagine that the people who designed and + implemented this feature had legitimate reasons for doing so. The + report that you sent to me mentioned one alternative, which was to + only allow certain classes of filenames. One other alternative which + you may wish to consider is to notify the user whenever a file is to + be written to in this manner and allow the user to deny access to the + file. A message to the extent of "File xxx.tex is attempting to write + to file .login. This could have serious security related + repurcussions. Do you wish to proceed? " + + In summary, yes I believe that the threat is real. It could certainly + and easily be used to cause damage. The damage could be in the form + of a virus, but would not be limited to viruses. It could just as + easily be used in an attempt to obtain another user's password or just + about anything else. The problem is not insurmountable. The file + output facility could be removed (in the extreme case) or an + alternative approach could be used. I personally like the idea of + informing the user and allowing him/her to deny the access before it + happens. The decision is yours to make. + + Kenneth R. van Wyk + Moderator VIRUS-L/comp.virus + Technical Coordinator, Computer Emergency Response Team + Software Engineering Institute + Carnegie Mellon University + krvw@CERT.SEI.CMU.EDU (work) + ken@OLDALE.PGH.PA.US (home) + (412) 268-7090 (CERT 24 hour hotline) + +In reply to the copy of the full report that I sent to Knuth, he sent +back to me a sheet of Unix diffs to be forwarded to Pierre MacKay +(as TUG Unix site coordinator), which I am about to do, along with all +the supporting correspondence. I will ask Pierre to notify the list +when he has received it, and, if he will, to answer questions on the +subject. That will allow me to go away with a clear conscience. + + +######################################################################## + +Addenda to TeX82.BUG as of 26 March 91 + +------------- +Note: When making change 376, I forgot to delete the redundant +code in module 883, and I should also have changed the name of that +module. These cosmetic changes (and some changes to the comments) +were made in version 3.14, in addition to the following two changes. +------------- + +393. Show unprintable characters in font id's (Wayne Sullivan, Dec 1990) +@x module 63 +print(s); +@y +slow_print(s); +@z +@x module 262 can now be spruced up +else begin print_esc(""); slow_print(text(p)); +@y +else begin print_esc(text(p)); +@z +@x and module 263 likewise +else begin print_esc(""); slow_print(text(p)); + end; +@y +else print_esc(text(p)); +@z + +394. Avoid range check if total_pages>65535 (Eberhard Mattes, Dec 1990) +@x module 642 + dvi_out(total_pages div 256); dvi_out(total_pages mod 256);@/ +@y + dvi_out((total_pages div 256) mod 256); dvi_out(total_pages mod 256);@/ +@z + +----------- +395. The absolutely final change (to be made after my death) +@x module 2 +@d banner=='This is TeX, Version 3.14' {printed when \TeX\ starts} +@y +@d banner=='This is TeX, Version $\pi$' {printed when \TeX\ starts} +@z +My last will and testament for TeX is that no further changes be made +under any circumstances. Improved systems should not be called simply `TeX'; +that name, unqualified, should refer only to the program for which I have +taken personal responsibility. -- Don Knuth + +* Possibly nice ideas that will not be implemented + +. classes of marks analogous to classes of insertions + +. \showcontext to show the current location without stopping for error + +. \show commands to be less like errors + +. \everyeof to insert tokens before an \input file ends + (strange example: \everyeof{\noexpand} will allow things + like \xdef\a{\input foo}!) + +. generalize \leftskip and \rightskip to token lists (problems with + displayed math then) + +. generalize \widowline and \clubline to go further into a paragraph + +. \lastbox to remove and box a charnode if one is there + +* Bad ideas that will not be implemented + +. several people want to be able to remove arbitrary elements of lists, + but that must never be done because some of those elements (e.g. kerns + for accents) depend on floating point arithmetic + +. if anybody wants letter spacing desperately they should put it in their own + private version (e.g. generalize the hpack routine) and NOT call it TeX. + + +######################################################################## + +New errata list (ERRATA.TEX) -- full list + +% Bugs (sigh) in Computers \& Typesetting --- the most recent errata + +\input manmac +\font\sltt=cmsltt10 +\font\niness=cmss9 +\font\ninessi=cmssi9 +\proofmodefalse +\raggedbottom +\output{\hsize=29pc \onepageout{\unvbox255\kern-\dimen@ \vfil}} + +\def\today{\number\day\ + \ifcase\month\or + Jan\or Feb\or Mar\or Apr\or May\or Jun\or + Jul\or Aug\or Sep\or Oct\or Nov\or Dec\fi + \ \number\year} + +\def\cutpar{{\parfillskip=0pt\par}} + +\def\rhead{Bugs in {\tensl Computers \& Typesetting as of \today}} +\def\bugonpage#1(#2) \par{\bigbreak\tenpoint + \hrule width\hsize + \line{\lower3.5pt\vbox to13pt{}Page #1\hfil(#2)}\hrule width\hsize + \nobreak\medskip} +\def\buginvol#1(#2) \par{\bigbreak\penalty-1000\tenpoint + \hrule width\hsize + \line{\lower3.5pt\vbox to13pt{}Volume #1\hfil(#2)}\hrule width\hsize + \nobreak\medskip} +\def\slMF{{\manual 89:;}\-{\manual <=>:}} % slant the logo +\def\0{\raise.7ex\hbox{$\scriptstyle\#$}} +\newcount\nn +\newdimen\nsize \newdimen\msize \newdimen\ninept \ninept=9pt +\newbox\eqbox \setbox\eqbox=\hbox{\kern2pt\eightrm=\kern2pt} + +\tenpoint +\noindent This is a list of all corrections made to {\sl Computers \& +Typesetting}, Volumes A,~C, and E\null, since 1 January 1991. +Corrections made to the softcover version of {\sl The \TeX book\/} are +the same as corrections to Volume~A\null. Corrections to the softcover +version of {\sl The \slMF\kern1ptbook\/} are the same as corrections +to Volume~C\null. Some of the corrections below have already been made in +reprintings of the books. Hundreds of changes, too many to list here, +have been made to Volumes B~and~D because of the upgrades to \TeX\ and +\MF\null. Readers who need up-to-date information on the \TeX\ and +\MF\ programs should refer to the |WEB| source files until new +printings of Volumes B~and~D are issued. \looseness=-1 + +% volume A + +\bugonpage A377, the bottom 14 lines (3/26/91) + +\eightpoint\indent +ASCII \; the macro +also decides whether a space token is explicit or implicit. +\begintt +\newif\ifspace \newif\iffunny \newif\ifexplicit +\def\stest#1{\expandafter\s\the#1! \stest} +\def\s{\funnyfalse \global\explicitfalse \futurelet\next\ss} +\def\ss{\ifcat\noexpand\next\stoken \spacetrue + \ifx\next\stoken \let\next=\sss \else\let\next=\ssss \fi + \else \let\next=\sssss \fi \next} +\long\def\sss#1 #2\stest{\def\next{#1}% + \ifx\next\empty \global\explicittrue \fi} +\long\def\ssss#1#2\stest{\funnytrue {\uccode`#1=`~ + \uppercase{\ifcat\noexpand#1}\noexpand~% active funny space + \else \escapechar=\if*#1`?\else`*\fi + \if#1\string#1\global\explicittrue\fi \fi}} +\long\def\sssss#1\stest{\spacefalse} +\endtt + +\bugonpage A444, lines 15--26 (3/26/91) + +\ninepoint +\textindent{\bf14.}If the current item is an Ord atom, +go directly to Rule~17 unless +all of the following are true: The nucleus is a symbol; the subscript +and superscript are both empty; the very next item in the math list is an +atom of type Ord, Op, Bin, Rel, Open, Close, or Punct; and the nucleus of the +next item is a symbol whose family is the same as the family in the present +Ord atom. In such cases the present symbol is marked as a text symbol. +If the font information shows a ligature between this symbol and the +following one, using the specified family and the current size, then +insert the ligature character and continue as specified by the font; +in this process, two characters may collapse into a single Ord +text symbol, and/or new Ord text characters may appear. If the font information +shows a kern between the current symbol and the next, insert a kern item +following the current atom. +As soon as an Ord atom has been fully processed for ligatures and kerns, +go to Rule~17. + +% volume B +\hsize=35pc +\def\\#1{\hbox{\it#1\/\kern.05em}} % italic type for identifiers +\def\to{\mathrel{.\,.}} % double dot, used only in math mode + + +% volume C +\hsize=29pc +\def\\#1{\hbox{\it#1\/\kern.05em}} % italic type for identifiers + +\bugonpage C262, line 15 (3/26/91) + +\ninepoint\noindent +|string base_name, base_version; base_name="plain"; base_version="2.7";| + +\bugonpage C271, line 17 from the bottom (3/26/91) + +\ninepoint\noindent +| currentpen_path shifted (z.t_) withpen penspeck enddef;| + +\bugonpage C347, Bront''e entry (1/29/91) + +\eightpoint\noindent +[The accent was clobbered; her name should, of course, be Bront\"e. +Fix the entries for D\"urer, M\"obius, and Stravinsky in the same way.] + + +% Volume D +\hsize=35pc +\def\\#1{\hbox{\it#1\/\kern.05em}} % italic type for identifiers +\def\to{\mathrel{.\,.}} % double dot, used only in math mode + +% volume E +\hsize=29pc +\def\dashto{\mathrel{\hbox{-\kern-.05em}\mkern3.9mu\hbox{-\kern-.05em}}} + + +\bye + + +######################################################################## + +Differences between TeX.WEB 3.14 as of 18 March 1991 and as of 26 Mar 1991 + +************ +File SYSA:[TEX.TEX]TEX-314.WEB;1 (42) +% Version 3.14 was a cosmetic change for new Volume B (February 1991). + +% A reward of $327.68 will be paid to the first finder of any remaining bug, +****** +File PRG:[TEX.NEW]TEX-314.NEW;1 (42) +% Version 3.14 fixed unprintable font names and corrected typos (March 1991). + +% A reward of $327.68 will be paid to the first finder of any remaining bug, + +************ +************ +File SYSA:[TEX.TEX]TEX-314.WEB;1 (1571) +print(s); +end; + +@ An array of digits in the range |0..15| is printed by |print_the_digs|. +****** +File PRG:[TEX.NEW]TEX-314.NEW;1 (1571) +slow_print(s); +end; + +@ An array of digits in the range |0..15| is printed by |print_the_digs|. +************ +************ +File SYSA:[TEX.TEX]TEX-314.WEB;1 (5576) +else begin print_esc(""); slow_print(text(p)); + print_char(" "); +****** +File PRG:[TEX.NEW]TEX-314.NEW;1 (5576) +else begin print_esc(text(p)); + print_char(" "); +************ +************ +File SYSA:[TEX.TEX]TEX-314.WEB;1 (5591) +else begin print_esc(""); slow_print(text(p)); + end; +end; +****** +File PRG:[TEX.NEW]TEX-314.NEW;1 (5591) +else print_esc(text(p)); +end; +************ +************ +File SYSA:[TEX.TEX]TEX-314.WEB;1 (12693) + +An integer variable |k| will be declared for use by this routine. +****** +File PRG:[TEX.NEW]TEX-314.NEW;1 (12692) +If |total_pages>=65536|, the \.{DVI} file will lie. + +An integer variable |k| will be declared for use by this routine. +************ +************ +File SYSA:[TEX.TEX]TEX-314.WEB;1 (12711) + dvi_out(total_pages div 256); dvi_out(total_pages mod 256);@/ + @; +****** +File PRG:[TEX.NEW]TEX-314.NEW;1 (12711) + dvi_out((total_pages div 256) mod 256); dvi_out(total_pages mod 256);@/ + @; +************ + +Number of difference sections found: 6 +Number of difference records found: 7 + +DIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=PRG:[TEX.NEW]TEX-314.DIF;1- + SYSA:[TEX.TEX]TEX-314.WEB;1- + PRG:[TEX.NEW]TEX-314.NEW;1 + + +######################################################################## + +Differences between MF.WEB 2.7 as of 13 March 1991 and as of 26 Mar 1991 + +************ +File SYSA:[TEX.MF]MF-27.WEB;2 (21835) +\\{xxx} commands might appear anywhere in \.{GF} files generated by other +processors. It is recommended that |x| be a string having the form of a +****** +File PRG:[TEX.NEW]MF.WEB;1 (21835) +\\{xxx} commands might appear within characters, +in \.{GF} files generated by other +processors. It is recommended that |x| be a string having the form of a +************ + +Number of difference sections found: 1 +Number of difference records found: 2 + +DIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=PRG:[TEX.NEW]MF-27.DIF;1- + SYSA:[TEX.MF]MF-27.WEB;2- + PRG:[TEX.NEW]MF.WEB;1 + + +######################################################################## + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Character code reference +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Upper case letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ +% Lower case letters: abcdefghijklmnopqrstuvwxyz +% Digits: 0123456789 +% Square, curly, angle braces, parentheses: [] {} <> () +% Backslash, slash, vertical bar: \ / | +% Punctuation: . ? ! , : ; +% Underscore, hyphen, equals sign: _ - = +% Quotes--right left double: ' ` " +%"at", "number" "dollar", "percent", "and": @ # $ % & +% "hat", "star", "plus", "tilde": ^ * + ~ +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +[ end of message 029 ] +------- + diff --git a/info/digests/tex-implementors/030 b/info/digests/tex-implementors/030 new file mode 100644 index 0000000000..ae42aa301a --- /dev/null +++ b/info/digests/tex-implementors/030 @@ -0,0 +1,853 @@ +Date: 8 April 91 Message No: 030 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: bug reports and replies from DEK + + +This message contains only one thing: a file of bug reports that was +sent to Knuth, annotated with his replies (typed in by me from his +handwritten notes). Please note that "sections" of this file are +separated by form feeds (^L); I hope they don't give anyone's machine +indigestion. + + +######################################################################## + +a quick summary of what is included here: + TeX.WEB 3.1 + Brian {Hamilton Kelly}, spurious error history with |show_whatever| + Wayne Sullivan, non-printing characters in font identifiers + Eberhard Mattes, dvi files with more than 65535 pages + Barbara Beeton, file found by \input not found by \openin + PLAIN.MF + Harald B\"ogeholz/Eberhard Mattes, problem when aspect_ratio <> 1 + TeXbook + Robert Hunt, possible bugs in \ifcat test, page 377 + Robert Hunt, difficulty in appendix G, rule 14 + GFtype/GF format + Peter Breitenlohner, GFtoPK finds an error where GFtype does not; + inconsistencies in GF format and programs reading/writing GF files + MF.WEB, PK doc + Edgar Fuss, precision incompatibilities + PLtoTF/VPtoVF + Wayne Sullivan/Chris Thompson, a PLtoTF/VPtoVF bug + TANGLE + Peter Breitenlohner, token memory statistic error while digesting input + + + ***** TeX.WEB 3.1 ***** + +Date: Thu, 13 SEP 90 10:10:00 BST +Reply-to: Brian {Hamilton Kelly} +From: TEX@rmcs.cranfield.ac.uk +Subject: Feature that's really a bug in TeX v3.0 (and earlier) + +The routine |show_whatever| at section 1293 is invoked for any variety +of \show primitive. Eventually, it calls |error| to complete any +necessary interaction with the user (if desired). However, the latter +routine: +(1) always incrments |error_count|, and will crash with a fatal error if + there have been 100 ``errors'' +(2) always sets |history := error_message_issued| + +The code of |show_whatever| pre-decrements |error_count|, but {\em +only\/} if not interacting with the user: therefore it's feasible that a +file could contain 100+ \show commands, and if the user were patient +enough, would eventually get the fatal error exit. + +But more importantly, more sophisticated versions of TeX which pass back +the value of |history| to the operating system will be misled into +thinking than a genuine error has occurred, and perhaps the operating +system will take some (in)appropriate action. + +I can see two solutions: +(1) ensure that |error_count| is always predecremented in +|show_whatever|, and also preserve the value of |history| before calling +|error|, and restore it afterwards: however, this sort of external +interference with global variables is surely to be deprecated +(2) make |error| take a parameter, which indicates whether the routine +is being called because of a genuine error, or merely to provide an +opportunity for interaction: this would more correctly modularize the +funtionality, but involve changes to many dozens of other calls to +|error| within the program. + +I discovered this when attempting to understand why my VMS +implementation appeared to swallow the remainder of a DCL command +procedure with which I was attempting to automate the TRIP test: I'd +mistakenly thought that TeX was keeping open the |termin| which was in +this case taking its input from the body of the command procedure. In +the case of the TRIP test, of course, the exit status was genuinely +correct in reporting that |error_message_issued|, and the cure was to +tell DCL not to take error exit from the command procedure; however, in +course of investigating this with a smaller TeX source, taken again from +a command procedure, I realized that any \show command also caused the +exit to occur with error status: and after all, the help for any \show +is ``This isn't an error, I'm only showing something...''! + + Brian {Hamilton Kelly} +------- + +[ coment by DEK: + Granted, the logic isn't ideal. + but I was aware of these deficiencies and I don't consider them serious + enough to warrant any change at this late date. [METAFONT is by the way + exactly the same w.r.t. _showing_, except that it clears error_count + after statements rather than paragraphs.] + The patient user might indeed have a problem with more than 100 show + commands, but there is a way to work around it i a pinch by forcing TeX + to think that a paragraph has ended. Or you can type + `i\error\errorstopmode\show ...' then `q'. +] + +Date: Wed, 05 Dec 90 15:40:28 GMT +From: "Wayne G. Sullivan" +Subject: TeX Bug + +BUG REPORT TeX WEB 3.1 : + +In sections 234, 267, 579 and 1322 of TeX 3.1, there appears + print_ecs(font_id_text(...)) + [esc -- correction by DEK ] +or the equivalent. Since font identifiers can have non-printable +characters, one of the slow print procedures should be used instead. + + Wayne Sullivan, December 1990 +------- +Date: Sat, 08 Dec 90 20:47:06 GMT +From: Chris Thompson +Subject: Wayne Sullivan's new TeX bug + +FYI here are the comments I sent him, and his reply. + + ---------------------------------------------------------------------- + +You are absolutely right. Simplest test I have found that shows the +effect (from section 267) is + + \expandafter \font \csname abc^^80def\endcsname = cmr10 + \setbox0=\hbox{XYZ} \tracingonline=1 \showbox0 + +One gets a space where one should get ^^80. + [ ^^^^^ or system crash depending on system -- DEK ] + +I believe that you have identified all the cases that need amending. +All other calls of |print_esc| are either on constant strings made +up of printable ASCII, or one can prove that the variable argument +is a string so made up. (There are three such cases: in |print_cs| +and |sprint_cs| the calls |print_esc(p-single_base)| must refer to +the printable ASCII representations at the bottom of the string pool; +and in |print_write_whatsit| the argument |s| is an explicit constant +string in each of its calls.) Given that, there would probably be a lot +to be said for inventing a new |print_font_id| routine: one might use +this to cover up some of the early convoluted forward references at +the same time. + +Chris Thompson +JANET: cet1@uk.ac.cam.phx +Internet: cet1%phx.cam.ac.uk@nsfnet-relay.ac.uk + + ---------------------------------------------------------------------- + +Knuth actually catches the important case: \the\font . However, at some + [^^^^^ because it fetches + the `permanent' font identifier which is + treated like any control sequence -- DEK ] +stage it would be worth cleaning up the others. I think sprint_cs does +the trick, but a more ornate resolution of the problem may be the +ultimate outcome. Would you forward a copy of your note to BNB? I sent +her the same message I sent you, but it could possibly have been missed. + Thanks, + Wayne +------- + +[ comment by DEK: + Since print_esc is never `inner loop' I decided that it + should call slow_print. This saves a bit of code in \S262-3 too. + By the way, the reward for TeX bugs has reached its max now! So it + is not keeping up with inflation and the falling $/\lb ratio, sorry. + $326.78 \S63 + Now slow_print is used _only_ in print_esc. +] + +Date: Fri, 28 Dec 90 15:44:53 +0100 +From: Eberhard Mattes +Subject: How to report TeX bugs + +Dear Ms. Beeton, + +I've found a very very small but old (maybe there has never been a TeX +version without this bug!) bug in TeX. What's the correct/official way +of reporting it? + +Yours, + Eberhard Mattes (mattes@azu.informatik.uni-stuttgart.de) +------- +(replied that if he sent it to me, i would ask chris thompson to vet it, +and then forward the results to dek) +------- +Date: Fri, 28 Dec 90 16:25:01 +0100 +From: Eberhard Mattes +Subject: How to report TeX bugs + +Here's the bug (thanks for forwarding it to Chris Thompson and DEK!): + +total_pages isn't checked for overflow: A dvi file may contain only up +to 65535 pages. If one feeds a document with more than 65535 pages +into TeX, either the dvi file is written incorrectly (total number of pages +modulo 65536 in the postamble) or TeX bombs at + + dvi_out(total_pages div 256); dvi_out(total_pages mod 256);@/ + +as dvi_out expects a eight_bits number. Maybe it's a limitation rather +than a bug. But it should be documented. + +Yours, + Eberhard Mattes (mattes@azu.informatik.uni-stuttgart.de) +------- +Date: Sat, 05 Jan 91 16:28:17 GMT +From: Chris Thompson +To: bbeeton +Cc: Eberhard Mattes +Subject: DVI files with more than 65535 pages + +It is certainly true that TeX will generate an invalid DVI file (if +it doesn't get a range check first---that will usually depend on +compilation options) if more than 65535 \shipout commands are obeyed. +What I don't know is what Don's attitude is likely to be towards this +as a bug report. For example, he lets himself off a number of painful +hooks in the comments in section 104: + + The present implementation of TeX does not check for overflow when + dimensions are added or subtracted. This could be done by inserting a + few dozen tests of the form `if x>='10000000000 then report_overflow' + but the chance of overflow is so remote that such tests do not seem + worthwhile. + [ I was not thinking of PicTeX when I wrote that, but still + I am of the opinion that 2^{15} points aer plenty big -- DEK ] + +(Actually, it is quite easy to provoke such overflows deliberately, and +I have occasionally had reports of it happening accidentally.) On the +other hand, he did add quite a lot of code (#383) in TeX 3.0 to prevent +demerits overflowing, which, despite what Frank Mittelbach says, I have +some difficulty believing is a practical problem. (EM's bug is surely + [ ^^^^^^^^^ believe me it is! -- DEK ] +*not* a practical problem, is it? It is certainly 100 times as many +pages as I have ever TeX'ed at once!) + +Eberhard Mattes sent me a message saying, inter alia +> here are four suggestions for fixing the bug (in decreasing order of +> (my) preference): +> - ignore (and document) the bug +> - change dvi format: total_pages = 65535 means 65535 or more +> - change dvi format: total_pages = 0 and final_bop <> -1 means + [ ^ This alone should suffice to + distinguish it in TeX output, but not other routine -- DEK ] +> 65535 or more. +> - error message + +I don't think changing the DVI specification even in this very minor +respect is on at this stage: instead, one has to take the line that a +valid DVI file cannot contain more than 65535 pages. The `correct' fix +would, I think, be a fatal error (of the |overflow| type) on attempting +to produce the 65536th page. + +Anyway, I think you should you send it to Don and see what he says about +it. If he does make a TeX change as a result, I suppose I will feel an +obligation to add a similar check to my program for merging several DVI +file into one: it certainly doesn't at the moment! + +Chris Thompson +Cambridge University Computing Service +JANET: cet1@uk.ac.cam.phx +Internet: cet1%phx.cam.ac.uk@nsfnet-relay.ac.uk +------- + +[ comment by DEK: + I decided that this isn't serious enough to warrant a + change to DVI format [and we do want to save trees]; + nor to give an overflow error [which would make the TeXbook incorrect]; + so I'll adapt Everhard's first preference, to ignore and document + the bug (but to put total pages need 65536 in DVI file just to + avoid bombing out when TeX is someday put onto a chip). + Surely max_push will _not_ exceed 65535 ... + $2.56 TeX \S642 +] + +Problem found at AMS by Barbara Beeton, December 1990 + +I have a multi-file LaTeX job where i need to keep the input files +segregated, so I simply made up a suitable search path for tex$inputs +and worked in another directory. The main file input to LaTeX contains +several statements \include{file.name} using the technique recommended +in the LaTeX manual, rather than equivalent \input file.name statements. +The indicated files are not found, but if \include is replaced by \input, +the retrieval is successful. This is the behavior on a VAX/VMS system. + +LaTeX uses \openin to first check for the presence of \include'd +files, to permit absent files to be bypassed rather than hanging the +job. + +I next copied the files involved to our DEC-20, and tried again. +Under TOPS-20, all files were found by the \include/\openin . This +led me to believe that the problem is system-dependent. I discussed +the matter with Dave Kellerman, whose VMS implementation we are using. +He verified that the handling of files with \input and \openin is +indeed quite different, and that it seems to be consistent with the +(slender) documentation in the .WEB file. However, he said that some +changes had been made to \input and it wasn't clear to him whether +DEK intended to leave \openin unchanged or it was an oversight. Given +the way that LaTeX is using \openin (which seems quite reasonable), it +may be an oversight. This conclusion is given more weight by the fact +that David Fuchs' TOPS-20 implementation used the search path for both +\input and \openin even though it wasn't in the original .WEB. + +I sent an inquiry to Chris Thompson, and here is his analysis. This +is an area that seems to be too easily interpreted differently by +different implementors, and an authoritative ruling would be useful. +------- +Date: Sun, 06 Jan 91 00:36:53 GMT +From: Chris Thompson +Subject: \input vs \include (aka \input vs \openin) + +The underlying difference in unmodified TeX is that \input (implemented +in |start_input|) tries first the file name as given, and then (if the +specified area field was empty, since fix #312) using |TeX_area| as the +area. \openin (implemented in |open_or_close_in|), on the other hand, +just tries the name as originally specified, leaving \ifeof true +if it can't open it. How implementors map this behaviour in terms of +current directories, paths, or whatever their operating systems provide, +is no doubt a rich and varied feast. (For the record, in my MVS +implementation, the "try the default area" behaviour is mapped onto +"if a simple name is specified, try it first as a DDname, and then as +a member name in a standard PDS concatenation", and I do maintain the +difference between \input and \openin.) + +I am fairly sure that the rationale for the difference is that \openin +is paired with \openout (which you clearly wouldn't want to have the +area defaulting behaviour: you want it to create the file where you +said, if it doesn't exist already). It seems very likely that any `real' +use of \openin, i.e. with the intention of using \read, would be reading +a file created by \openout and \write in the current or a previous run +of TeX. + +LaTeX, on the other hand, uses \openin in a much more sneaky way, to +obtain a `softly-failing \input' function. The relevant macro, \@input, +is used not only to read \include'd files, but also when reading back +the .aux file(s), .toc file, etc. If the \openin fails to open the file +(as tested by \ifeof), LateX outputs a warning message; otherwise it +does a \closein and uses \input in the sure and certain knowledge that +it will find the file. (This is an expensive way of doing things, in +operating systems that make opening a file a non-trivial activity. +It has occurred to me that there is scope for some ingenuity in TeX +implementations in not actually doing an operating system close on +a stream that is \closein'ed while in the state |just_open|, but +keeping it around in the hope that a \input for the same file name +will follow shortly! I haven't actually tried to code this, though.) + +With the difference between \input and \openin as in unmodified TeX, +then it is certainly true that if \openin succeeds, so will \input +(unless another process is deleting files in parallel, of course), but +the converse is not true. File names passed to LaTeX's \@input have +the semantics associated with \openin, not that associated with \input. + +I hadn't realised that as many implementations as you say have modified +the file name semantics of \openin to be the same as \input. Maybe this +is becoming a de facto standard. I am rather doubtful whether it is +really the correct thing to do: one should not forget \openin's original +purpose, as well as LaTeX's peculiarities. It is certainly possible to +argue that it is a desirable change even in that context, though. I +suppose it is too large a modification to consider at this stage the +addition of a conditional-\input primitive to TeX itself. + +Chris Thompson +------- + +[ comment by DEK: + My current opinion is: + If the operating system allows users to define a ``custom'' + search path at run time, then both \input and \openin + should be able to use it, although I would hope that + people don't use \openin for `system' files but only for files + they tend to control themselves. + If the operating system is like WAITS (on which I developed TeX), + where there's no decent way to provide a clue to TeX at runtime + about a nonstandard search path, then I would provide access + to the main system macro files (like plain.tex and + webmac.tex) only for \input not \openin; I would + use the same strategy to search user's personal files + for both \input and \openin. + I have found it _very_ useful with UNIX to put `..' on the + standard search path. Then I can create a subdirectory + called say _pages_ and cd to pages, on which I can + run TeX/MF with some temporary changes to input fies and I won't + clobber any of the master files or the parent directory. + My applications of this idea would fail if \openin didn't + also look at .. directory when unable to find an . directory. + + ***** PLAIN.MF ***** + +Date: Mon, 7 Jan 91 11:38:54 +0100 +From: Eberhard Mattes +To: CET1@phoenix.cambridge.ac.uk +Cc: BNB@math.ams.com +Subject: Now a real bug + +Dear Ms. Beeton, dear Mr Thompson, + +now I am reporting a real bug: + +plain.mf: + + ---------------------------------------------------------------------- +def drawdot expr z = if unknown currentpen_path: def_pen_path_ fi + addto_currentpicture contour + currentpen_path shifted z.t_ withpen penspeck enddef; + ---------------------------------------------------------------------- + +does not work correctly with aspect_ratio <> 1. Here's a fix: + + ---------------------------------------------------------------------- +def drawdot expr z = if unknown currentpen_path: def_pen_path_ fi + addto_currentpicture contour + currentpen_path shifted (z.t_) withpen penspeck enddef; + ---------------------------------------------------------------------- + +BTW, local.mf of emTeX has been containing this fix for over a year, +and nobody reported this bug. It was found by Harald B\"ogeholz (HWB), + [ ^^^^^^^^^^^^^^^^^^^^^^^ + $2.56 MFbook p271 -- DEK ] +a friend of mine. + +Yours, + Eberhard Mattes (mattes@azu.informatik.uni-stuttgart.de) +------- +Date: Mon, 07 Jan 91 15:29:24 GMT +From: Chris Thompson +To: Eberhard Mattes +Cc: Barbara Beeton +Subject: Re: [Now a real bug] + +Dear Eberhard, & Barbara, + +Yes, I agree with that: the bracketing should be + + currentpen_path shifted (z transformed currenttransform) + +not, as effectively at present, + + (currentpen_path shifted z) transformed currenttransform + +Will you pass that on the Don Knuth, Barbara? + +I have sometimes wondered why mode_setup doesn't make t_ into a dummy +symbolic token when currenttransform (after yscaling by aspect_ratio) +is the identity, in the same way as o_ is redefined. This would save +some time in common cases; currently you have to use 'notransforms' +yourself to achieve it. I suppose it would be an incompatible change +by now, though, in that METAFONT users may be relying on being able + [ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ yes indeed indeed -- DEK ] +to alter currenttransform at any time. + +Chris Thompson +JANET: cet1@uk.ac.cam.phx +Internet: cet1%phx.cam.ac.uk@nsfnet-relay.ac.uk +------- + + ***** TeXbook ***** + +Date: Mon, 21 Jan 91 17:07:05 GMT +From: Chris Thompson +Subject: TeXbook p.377 bug(?) + + I have had what apparently looks like an error in the TeXbook +reported to me by a user here, Robert Hunt of +the Department of Applied Maths and Theoretical Physics. He claims +that in the macro in the footnote on page 377 of the TeXbook, the +\ifcat test + + \ifcat\noexpand#1\noexpand~\explicitfalse % active funny space + +can never give the result true, so that the line is unnecessary (and +misleading). I think he is right, but this area of TeX is distinctly +unsusceptible to intuition! I intend to advertise on UKTeX and TeXhax +a challenge to find arguments to \stest that will make this \ifcat +deliver true; meanwhile could you please record that Robert has a +first claim if this does indeed turn out to be a TeXbook bug? + +Chris Thompson +------- + +[ comment by DEK: + $2.56 He is correct that the test never succeeds + but he is wrong to assume that it is unnecessary ... + The present code has a bug (it might say that an active + implicit funny char is explicit) as in + \uccode`=`*\catcode`*=\active + \uppercase{\uppercase{\let*=}} + \newtoks\t \t={*123} + which leads to the + \global\explicittrue branch. + TeXbook 20\th printing will have corrected code, namely + \long\def\ssss#1#2\stest{\funnytrue + {\uccode`#1=`~ + \uppercase{\ifcat\noexpand#1}% + \noexpand~\global\explicitfalse + \else\escapechar ... \fi\fi}} + which makes the points I had hoped to make in the original + footnote and preserves the idex entries to {\it 377}. + I suspect this will be the all-time champ for obscure bug in + The TeXbook ... But that's the whole point of this footnote. +] + +Date: Sun, 27 Jan 91 22:08:12 GMT +From: Chris Thompson +Subject: Another TeXbook error (or obscurity) + +Robert Hunt (he of the p.377 example) has come up with another (sigh) +possible TeXbook error. I think his case is pretty good on this one. +He asks why [ p 444 ] + + \setbox0=\hbox{$V.$}\showbox0 + +produces + + > \box0= + \hbox(6.83331+0.0)x9.16667 + .\teni V + .\kern2.22223 (this is the italic correction for \teni V) + .\kern-1.66667 (this is the kern between the V and the .) + [ ^^^^^^^ oops, maybe I should have made this more negative ... + too late -- DEK ] + .\teni : + .\mathoff + +when Appendix G, Rule 14 says: + + Otherwise if the font information shows a kern between the current + symbol and the next, insert a kern item after the current Ord atom + and move to the next item after that. Otherwise (i.e., if no + ligature or kern is specified between the present text symbol and + the following character), go to Rule 17. + +and Rule 17 is the only place where italic corrections are added. The + [ ^^^^ also, \fontdimen 2\teni is zero, so we get + ital correction in spite of being marked as text -- DEK ] +phrasing `move to the next item after that' makes it sound as though +processing for the current item is complete. In fact, one should always +go to Rule 17 (this applies to ligatures as well, for which the phrasing +is now, since TeX 3.0 changes, quite ambiguous in Rule 14). The code +has always actually worked like that, and in fact it wouldn't make sense +to abandon the Ord before the kern at this stage, as its translation +into a horizontal list, needed for the second pass, has not yet been +generated. + +Chris Thompson +------- + [ $2.56 right, I'll try to clean this up too -- DEK ] + + ***** GFtype/ GF format ***** + +Date: 18 September 1990, 16:34:53 GMT +From: PEB%DM0MPI11.BITNET@CUNYVM.CUNY.EDU +From: Peter Breitenlohner (089) 32308-412 PEB at DM0MPI11 + +Barbara, can you please relay the following to Don Knuth. Thanks P.B + +Subject: Clarification of GF format and proposed GFtype change. + +If I interpret the GF format correctly, it is an error if there +are raster data for a character c (mod 256) and there is no character +locator for character c in the postamble. It is also an error if +there are two or more locators for the same character. +(At least GFtoPK treats these cases as errors.) + +If this is correct then it should be specified explicitely in the +definition of the GF format (in MF, GFtype, GFtoDVI, and GFtoPK). + [ I believe it is explicit enough, and + fixing GFtype will clinch it -- DEK ] +Moreover GFtype should test for such anomalies. I find it extremely +embarrassing that GFtoPK declares such a file as bad whereas GFtype +[ ^^^^^^^^^^ Well, I am even more embarrassed, since I wrote GFtype -- DEK ] +does not detect anything unusual. + +Another point: GFtype cannot handle specials (xxx or yyy) in the +postamble. Clearly MF does not produce them but they are allowed in +the GF format. This is, however, slightly more tedious to fix. + [ mistake in documentation. They are allowed within + characters but not before _pre_ or after _post_ -- DEK ] + +Therefore I propose the following change in GFtype.web (line numbers refe +to Version 3.0 as of November 5, 1989). + +@x [8] m.64 l.1213 - test for missing character locators +@.should be postpost@> +@y +@.should be postpost@> +for k:=0 to 255 do if char_ptr[k]>0 then + error('missing locator for character ',k:1,'!'); +@.missing locator for character...@> +@z +%--------------------------------------- +@x [8] m.64 l.1228 - superfluous semicolon + error('not enough signature bytes at end of file!'); +@y + error('not enough signature bytes at end of file!') +@z +%--------------------------------------- +@x [8] m.65 l.1250 - test for duplicate character locators + if p<>char_ptr[c] then + error('character location should be ',char_ptr[c]:1,'!'); +@.character location should be...@> +@y + if char_ptr[c]=0 then + error('duplicate locator for this character!') +@.duplicate locator for this...@> + else if p<>char_ptr[c] then + error('character location should be ',char_ptr[c]:1,'!'); +@.character location should be...@> + char_ptr[c]:=0; +@z +%--------------------------------------- +@x [8] m.65 l.1255 - superfluous semicolon +until k<>no_op; +@y +until k<>no_op +@z +%--------------------------------------- +Regards Peter Breitenlohner +------- + +[ comment by DEK: + Peter! + I _really_ appreciate your help in getting these + programs into tiptop shape. + You are able to imitate my programming style + better than I can myself -- don +] + + ***** MF.WEB, PK doc ***** + +Date: Thu, 23 Aug 90 17:21:05 +0200 +From: ef@tools.uucp (Edgar Fuss) +Subject: MF/PK Documentation errors + +There is a documentation error (I think) in mf.web. +The section on scaled arithmetic says something like ``most internal +quantities MF deals with are supposed to be less than 4096 in absolute +value'' and then introduces the |fraction| type which has 28 binary digits +right to the binary point. In my opinion, on a 32-bit machine, you can only +represent values smaller than 4 in absolute value that way. +(However, the |angle| type introduced later on indeed has 20 digits of +precision and can hold values up to 2048-\epsilon.) + [ * ] + +There is another bug in the description of the PK format that appears in +various WEB sources (PKtoPX, for example). +The definition of the |pre| command says that the |ds| parameter is the + [ ^^^ post -- DEK ] +font's design size in units of 2^{-16} points. However, what GFtoPK really +puts there is the design size in units of 2^{-20} points. +This error really bit me last week (is my DVI the only device driver that +cares about design sizes and checksums?). +There are also a few errors in the same file where the meaning of various +flag bits are explained; the bit numbers and bit weights don't match, +I think, in genearal, the numbers are right and the weights are wrong. + [ ** ] + +Edgar +------- + +[ comment by DEK: + * You are misinterpreting the comment in \S105. + In \S101 it points out that _scaled_ numbers have 16 binary places + If such numbers are < 2^{12}, that means we have 28 bits. + To work with 28 significant bits its convenient to have a _fraction_ + type as well as a _scaled_ type. Fractions have 28 binary places. + Therefore `fractions' can get as large as $8-\epsilon$. + ** I know nothing about PKtoPX (and I want PXL files abolished immediately) + but I have been involved with GFtoPK, and it's documentation is + currently correct ... sice November 89 at least. ... Yes we had to + fix it in many respects! Please get up to date sources. + Tom Rokicki's dvips driver is now extremely careful with + design sizes and checksums, since I rewrote it in 1989. +] + + ***** PLtoTF/VPtoVF ***** + +Date: Fri, 11 Jan 91 14:08:16 GMT +From: CET1@phoenix.cambridge.ac.uk +Subject: A PLtoTF/VPtoVF bug for Don from Wayne + +Barbara, + +Please could you forward the enclosed to Don Knuth? + +> Accepted: 14:48:12 10 Jan 91 +> From: "Wayne G. Sullivan" +> To: Chris Thompson +> Subject: A minor blemish in PLtoTF +> +> (DESIGNSIZE R 10.0) +> (DESIGNUNITS R 15.1) +> (FONTDIMEN +> (SLANT R 0.00000000) +> (SPACE R 10.0) +> (XHEIGHT R 7.5) +> (QUAD R 20.0) +> (EXTRASPACE R 15.0)) +> (CHARACTER C A +> (CHARWD R 241.6) +> ) +> +> (COMMENT +> If the above file is fed to PLTOTF and the resulting TFM file is +> processed by TFTOPL the result is +> (FAMILY UNSPECIFIED) +> (FACE F MRR) +> (CODINGSCHEME UNSPECIFIED) +> (DESIGNSIZE R 10.0) +> (COMMENT DESIGNSIZE IS IN POINTS) +> (COMMENT OTHER SIZES ARE MULTIPLES OF DESIGNSIZE) +> (CHECKSUM O 32455153636) +> (SEVENBITSAFEFLAG TRUE) +> (FONTDIMEN +> (SLANT R 0.0) +> (SPACE R 0.662251) +> (STRETCH R 0.0) +> (SHRINK R 0.0) +> (XHEIGHT R 0.496689) +> (QUAD R 1.324503) +> (EXTRASPACE R 0.993378) +> ) +> (CHARACTER C A +> (CHARWD R 0.0) +> ) +> Note that the character width is zero, but no error message is +> given. This is machine dependent because of floating point +> arithemtic, but the computed value comes from 253335962 / 15833498 +> which is less than 16.0 but rounds to the scaled equivalent of 16.0. +> ) + ----------------------------------------------------------------------- +> Submitted: 15:28:45 10 Jan 91 +> From: Chris Thompson +> To: "Wayne G. Sullivan" +> Subject: Re: [A minor blemish in PLtoTF] +> +> Yes, agreed. |out_scaled| is defective in that the failure of test +> |abs(x/design_units)>=16.0| does not necessarily mean that +> |round((x/design_units)*1048576.0)| will deliver a value strictly +> less than 2^24. In your case there is a subsequent call of |out(256)|, +> which will blow up or quietly produce zero as compilation options or +> runtime routines determine. +> +> Shall I send it to Barbara for inclusion on Don's work list? + ----------------------------------------------------------------------- +> Submitted: 09:50:34 11 Jan 91 +> From: "Wayne G. Sullivan" +> To: Chris Thompson +> Subject: out_scaled +> +> I believe the same out_scaled routine apears in VPtoVF. The problem with +> 16.0 is highly unlikely to cause problems in practice, but since these +> WEB files are considered as patterns of good software, it would seem to +> be in order to sort out the problem whenever there is a revised version of +> PLtoTF or VPtoVF. I would appreciate it if you would pass it on in the +> proper manner. +> I noticed the 16.0 problem when I was trying to figure out how 'shorten' +> works in connection with using PostScript resident fonts with TeX. The +> limitations of TFM files can have side effects. In the new character +> mapping for 256 character fonts given in Ferguson's article (TUG-11/4) +> a zero width character for inhibiting ligatures is included. It is +> possible, though unlikely, that after 'shorten' has been applied, that +> this character will no longer have zero width. It might be a good idea +> to make the 'rounding' message a bit more forceful to encourage further +> checks when rounding of character dimensions is necessary. +> Wayne + +Chris Thompson +JANET: cet1@uk.ac.cam.phx +Internet: cet1%phx.cam.ac.uk@nsfnet-relay.ac.uk +------- + +[ comment by DEK: + I guess you're right, but only if all 256 widths are different + _and_ the closest two widths happen to be between 0 and something + very near 0! + The main side effects I've ever noticed were in connection with + math extension font ... it is very important not to diddly with + height or depth of characters used to build up large parens etc. + + PLtoTF version 3.4 \ have out_scaled + VPtoVF version 1.3 / more robust! + Thanks again don + ? + Interestingly if you had had R-241.6 + the output would have contained R-16.0 +] + + ***** TANGLE ***** + +Date: Fri, 01 Mar 91 13:08:38 GMT +From: Peter Breitenlohner +Organization: Max-Planck-Institut fuer Physik, Muenchen +Subject: patgen and tangle + +[ while i was in vienna at the dante meeting, i talked with peter about + the maintenance of various ur-tex-utilities, in particular patgen. + i couldn't say who, if anyone, is currently responsible for patgen + maintenance. can you shed any light on this? ] + [ This has been up for grabs ever since Frank finished his + thesis. All volunteers welcome to step up and advertise + their presence. -- DEK ] + +I found a bug in tangle. If there is a fatal error in phase on (i.e., +while digesting the input), the token memory usage statistic is garbage. +This is particularly annoying if the fatal error is token memory overflow +(as it happened to me). + +Below is my proposed bug fix, line numbers refer to + TANGLE.WEB 4.1 as of September 5, 1990. + +@x [18] m.186 l.3272 - bug fix: initialize max_tok_ptr +print(' bytes, ', max_tok_ptr[0]:1); +@y +if phase_one then + for ii:=0 to zz-1 do max_tok_ptr[ii]:=tok_ptr[ii]; +print(' bytes, ', max_tok_ptr[0]:1); +@z +%--------------------------------------- + +Regards Peter +------- + +[ comment by DEK: + Thanks Peter for excellent diagnosis & correction. + Will be fixed in v4.2. -- don +] + + +######################################################################## + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Character code reference +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Upper case letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ +% Lower case letters: abcdefghijklmnopqrstuvwxyz +% Digits: 0123456789 +% Square, curly, angle braces, parentheses: [] {} <> () +% Backslash, slash, vertical bar: \ / | +% Punctuation: . ? ! , : ; +% Underscore, hyphen, equals sign: _ - = +% Quotes--right left double: ' ` " +%"at", "number" "dollar", "percent", "and": @ # $ % & +% "hat", "star", "plus", "tilde": ^ * + ~ +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +[ end of message 030 ] +------- + diff --git a/info/digests/tex-implementors/031 b/info/digests/tex-implementors/031 new file mode 100644 index 0000000000..467fe56f78 --- /dev/null +++ b/info/digests/tex-implementors/031 @@ -0,0 +1,76 @@ +Date: 9 August 91 Message No: 031 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: Quick update on e-math.ams.com + + +Within the past few weeks, the e-math archive at AMS has been completely +refreshed. Highlights of the update include: + + - AMS-TeX version 2.1 -- bug fixes and some minor enhancements + + The file ams/amstex/amstex.bug gives the detail of changes. + + - AMS-LaTeX version 1.1 -- bug fixes + + Current versions of the Mittelbach/Schoepf new font selection scheme + files are now posted, as well as the reference versions of latex.tex + and lplain.tex . + + The BibTeX style amslpha.bst is now a true "alpha" style, and + produces bibliographic input according to AMS style requirements. + + The file ams/amslatex/amslatex.bug gives the detail of changes. + + - AMSFonts version 2.1 -- substantial bug fixes, including elimination + of the problems that caused the ms* fonts to get different checksums + and .tfm dimensions at different resolutions. + + .mf sources for the AMSfonts are now packaged as a compressed tar + file, in ams/amsfonts-sources.tar.Z , in addition to the ordinary + ascii .mf files. + + .pk files are now available in resolutions of 180, 240 and 400dpi + in addition to the 118 and 300dpi available previously. + + - Author guidelines for submitting electronic manuscripts to the AMS + using AMS-LaTeX are new. + +A consistent change to all macro and text files originating at AMS +is the installation of new identification blocks, based on the BibTeX +format recommended by Nelson Beebe. + +I have received a note from Don Knuth concerning a bug (in Plain) +reported in June: + "... the correction will go in + officially in fall when I make the next update." + +I will be out of town from August 15-September 3, and from September 20- +October 16. (Among other commitments, I will be attending the TeX91 and +Gutenberg meetings in Paris.) I will not be accessible by e-mail during +that time, so any messages received then will wait until my return. + + +######################################################################## + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Character code reference +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Upper case letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ +% Lower case letters: abcdefghijklmnopqrstuvwxyz +% Digits: 0123456789 +% Square, curly, angle braces, parentheses: [] {} <> () +% Backslash, slash, vertical bar: \ / | +% Punctuation: . ? ! , : ; +% Underscore, hyphen, equals sign: _ - = +% Quotes--right left double: ' ` " +%"at", "number" "dollar", "percent", "and": @ # $ % & +% "hat", "star", "plus", "tilde": ^ * + ~ +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +[ end of message 031 ] diff --git a/info/digests/tex-implementors/032 b/info/digests/tex-implementors/032 new file mode 100644 index 0000000000..0f9426bccf --- /dev/null +++ b/info/digests/tex-implementors/032 @@ -0,0 +1,659 @@ +Date: 1 November 91 Message No: 032 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: Publication info for C & T; messages from DEK, part 1 + + +On my return from several weeks of out-of-town meetings, I found +waiting for me a large package from DEK (about 1cm of paper, plus half +a dozen checks, or checques, depending which side of the Atlantic you +were on when you learned to spell English). No major rewards in this +batch, although there will be a version 3.141 probably in January, +after some updates have been checked out a bit more thoroughly and DEK +returns from a couple months in Sweden. I am just about ready to +distribute the checks and the supporting documentation to the original +submitters. I will also post here the details of the submissions and +the replies; this involves deciphering DEK's handwritten notes and +typing them in so that they make sense. The first installment is +included below. + +I was also asked to find out the current status of several volumes in +the Computers & Typesetting series, in particular, whether volumes B +and D (**: The Program) now contain the version 3 (etc.) updates. As +this information is likely to be of general interest, the report from +Addison-Wesley is given below. + +As usual after such a long break in "official" messages, there have +been quite a few address updates and a few additions. So, once again, +acknowledgements would be appreciated, to make sure the mail is getting +through. + + +######################################################################## + +status of volumes in the series Computers & Typesetting, by Donald E. Knuth +information received from Addison-Wesley, 23 October 1991 + + printing + ref.no. vol. title edition number date + +hardbound: + + 13447 A The TeXbook 1 11th June 1, 1991 + + 13437 B TeX: The Program 1 4th May 1, 1991 + + 13445 C The METAFONTbook 1 4th Sept, 1991 + + 13438 D METAFONT: The Program 1 4th Oct, 1991 + + 13446 E Computer Modern Typefaces 1 3rd Aug, 1987 + +soft/spiral bound: + + 13448 The TeXbook 1 20th May 1, 1991 + + 13444 The METAFONTbook 1 6th Feb, 1991 + +note: all printings are marked "with corrections" + + +######################################################################## + +Date: Mon 24 Jun 91 13:28:03-EST +Subject: bug report (plain.tex) for don + +don, +here's a bug in plain that has been flushed out by phil taylor. + + Date: Fri, 21 JUN 91 20:54:14 BST + From: CHAA006@vax.rhbnc.ac.uk + "Philip Taylor (RHBNC) " + Subject: Bug in PLAIN + + Hi, Barbara et al ... + + I have just spent nine hours searching for a bug in my code ... + I finally thought to check Plain.TeX (fmtversion{3.0}) and found ... + + \def\multispan#1{\omit \mscount#1 + \loop\ifnum\mscount>\@ne \sp@n\repeat} + \def\sp@n{\span\omit\advance\mscount\m@ne} + + which explained everything ... + + It's simply that the first line ends `#1', rather than `#1\relax'; + if \multispan is invoked with a \countdef'd register, as in + + \multispan \columns \hrulefill \cr + + an extra and totally unwanted space intrudes before the \hrulefill. + + Is this a known bug, or has it just failed to emerge from the woodwork + before ? + + ** Phil. + +this little test demonstrates the problem "loud and clear". + + \def\testmspan#1{% + \halign{##\hfil&&\qquad##\hfil\cr + XX&\multispan{#1}XXXXX&XX\cr + XX&XX&XX&XX&XX\cr}} + + \testmspan{3} + + \newcount\columns + \columns=3 + \testmspan{\columns} + + \catcode`\@=11 + \def\multispan#1{\omit \mscount#1\relax + \loop\ifnum\mscount>\@ne \sp@n\repeat} + \catcode`\@=12 + + \testmspan{\columns} + + \bye + +i wonder how many people have noticed something slightly wrong but +never went out of their way to check? + -- bb + +[ reply from dek: + + $2.56 (which works out to about 28\cents{} per hour) + Thanks very much! + will be fixed in plain version 3.1 +] + + +######################################################################## + +Date: Sun 15 Sep 91 15:03:54-EST +Subject: bugs and questions for don + +don, here are some bug reports and other comments that have been +accumulating. i should have sent most of them earlier, but most +of these aren't "easy" ones, and i've been out of town so much + [ dek: ^^^^ rather an understatement ... + but nothing to match the earlier stuff on hyphenation & ligatures. ] +that i just never got them organized. + -- bb + [ dek: + No problem -- good thing in fat, because I just finished a + big project that was causing me to turn off all other mail -- + and I'm just about tostart another -- so Sep 17 was the day + I chose to look at TeX stuff. ] + + -------------------- +Contents: + question on "final" update to TeX and MF + TeXbook errata and questions + easy items + handling of space tokens + still a bug in p. 377 footnote + incompatibility of positive/negative integer values + file name overflow of string pool + TeX + handling of \newlinechar within \special + size of \smash'ed boxes + verifying that 8-bit input is supported + incompatibilities between \input and \openin + WEB system + dealing with repeating code in .WEB files + +************************************************************************ + +Question on "final" update to TeX and MF + +Who will be authorized to change the version numbers of TeX and MF +to $\pi$ and $e$ respectively? It might be a good idea just to have +this information "on the record"; perhaps a message to be placed on +file in the TUG office would suffice. + + [ dek: + I put such a message into TEX82.BUG and MF84.BUG some time ago, + so I presume any archive keeper could make the change. (Actually + it also implies changes to Volumes B and D also, and in the + `Running' chapters of Volumes A and C; so I have added a phrase + to TEX82.BUG and MF84.BUG. I guess the authorized person will + be my literary executor, given that my program is supposed to be + literate? + ] + +************************************************************************ + +TeXbook errata and questions -- easy items + +Date: Thu, 27 Jun 91 23:11:47 BST +From: CET1@phoenix.cambridge.ac.uk +Subject: A TeXbook possible-bug from Robert Hunt, etc + +> Submitted: 20:44:00 12 Apr 91 +> From: Robert Hunt +> To: cet1 +> Subject: TeX +> +> I've just discovered a _very_ minor problem with the TeXbook, but I thought I'd +> point it out to you anyway, while there's already an outstanding problem being +> considered. I certainly don't think it's a real "bug" but it's certainly worth +> telling Knuth! I've just noticed that the only place in the TeXbook where it +> informs you that exactly one space token is ignored after a closing $$ is in +> the answer to Exercise 14.30, on page 316. It surely ought to mention this in +> some other places as well: in particular, it should be on page 287, and +> possibly on page 189 (though Knuth is unlikely to want to do this as it'd be +> difficult to avoid having to rearrange lots of text to fit!). + +I think that there is something in this, although I suspect that the +canonical place it should be documented is on page 293 (treatment of +$ and $$ when encountered in math mode), not page 287. Anyway, I think + [ dek: ^^^^^^^^^^^^ right +it deserves to have Don look at it: as far as I can make out there +haven't been any TeXbook changes that affect Robert's claim. + [ dek: + Aha, there _is_ room on page 293! + $2.56 ] + +i still have outstanding the various error reports about the p.377 +footnote. I will try to get back to you on this *soon* (sigh). + +Chris Thompson + ------- + +Date: Mon, 9 Sep 91 13:19:21 PDT +From: raymond@math.berkeley.edu (Raymond Chen) +Subject: TeXbook errata + +Please pass these on to DEK, as I ran across them in my marginal notes +after I mailed off my letter... + +They're all index items, and they're not really errata. + +add `\note: 318'. Many times I've wanted to find that macro and couldn't. + though perhaps keeping it under `footnotes: 121' is good enough. + [ dek: \check ] + +add `72' to \hss, even though it doesn't appear explicitly, since that + is where we learn exactly how much glue an \hss produces. (Curiously, + \hfil, \hfill, and \hfilneg are indexed for that page. \hss is the + odd man out.) + [ dek: 32\cents ] + +add `93' to `hyphenation', since that's where the most obvious method + of suppressing hyphenation is presented. (I get asked this quite a bit, + and it's annoying not to be able to say, ``Just check the index.'') + [ dek: $2.56 + included in check sent directly to him in response to his letter ] + +My proposals to change the index are usually rejected, but if DEK feels +like considering them, he can do so. + + --rjc + ------- + +Date: Sun, 18 AUG 91 17:57:27 +0100 +From: CA_ROWLEY@vax.acs.open.ac.uk +Subject: Bug in TeXbook + +whilst idly perusing Chap 24, looking for yet more amazing syntax and +overloading (of the latter, \font was a new one for me!), + [ dek: you knew about \span ] +i discovered in black and white in the middle of page 275 the bold +statement: + +"but in all cases this sign (=) is optional" + +now you and i know that Don knows perfectly well that this is not +true---to take a simple example (there are other more subtle ones), +the assignment: + +\let \equalsign = = + +here the first equals sign is essential. + [ dek: precisely _because_ it is optional! ] + +do you think Don wants to know about this? + [ dek: a (black and white) lie? ] + +chris + ------- + +Date: Wed, 21 Aug 91 12:12:15 +0200 +From: Eberhard Mattes +Subject: Very insignificant error in The TeXbook? + +p. 96: +---------------------------------------------------------------------------- +Some compound words in German text change their spelling when they are +split between lines. For example, `backen' becomes `bak-ken' and `Bettuch' +becomes `Bett-tuch'. +---------------------------------------------------------------------------- + +I think `backen' isn't a compound word, if `compound word' meens +a word composed of two or more words (in contrast to syllables). + [ dek: + $2.56 + should i have used `backenfisch' instead? ] + + -Eberhard Mattes + ------- + +************************************************************************ + +TeXbook errata and questions -- still a bug in p. 377 footnote + +[ note that according to Chris Thompson, Robert Hunt had already + informed him that the p. 377 bug wasn't entirely fixed; however + this commentary reached me first. ] + +Date: Fri, 31 May 91 11:43:02 +From: Mike Piff +To: beebe <@nsfnet-relay.ac.uk:beebe@MATH.UTAH.edu> +Subject: Space tokens + +% Please forward to DEK. +% The scheme in the footnote on p377 of The TeXbook appears not to work. +% Mike Piff + +[ test code was included, but was replaced by later version, below ] + ----------------------------------------------------------------------------- + From Dr M. J. Piff, Department of Pure Mathematics, PO Box 597, + Hicks Noisy Building Site, Hounsfield Road, + [ dek:^^^^^^^^^^^^^^^^^^^^^^^^^ beautiful ] + SHEFFIELD S10 2UN, England. + Tel. SHEFFIELD(0742) 768555 Extension 4431. + JANET MPiff@UK.AC.SHEF.PA or MPiff@UK.AC.SHEF.IBM + ----------------------------------------------------------------------------- + ------- +Date: Sat 1 Jun 91 23:32:27-EST +From: bbeeton +To: mpiff@pa.shef.ac.uk +Cc: beebe@math.utah.edu +Subject: texbook bug, footnote, p377 + +nelson beebe forwarded to me your bug report on the footnote on p.377 +of the texbook. +this was already reported just a couple of months ago. the attached +correction appears in the most recent errata.tex file (the seventh +such file). + -- bb + -------------------- + +\bugonpage A377, the bottom 14 lines (3/26/91) + +\eightpoint\indent +ASCII \; the macro +also decides whether a space token is explicit or implicit. +\begintt +\newif\ifspace \newif\iffunny \newif\ifexplicit +\def\stest#1{\expandafter\s\the#1! \stest} +\def\s{\funnyfalse \global\explicitfalse \futurelet\next\ss} +\def\ss{\ifcat\noexpand\next\stoken \spacetrue + \ifx\next\stoken \let\next=\sss \else\let\next=\ssss \fi + \else \let\next=\sssss \fi \next} +\long\def\sss#1 #2\stest{\def\next{#1}% + \ifx\next\empty \global\explicittrue \fi} +\long\def\ssss#1#2\stest{\funnytrue {\uccode`#1=`~ + \uppercase{\ifcat\noexpand#1}\noexpand~% active funny space + \else \escapechar=\if*#1`?\else`*\fi + \if#1\string#1\global\explicittrue\fi \fi}} +\long\def\sssss#1\stest{\spacefalse} +\endtt + ------- +Date: Tue, 04 Jun 91 10:11:21 +From: Mike Piff +Subject: texbook bug, footnote, p377 + +I don't think the code you sent works. It gives an error message on \ftoken. +Mine definitely works, and correctly distinguishes the SIX different space +[dek:^^^^^^^^^^^^^^^^ ha ha + touch\'e [and I sure thought I had tested it ... ] +tokens. + +Mike Piff + ------- +Date: Wed, 05 Jun 91 10:25:12 +From: Mike Piff +Subject: Re: texbook bug, footnote, p377 + +% I attach a cleaned-up version of what I sent before. This looks more like +% the footnote on p377 of The TeXbook. +% Mike Piff + +\newif\ifspace \newif\iffunny \newif\ifexplicit \newif\ifactive +\def\stest#1{\expandafter\s\the#1 \stest} +% [ dek: ^ put ! here in case the token list is empty ] +\def\s{\spacetrue\explicittrue\activefalse\funnyfalse\futurelet\next\ss} +% [ dek: ^ ^ \global (see page 301 near bottom) ] +\def\ss{\ifcat\noexpand\next\stoken + \ifx\next\stoken\let\next=\sss\else\let\next=\ssss\fi + \else\spacefalse\let\next=\sssss\fi\next} +\long\def\seeifactive#1{\expandafter\seex\string#1\seex} +\long\def\seex#1#2\seex{\def\Temp{#2}\ifx\Temp\empty\global\activetrue\fi} +\long\def\sss#1 #2\stest{\def\next{#1}% + \ifx\next\empty\else\explicitfalse\seeifactive{#1}\fi} +% [ dek: ^^ + bug if the token list has length >1 ] +\long\def\ssss#1#2\stest{\funnytrue + {\escapechar=\if*#1`?\else`*\fi +% [ dek: ^ \relax needed here I think + [Because TeX wants a space after `*! Otherwise the escapechar + isn't changed until after the \if#1\string#2 .] + diagonalization, eh? ] + \if#1\string#1\else\global\explicitfalse\seeifactive{#1}\fi}} +\long\def\sssss#1\stest{} +\def\CR{\immediate\write16{}} + + [ dek: + nice; I had decided in March to give up trying to distinguish + active ones! Actually this _doesn't_ quite work, but it is + my fault (a bug in 3.0: \string^^88 comes out of length 1 when + ^^88 is not active, but of length 4 when it's active; according + to page 213 it should be length 1 in both cases). + Also it fails to distinguish _active_ _funny_ * + from explicit funny *, + Also there's a problem when you make |_| active because string + converts that into a space token! Then \seex will have a + runaway argument because an undelimited parameter #1 can't be + a space token. + +-------+ + | Aargh | + +-------+ + _Also_ a problem when \next is \futurelet to be \if ... + ] + +\def\report{% + \ifspace + \ifexplicit + \message{explicit}% + \else + \message{implicit}% + \ifactive + \message{active}% + \fi + \fi + \iffunny\message{funny}\else\message{normal}\fi + \message{space}% + \else + \message{nonspace} + \fi + \CR +} + + +% and now, a few tests of the various possibilities + +\newtoks\Test + +\def\1{\let\stoken= }\1 % + +\catcode`\!=\active +\def\2{\let!= }\2 % ! active let to space + +\uccode` =`* +\uppercase{\uppercase{\def\fspace{ }\let\ftoken= } } +% \fspace expands to *space, \ftoken let to *space + +\catcode`[=\active +\edef\3{\let\noexpand[=\fspace\fspace}\3% [active let to *space + + [ dek: where used? ] + +\CR + +\Test={ } % explicit normal space +\stest\Test\report + +\Test=\expandafter{\fspace} % explicit funny space +\stest\Test\report + +\Test={\stoken} %implicit normal space +\stest\Test\report + +\Test={\ftoken} % implicit funny space +\stest\Test\report + +\Test={!} % active normal space +\stest\Test\report + +\catcode`|=\active \let|= \ftoken % active funny space +\Test={|} +\stest\Test\report + +\end + + [ dek: + see enclosed test [p377.tex, p377.log] which I think _really_ + puts the thing through its paces + [actually I did additional tests too because the enclosed + trials always set \escapechar to `?] + ] + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +p377 dated September 20, 1991 at 1014 + + +% decoding space tokens (footnote on page A377) +% solution found with help of Mike Piff + +\newif\ifspace \newif\iffunny \newif\ifexplicit \newif\ifactive +\def\stest#1{\funnyfalse \expandafter\s\the#1! \stest} +\def\s{\global\explicitfalse \global\activefalse \futurelet\next\ss} +\def\ss{\ifcat\noexpand\next\stoken\let\nxt\sx\else\let\nxt\ns\fi\nxt} +\def\sx{\spacetrue\ifx\next\stoken\let\nxt\sss\else\let\nxt=\ssss\fi\nxt} +\long\def\sss#1 #2\stest{\def\next{#1}% + \ifx\next\empty\global\explicittrue \else\testactive#1\s\fi} +\long\def\ssss#1#2\stest{\funnytrue{\escapechar=\if*#1`?\else`*\fi\relax + \if#1\string#1\uccode`#1=`~ % we assume that ~ is an active character + \uppercase{\ifcat\noexpand#1}\noexpand~\global\activetrue + \else\global\explicittrue\fi + \else\testactive#1\s\fi}} +\long\def\ns#1\stest{\spacefalse} +\long\def\testactive#1#2\s{\expandafter\tact\string#1\s\tact} +\long\def\tact#1#2\tact{\def\next{#2}\ifx\next\xs\global\activetrue + \else\ifx\next\empty \global\activetrue\fi\fi} \def\xs{\s} + +\def\report#1{\message{#1:}% + \ifspace + \message{\ifexplicit ex\elseim\fi plicit}% + \ifactive\message{active}% + \message{\iffunny funny\else normal\fi space}% + \else\message{nonspace} + \fi + \CR} +\def\CR{\immediate\write16{}} + +\newtoks\Test + +\def\1{\let\stoken= }\1 % implicit normal space token +\catcode`\!=\active +\def\2{\let!= }\2 % active normal space token +\uccode` =`* +\uppercase{\uppercase{\def\fspace{ }\let\ftoken= } } +% \fspace expands to explicit funny space, \ftoken is implicit funny *space +\uccode` =0 + +\CR + +\test={ } +\stest\test\report1 % explicit normal space + +\test=\expandafter{\fspace} +\stest\test\report2 % explicit funny space + +\test={\stoken} +\stest\test\report3 % implicit normal space + +\test={\ftoken} +\stest\test\report4 % implicit funny space + +\test={!} +\stest\test\report5 % implicit active normal space + +\catcode`\^^99=\active \let^^99= \ftoken +\test={^^99\par} +\stest\test\report6 % implicit active funny space + +{\catcode`\*=\active \let*= ^^99 +\test={*} +\stest\test\report7 % implicit active funny space +} + +\test={} +\stest\test\report8 % nonspace + +\test={{ }} +\stest\test\report9 % nonspace + +\test={\if} +\stest\test\report{10} % dangerous nonspace + +\test={ \par} +\stest\test\report{11} % explicit normal space + +{\catcode`\ =\active\let =\stoken\stoken% +\test={ }% +\stest\test\report{12} % implicit active normal space +} + +{\catcode`\ =\active\let =\stoken\ftoken% +\test={ }% +\stest\test\report{13} % implicit active funny space +} + +\bye + +(end of file) + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +This is TeX, Version 3.14a for SunOS (preloaded format=plain 91.9.20) + 20 SEP 1991 10:13 + [ dek: ^^^^^ Note! + [Same variations do _not_ work with version 3.14; + 3.14a is an experimental "\alpha test" for next release] + ] +**p377.tex +(p377.tex +\test=\toks12 + + +1: explicit normalspace + +2: explicit funnyspace + +3: implicit normalspace + +4: implicit funnyspace + +5: implicit active normalspace + +6: implicit active funnyspace + +7: implicit active funnyspace + +8: nonspace + +9: nonspace + +10: nonspace + +11: explicit normalspace + +12: implicit active normalspace + +13: implicit active funnyspace + + ) +No pages of output. + +(end of file) + + +######################################################################## + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Character code reference +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Upper case letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ +% Lower case letters: abcdefghijklmnopqrstuvwxyz +% Digits: 0123456789 +% Square, curly, angle braces, parentheses: [] {} <> () +% Backslash, slash, vertical bar: \ / | +% Punctuation: . ? ! , : ; +% Underscore, hyphen, equals sign: _ - = +% Quotes--right left double: ' ` " +%"at", "number" "dollar", "percent", "and": @ # $ % & +% "hat", "star", "plus", "tilde": ^ * + ~ +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +[ end of message 032 ] +------- + diff --git a/info/digests/tex-implementors/033 b/info/digests/tex-implementors/033 new file mode 100644 index 0000000000..dffe11ce22 --- /dev/null +++ b/info/digests/tex-implementors/033 @@ -0,0 +1,499 @@ +Date: 1 November 91 Message No: 033 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: Messages from DEK, part 2 + + +Here is the second installment of DEK's September comments. + + +######################################################################## + +Incompatibility of positive/negative integer values + +Date: Tue, 20 Aug 91 16:58:09 MDT +From: Nelson H.F. Beebe +Subject: Perhaps a bug (design flaw) in TeX + +I think that the `feature' described below qualifies as a design flaw +in TeX, and should be reported to Don Knuth if it has not come up +before; I came across it while testing the statement on p. 178, l. +-11, of + +@string{SV = "Spring{\-}er-Ver{\-}lag"} + +@Book{Seroul:beginners-tex, + author = "Raymond Seroul and Silvio Levy", + title = "A Beginner's Book of {\TeX}", + publisher = SV, + year = "1991", + ISBN = "0-387-97562-4, 3-540-7562-4", + note = "This is a translation and adaption by Silvio Levy of + \cite{Seroul:tex}.", +} + +about the maximum and minimum integers that TeX can handle. +[The text has an error there; I've just completed a comprehensive +errata list for it.] + +TeX does not permit the input of the most negative 32-bit integer +(-2^{31}) on two's complement machines, but you can generate it by +subtraction ((-2^{-31}+1) - 1) and output it correctly. + +This makes the statement at the top of p. 118 of the TeXbook a lie: +registers are capable of containing the number -2147483648, NOT +-2147483647, provided the host architecture has two's complement +arithmetic, which is true for almost all machines today, and certainly +the vast majority of TeX implementations. UNIVAC and CDC mainframes +had one's complement arithmetic, but also had words of more than 32 +bits, and as far as I am aware, only some calculators may use +sign-magnitude representation; both of these systems have signed +zeros, and extreme values that are equal in magnitude. + +I believe that a programming language, which TeX surely is, ought to +be able to read what it can write. + +This asymmetry could be avoided if the code in section 445 of TeX: The +Program accumulated the number as a negative value, then flipped the +sign if necessary. Authors of textbooks, computer programs, and +language run-time libraries, should not make this mistake, yet the +error continues to be repeated. + +While TeX detects overflow from multiplication, it does not detect +overflow from negation. + +Here is an example: + +This is TeX, C Version 3.0 + +% Try the value -(2^{31}) (most negative two's complement number) +*\count0=-2147483648 +! Number too big. +<*> \count0=-2147483648 + +% Input the value -(2^{31}-1) +*\count0=-2147483647 + +*\showthe\count0 +> -2147483647. + +% Now generate the most negative two's complement number +*\advance \count0 by -1 + +*\showthe\count0 +> -2147483648. + +% Now demonstrate that integer overflow is undetected on sign inversion: +\count1=-\count0 + +*\showthe\count1 +> -2147483648. + +% However, integer overflow is caught on multiplication: +\multiply\count0 by \count0 +! Arithmetic overflow. +<*> \multiply\count0 by \count0 + +======================================================================== + + [ dek: + TeX is _not_ a programming language in the general sense of + supporting arithmetic at extreme values. There are lots of + _dimen_ values that TeX can write but not read. + Probably a flaw, but a permanent one. In general, arithmetic + in TeX is not supposed to push the handling conditions; + making that all work would cause significant performance penalty. + ] + +************************************************************************ + +File name overflow of string pool + +[ Since this report, I have seen a couple of other reports on this + topic in the electronic discussion lists, mostly from Europe. + While not a bug, it can certainly be a serious inconvenience. + A couple of the reports have mentioned building nonstandard + versions of TeX with a separate pool of file names; not good for + compatibility. ] + +Date: Fri, 12 Jul 91 19:06 +0200 +From: "Johannes L. Braams" +Subject: Bug/misfeature in TeX? + + We have run into a problem with TeX. + We have an application where we would like to \input about + 2400 files. We can't do that because TeX runs out of string pool + space. This application is rather important because it concerns + the reports the lab has to make each quarter of a year. + + When I studied TeX the program to find out what happens when a file + is being \input I found that the name of the file is stored in + string pool. AND it never gets removed from the string pool (as far + as I could find out). + What I don't understand is why filenames are written to string pool + in the first place. + Isn't it possible to use some kind of stack or array mechanism to + store filenames? It should then be possible to free the memory + used to store a filename when the file gets closed and the filename + is no longer needed. + + Do you know the answer or someone who does? Or is this a bug? I would + rather call it a design flaw actually. + + Regards, + + Johannes Braams + +PTT Research Neher Laboratorium, P.O. box 421, +2260 AK Leidschendam, The Netherlands. +Phone : +31 70 3325051 E-mail : JL_Braams@pttrnl.nl +Fax : +31 70 3326477 + ------- +Date: Mon, 15 Jul 91 01:59:22 BST +From: Chris Thompson +Subject: Re: Bug/misfeature in TeX? + +I agree that it's a design flaw, not a bug. People do keep falling +over it from time to time, though, so maybe Don could be asked to +think about it again. I suspect, however, that there is no easy fix, +for reasons I will explain below. + +Johannes asks why the names go in the string pool in the first place: +the answer to that is "why not?"... it is the convenient place to keep +more or less arbitrarily long strings. The space occupied by things +added to the string pool can be reclaimed, provided it is done straight +away, before other parts of TeX have been exercised that may add other +strings (especially, control sequence names) to the pool. There are +two types of file name to think about (neither of which are reclaimed +at the moment, with one partial---and wrong---exception): + +1. The 1, 2 or 3 strings generated by |scan_file_name|. Usually these + are used in some implementation-dependant way to open a file, and + maybe then as arguments to |*_make_name_string|, and are then never + needed again; and all this would usually happen straight away. + Exception: deferred (non-\immediate) \openout's. + +2. The string generated by |*_make_name_string|. For things like the + log and DVI files, this has to be kept for ever (printing them is + almost the last thing TeX does). The interesting case, however, is + \input. The string is printed (immediately), and then stored in the + |name_field| of the current input stack entry. *Almost* the only + thing TeX uses it for thereafter is as a number > 17 (to distinguish + the case of an input level being an \input file (as opposed to + terminal input or a \read level). The sole exception is in section + 84 where it is used to deal with the "E" response to the error + prompt: in distribution TeX as part of a message, but in practice + as input to the implementation-dependant way of invoking an editor. + +(BEGIN ASIDE + +The ``partial and wrong exception'' is the code in section 537 +introduced by change 283. |start_input| reclaims the space occupied +by the result of |a_make_name_string|, if that is still the top string +in the pool, and replaces it by the `name' part of the results of +|scan_file_name|. I have had to undo this "fix" in my implementations: +the *only* thing that the ``file name'' is needed for is as an argument +to the editor, and it is an unwarranted assumption that + +a. The values of the `area' and `extension' parts of the name are + irrelevant to that purpose, and + +b. The output of |a_make_name_string| doesn't contain extra information, + available as a result of the opening process, that may also be + relevant. + +END ASIDE) + +In theory the contents of the strings of type 2 for \input files could +be kept on some sort of separate stack, as Johannes suggests (parallel +to the |input_file| and |line_stack| arrays), but this would be quite +convoluted and involve a lot of duplication of code. More plausible +would be an attempt to reclaim them if they are still the top string +in the pool when the file is closed (in |end_file_reading|); this isn't +so unlikely in cases like Johannes'... presumably not all 2400 files +can use never-before-encountered control sequences, or he will be +running out of other things besides the string pool! + +The strings of type 1 create a difficulty, however, unless they can +be got rid of just after the call of |a_make_name_string| (a certain +amount of permuting of the string pool would be required to do that). +If they, also, are to be got rid of when the file is closed, again +subject to the condition that they are at the top of the pool, one +will have to (at least) remember how many of them there were. + +Some of this would, in fact, be rather easier in METAFONT than TeX. +METAFONT's string pool entries have a use count, and reclaiming space +consists of purging consecutive entries at the top of the pool whose +use counts have all fallen to zero. One could easily arrange that the +strings of type 1 had use counts of zero after the opening process was +over, and that the strings of type 2 for "input" files had a use count +of 1 which was decremented to 0 at close time; then the right things +would happen more or less automatically. However, TeX *doesn't* have +such use counts, and I don't really suppose Don is going to introduce +them in order to solve this problem. + +Chris Thompson + ------- + + [ dek: + I think the strings are also needed for font file names. + For ordinary input files I put the special code into \S537 + [which CET1 disabled] so that the Math Reviews could input + lots of files. + Of course there's a workaround (using the operating system + to concatenate files!) but otherwise all I can suggest is a + local change-file routine that tries to reclaim string space + when closing files if the unneeded strings are still at the + end of the string pool. You could introduce a new array + indexed by 1..max_in_open to keep relevant status information + if it isn't already present (see \S304). + ] + +************************************************************************ + +TeX -- handling of \newlinechar within \special + +Date: Thu 9 May 91 09:42:09-EST +From: Ron Whitney +Subject: \newlinechar within \special + +Recently I've seen an inconsistency in the way a couple of +versions of TeX for the PC handle \newlinechar within +\special commands. + +One (Fuchs, \mu-TeX) gives the same treatment in this case +as it does with \write-streams. The others use a more literal +interpretation of Knuth's statement on p.228 of The TeXBook +regarding what TeX does as it writes out \special information: + +" TeX doesn't look at the token list to see if it makes sense; +the list is simply copied to the output." + +So if one has \newlinechar=`\^^J, + + \special{ooh^^Jaah} + +puts this 9-character sequence into the .dvi file instead of +"oohaah". (Of course, the ^^J gets contracted to single +token first, then gets blown back up to the 3.) + +I would have said that \mu-TeX's treatment is the proper one, but +perhaps it's understood that the string within the \special is not to +be tampered with other than to eat the tokens and then spit them out. +Is this an old issue? Is it open to interpretation? + ------- +Date: Thu, 9 May 91 13:09:08 EDT +From: karl@cs.umb.edu (Karl Berry) +To: RFW@vax01.ams.com +Subject: \newlinechar within \special + +ron> I would have said that \mu-TeX's treatment is the proper one, but +> perhaps it's understood that the string within the \special is not to +> be tampered with other than to eat the tokens and then spit them out. +> Is this an old issue? Is it open to interpretation? +trip.tex seems not to test this. I guess it's open to interpretation, +although Knuth should probably be asked. + +My personal opinion is that ^^J should get turned into a newline +character(s); it's easy to turn this feature off (in fact, I suppose +it's off by default in plain), after all. + +karl@cs.umb.edu + ------- +Date: Thu, 09 May 91 23:54:07 BST +From: Chris Thompson +Cc: Ron Whitney , Karl Berry +Subject: Re: \newlinechar within \special + +I am afraid that I don't really understand what the postings by Ron +Whitney and Karl Berry are saying. The suitably processed token list +in a \special ends up in the DVI file. So what does it mean to replace +characters equal to \newlinechar in this conext by "newline"? What or +whose "newline"? DVI files aren't text files. And if you are going to +say "ASCII CR, of course" or "ASCII LF, of course", be prepared to + [ dek: ^ _or_ _both_ ] +fight off the other 50% of the world :-) If you are going to say +"should depend on the implementation", then don't: the contents of +the DVI file produced are meant to be implementation-independant. + +Reference-level TeX does not treat characters equal to \newlinechar +specially in \special's; they appear unchanged in the DVI file. The +mechanical reason for this is that although |special_out| writes the +token list to the string pool (|selector:=new_string|), the special +treatment of \newlinechar in TeX sections 58--60 only applies when +|selector +Subject: RE: RE: \NEWLINECHAR WITHIN \SPECIAL and \message + +I think that Chris remark that dvi files are to be device independent +is questionable as far as specials are concerned. In fact the +special is supposed to pass some string to the dvi driver and this +means that this program is supposed to understand it. Now this means +that the driver needs to interprete the bytes inside the special +in the same way as the TeX that writes them out. But if we assume +that this is done under some ascii conversion table then why not +accept ascii . Not that I see many applications for this. + +Do I miss something? + +The whole discussion reminded me of some related business with the +newline char of TeX which I think is a bug although one can +surely plea for a questionable feature. + +Compare the output of + +\newlinechar=`\@ +\message{foo@bar} + +to + +\newlinechar=`\^^J +\message{foo^^Jbar} + +The first message is broken into two lines the second comes out as is. + + [ dek: + I guess because of certain UNIX implementations coercing all + tabs to spaces, those implementation cannot possibly "see" + a tab. + ? Wait, tab is ^^I. + What _is_ going on? + Oh, I see; Mittelbach and Sch\"opf are right, see below + $10.24 + ] + +Same discrepancy happens with \errormessage which is quite unfortunate +and certainly makes macro packages non portable if certain characters +can't be entered directly. + +Whether or not this is covered by the documentation in the TeX book +is difficult to say since there are quite a few places where Don +leaves things open to interpretation. + +Frank Mittelbach + ------- +Date: Fri, 10 May 91 17:09:12 +0200 +From: schoepf@sc.ZIB-Berlin.DE (Rainer Schoepf) +Cc: PZF5HZ@RUIPC1E.BITNET +Subject: RE: RE: \NEWLINECHAR WITHIN \SPECIAL and \message + +Frank writes: + + I think that Chris remark that dvi files are to be device independent + is questionable as far as specials are concerned. In fact the + special is supposed to pass some string to the dvi driver and this + means that this program is supposed to understand it. Now this means + that the driver needs to interprete the bytes inside the special + in the same way as the TeX that writes them out. But if we assume + that this is done under some ascii conversion table then why not + accept ascii . Not that I see many applications for this. + + Do I miss something? + +Yes, you do--at least as far as the new line character is concerned. +The point here is that normally the meaning of the \newlinechar is +"TeX's internal end-of-line marker", full stop. When writing to a text +file (irregardless of the code table) this has a definite meaning, +namely: start a new line here, full stop. When it comes to \specials, +the notion of "lines" seems at least questionable, even more since the +sequence of characters inside a \special need not be anything legible. + + [ dek: + Well, I don't intend 8-bit codes to be going there; I hope they + are input from other files by DVI drivers. People might develop + binary-coded special conventions but they are too non-portable. + The main point in Chris's message is that newline is handled in + three completely different ways (on PC, MAC, and UNIX) + ] + +\specials are device-dependent, true. But the consequence of your +argumentation is that the same device (say, a PostScript printer) +would see a different command on a Unix workstation and an IBM +mainframe. Keep in mind that the \special string is not written under +the control of the character conversion tables. + + The whole discussion reminded me of some related business with the + newline char of TeX which I think is a bug although one can + surely plea for a questionable feature. + + Compare the output of + + \newlinechar=`\@ + \message{foo@bar} + + to + + \newlinechar=`\^^J + \message{foo^^Jbar} + + The first message is broken into two lines the second comes out as is. + +New, this is something different, since it applies to text files where +(as I said above) the notion of "start a new line here" is perfectly +sensible. In my eyes this is a bug and should be fixed, even if this +behaviour is in conformance with the TeXbook. + +Rainer Sch\"opf + ------- + + [ dek: + Well I've thought about it some more and decided that \special + should send 8-bit codes to DVI file without changing the + printable ASCII form. This applies also to font file names + in case future users want 8-bit codes in those names (nonportable + but perhaps important to somebody to see the name in Cyrillic + or something). + I am changing TeX 3.14 to do this more logically, basically + by making 8-bit codes more equal to their printable cousins. + At present there are several anomalies [like the string one + mentioned w.r.t. Piff's work] [also when you have file names, + job names, etc. with nonstandard 8-bit codes], and I think I + see how to make it all come out right, ... + as a byproduct, Mittelbach's \message problem goes away too. + Internally characters will not be translated to ^^A form until + the last minute when they simply must be translated. + ] + + +######################################################################## + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Character code reference +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Upper case letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ +% Lower case letters: abcdefghijklmnopqrstuvwxyz +% Digits: 0123456789 +% Square, curly, angle braces, parentheses: [] {} <> () +% Backslash, slash, vertical bar: \ / | +% Punctuation: . ? ! , : ; +% Underscore, hyphen, equals sign: _ - = +% Quotes--right left double: ' ` " +%"at", "number" "dollar", "percent", "and": @ # $ % & +% "hat", "star", "plus", "tilde": ^ * + ~ +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +[ end of message 033 ] +------- + diff --git a/info/digests/tex-implementors/034 b/info/digests/tex-implementors/034 new file mode 100644 index 0000000000..72f510eb97 --- /dev/null +++ b/info/digests/tex-implementors/034 @@ -0,0 +1,508 @@ +Date: 5 November 91 Message No: 034 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: Messages from DEK, part 3 + + +The third installment of DEK's September comments. + + +######################################################################## + +TeX -- size of \smash'ed boxes + +Date: 24 Jun 91 18:56:42 +From: jeffrey%se.chalmers.cs@se.sunet.sunic +Authorised-User: Alan Jeffrey +To: cet1@uk.ac.cam.phx +Subject: Odd TeX behaviour + +Dear Chris, + +Here's something I asked texhax a few days ago---barbara wrote back, +and suggested I ask you about it. Since you were so helpful in +finding that MF bug last year I thought you'd be a good person to ask. + +The problem is what happens if you put a smashed box in a script for a +displaystyle mathop, for example: + + $$ \sum^{\smash{\vrule height 1in depth 1in}} $$ + +produces the same as if the \smash weren't there. In general, if you +take a box, change its size, and put it in a displaystyle mathop +script, the size-changing info is lost. So: + + \setbox0\hbox{...} + \ht0=... + \dp0=... + $$ \sum^{\box0} $$ + +is the same as + + \setbox0\hbox{...} + $$ \sum^{\box0} $$ + +This isn't a bug, since in Appendix G, para. 13a, DEK says + + Set box $x$ to the superscript field... + set box $y$ to the nucleus field... + set box $z$ to the subscript field... + Rebox all three of these boxes to width $\max(w(x),w(y),w(z))$. + +As far as I can tell, in doing this reboxing, the outermost level of +box information is thrown away, and in particular the \ht and \dp +information goes with it. + +So it's not a bug, but it's certainly not what you'd expect! + +Alan. + +Alan Jeffrey Tel: +46 31 72 10 98 jeffrey@cs.chalmers.se +Department of Computer Sciences, Chalmers University, Gothenburg, Sweden + ------- +Date: Thu, 27 Jun 91 16:14:31 BST +From: Chris Thompson +To: Alan Jeffrey +Subject: Re: [Odd TeX behaviour] + +Dear Alan, + + Thank you for your description of the odd effects with \smash in +the limits of a \mathop. I *think* that Don Knuth has covered himself +against the possibility of these effects being bugs, but the situation +is in fact even odder than your examples illustrate. + + As you point out, in + + $$ \sum^{\smash{\vrule height 1in depth 1in}} $$ + +the superscript gets unsmashed by the reboxing described in step 13a +of Appendix A: in terms of code, the call of |rebox| (section 715) +from |make_op| (section 750). One can prevent the recalculation of +the height and depth by + + $$ \sum^{\hbox{$\smash{\vrule height 1in depth 1in}$}} $$ + +or the like. + + However, in + + $$ \sum^{\smash{\vrule width 20pt height 1in depth 1in}} $$ + +the smashing remains in effect! This is because |rebox| does not +unpack and repack the box contents if the width is already what +is required. I suppose that this is implied by the description of +the `subroutine that ``reboxes'' a given box to a given width' on +page 442 of the TeXbook, but it certain isn't explicitly stated. + + |rebox| also doesn't rebox if the box contents are the empty list; +it simply changes the width to that required. This means that any +explictly set \ht and \dp will survive in this case. (This would +happen in the case of a \(h|v)phantom, I think.) I can't find any +mention at all of this in Appendix G. + + Altogether, The situation seems extremely messy, even if it is +according to spec. I think (Barbara?) that it should be brought to +Don's attention, at least. A cleaner spec would be that |rebox| +always preserves the height and depth, but I suppose that might be +an incompatible change. + +Chris Thompson + ------- +Date: Fri, 28 Jun 91 09:44:11 +0200 +From: Alan Jeffrey +Subject: Note about reboxing. + +{\obeylines +{\bf Reboxing math operator scripts in display style} +Alan Jeffrey and Chris Thompson +27 June 1991} + +\hsize 31pc + +{\obeyspaces\global\let =\ } +\catcode`\[=\active \catcode`\]=\active +\def[{\bgroup\par\medskip\tt\obeylines\catcode`\$11\catcode`\\11 + \catcode`\{11\catcode`\}11\catcode`\^11\obeylines\obeyspaces} +\def]{\egroup\par\medskip\noindent\ignorespaces} + +\def\com#1{{\tt\string#1}} + +\medskip\noindent +It turns out that \TeX's algorithm for setting subscripts and +superscripts of limited operators has a rather odd feature. If you +say: +[ +$$ \sum^{\vrule height 2ex depth 2ex} + \sum^{\smash{\vrule height 2ex depth 2ex}} + \sum^{\hbox{\smash{\vrule height 2ex depth 2ex}}} $$ +] +then you get: +$$ \sum^{\vrule height 2ex depth 2ex} + \sum^{\smash{\vrule height 2ex depth 2ex}} + \sum^{\hbox{\smash{\vrule height 2ex depth 2ex}}} $$ +That is, the \com\smash\ has no effect unless it is contained inside +another \com\hbox. In Appendix~G, para 13a of {\it The \TeX book}, the +specification for reboxing a limited script is given as: + +{\medskip\narrower\noindent + Set box $x$ to the superscript field in style $C{\uparrow}$; set box + $y$ to the nucleus field in style $C$; and set box $z$ to the + subscript field in style $C{\downarrow}$. Rebox all three of these + boxes to width $\max(w(x), w(y), w(z))$.\par} + +\medskip\noindent +It appears that this reboxing (performed by {\bf rebox} \S715) loses +the outermost level of box information. This is confirmed by: +[ +$$ \sum^{\vrule width 20pt height 2ex depth 2ex} + \sum^{\smash{\vrule width 20pt height 2ex depth 2ex}} + \sum^{\hbox{\smash{\vrule width 20pt height 2ex depth 2ex}}} $$ +] +which produces: +$$ \sum^{\vrule width 20pt height 2ex depth 2ex} + \sum^{\smash{\vrule width 20pt height 2ex depth 2ex}} + \sum^{\hbox{\smash{\vrule width 20pt height 2ex depth 2ex}}} $$ +So when the script does not require reboxing, its height and depth are +not lost. + +The situation seems rather messy, albeit according to spec. A cleaner +8specification would be that {\bf rebox} should preserve height and +depth, but this may be an incompatible change. + + [ dek: _Correct_ _analysis_ ] + +\medskip + +\line{\hfil\it Alan Jeffrey} +\line{\hfil\it Chris Thompson} + +\bye + ------- + +[ Here's another view of the same problem. ] + +Date: Tue, 6 Aug 91 18:55:35 EDT +From: barr@triples.math.mcgill.ca +To: info-tex@SHSU.edu +Subject: problem with Tex + +Can anyone explain the discontinuity in the following, or how to make +the dots go into an intermediate position? + +Michael Barr + +\def\rdiv{\mathrel{\mathop + {\hbox{\vrule height.55ex width0pt depth-.54ex + \smash{\hbox{\mathsurround=0pt$-$}}}}% + \limits^{\hbox to .75em{\hss$\textstyle.$}}% + _{\hbox to .75em{\smash{\raise1.20ex\hbox{$\textstyle.$}}\hss}}}} + +\def\ldiv{\mathrel{\mathop + {\hbox{\vrule height.55ex width0pt depth-.54ex + \smash{\hbox{\mathsurround=0pt$-$}}}}% + \limits^{\hbox to .75em{$\textstyle.\hss$}}% + _{\hbox to .75em{\hss\smash{\raise1.20ex\hbox{$\textstyle.$}}}}}} + +$A\ldiv B\rdiv C$ + + +\def\rdiv{\mathrel{\mathop + {\hbox{\vrule height.55ex width0pt depth-.54ex + \smash{\hbox{\mathsurround=0pt$-$}}}}% + \limits^{\hbox to .76em{\hss$\textstyle.$}}% + _{\hbox to .76em{\smash{\raise1.20ex\hbox{$\textstyle.$}}\hss}}}} + +\def\ldiv{\mathrel{\mathop + {\hbox{\vrule height.55ex width0pt depth-.54ex + \smash{\hbox{\mathsurround=0pt$-$}}}}% + \limits^{\hbox to .76em{$\textstyle.\hss$}}% + _{\hbox to .76em{\hss\smash{\raise1.20ex\hbox{$\textstyle.$}}}}}} + +$A\ldiv B\rdiv C$ + + +\def\rdiv{\mathrel{\mathop + {\hbox{\vrule height.55ex width0pt depth-.54ex + \smash{\hbox{\mathsurround=0pt$-$}}}}% + \limits^{\hbox to .77em{\hss$\textstyle.$}}% + _{\hbox to .77em{\smash{\raise1.20ex\hbox{$\textstyle.$}}\hss}}}} + +\def\ldiv{\mathrel{\mathop + {\hbox{\vrule height.55ex width0pt depth-.54ex + \smash{\hbox{\mathsurround=0pt$-$}}}}% + \limits^{\hbox to .77em{$\textstyle.\hss$}}% + _{\hbox to .77em{\hss\smash{\raise1.20ex\hbox{$\textstyle.$}}}}}} + +$A\ldiv B\rdiv C$ + + +\def\rdiv{\mathrel{\mathop + {\hbox{\vrule height.55ex width0pt depth-.54ex + \smash{\hbox{\mathsurround=0pt$-$}}}}% + \limits^{\hbox to .78em{\hss$\textstyle.$}}% + _{\hbox to .78em{\smash{\raise1.20ex\hbox{$\textstyle.$}}\hss}}}} + +\def\ldiv{\mathrel{\mathop + {\hbox{\vrule height.55ex width0pt depth-.54ex + \smash{\hbox{\mathsurround=0pt$-$}}}}% + \limits^{\hbox to .78em{$\textstyle.\hss$}}% + _{\hbox to .78em{\hss\smash{\raise1.20ex\hbox{$\textstyle.$}}}}}} + +$A\ldiv B\rdiv C$ + + +\def\rdiv{\mathrel{\mathop + {\hbox{\vrule height.55ex width0pt depth-.54ex + \smash{\hbox{\mathsurround=0pt$-$}}}}% + \limits^{\hbox to .79em{\hss$\textstyle.$}}% + _{\hbox to .79em{\smash{\raise1.20ex\hbox{$\textstyle.$}}\hss}}}} + +\def\ldiv{\mathrel{\mathop + {\hbox{\vrule height.55ex width0pt depth-.54ex + \smash{\hbox{\mathsurround=0pt$-$}}}}% + \limits^{\hbox to .79em{$\textstyle.\hss$}}% + _{\hbox to .79em{\hss\smash{\raise1.20ex\hbox{$\textstyle.$}}}}}} + +$A\ldiv B\rdiv C$ + + +\def\rdiv{\mathrel{\mathop + {\hbox{\vrule height.55ex width0pt depth-.54ex + \smash{\hbox{\mathsurround=0pt$-$}}}}% + \limits^{\hbox to .80em{\hss$\textstyle.$}}% + _{\hbox to .80em{\smash{\raise1.20ex\hbox{$\textstyle.$}}\hss}}}} + +\def\ldiv{\mathrel{\mathop + {\hbox{\vrule height.55ex width0pt depth-.54ex + \smash{\hbox{\mathsurround=0pt$-$}}}}% + \limits^{\hbox to .80em{$\textstyle.\hss$}}% + _{\hbox to .80em{\hss\smash{\raise1.20ex\hbox{$\textstyle.$}}}}}} + +$A\ldiv B\rdiv C$ + +\bye + ------- +Date: Tue, 6 Aug 91 21:54 PDT +From: Donald Arseneau +To: info-tex@SHSU.edu +Subject: Re: problem with positioning of mathop limits + +Michael Barr (barr%triples.math.mcgill.ca) had a problem with jumps +in the placement of the limits on an operator. + +> Can anyone explain the discontinuity in the following, or how to make +> the dots go into an intermediate position? +> +> \def\rdiv{\mathrel{\mathop +> {\hbox{\vrule height.55ex width0pt depth-.54ex +> \smash{\hbox{\mathsurround=0pt$-$}}}}% +> \limits^{\kern0pt\hbox to .77em{\hss$\textstyle.$}}% +> _{\kern0pt\hbox to .77em{\smash{\raise1.20ex\hbox{$\textstyle.$}}\hss}}}} +> + +I've seen that problem before (with someone else's problem) and I stick +by my explanation: an error in TeX. What I think is happening is a +misapplication of the unboxing explained on the first page of Appendix G: +"In case (c), the glue is set with no stretching or shrinking, and additional +level of hboxing is omitted if it turns out to be redundant." But when that +hbox has had its size (\ht, \wd, \dp) changed, or it is not set to its natural +width (to, spread) it is *NOT* redundant but gets omitted anyway! + +The immediate solution to Michael Barr's problem is to put something +outside the measured box so it cannot be omitted. Change all + \hbox to +to + \kern0pt \hbox to +and it will work. + +The discontinuity with the size of the measured hbox was very interesting. +In all cases the boxes for the limits were set to the width of "-", 7.777pt. +But TeX obviously did some measurement before discarding the important +level of boxing. For \hbox to Xpt, X < 7.7777, the limits were unboxed +and surrounded by \hss...\hss, giving in effect "\hss \hss . \hss", which +placed the dot 1/3 of the way across the minus sign. When X > 7.7777, +TeX thought the nucleus "-" was norrower than the limits and did not pad +the limits with \hss, leaving them as "\hss .". After unboxing and reboxing, +the limits could stretch only on one side leaving the dot at one edge of +the minus sign. + +Donald Arseneau asnd@triumfcl (.bitnet) + asnd@reg.triumf.ca + ------- +Date: Wed, 7 Aug 91 11:11:56 EDT +From: barr@triples.math.mcgill.ca (Michael Barr) +To: bnb@math.ams.com +Subject: more problems with boxes + +If you don't subscribe to texinfo, you may have missed my query and +Donald Arsenault's reply. Briefly, I was having trouble with the +series: + +... \def\rdiv{...} [ series as in message to info-tex ] + +shose output changes discontinuously as the parameter changes from .77 +to .78 (not coincidentally, the width of $-$ is .77777...em). This is +clearly more troubles with 13a on page 444, but I still couldn't see why +I wasn't getting growth before that. (In fact, the parameter could have +been 0 with no effect on the output, which I wasn't quite aware of, +although I knew that down to .3em it made no difference.) It turns out +that what is likely happening is explained by line -4 on page 441, which +Donald says he had run into before. Apparently, TeX' rules for deciding +what ``turns out to be redundant'' are not the same as you and I might +decide on. He suggested that what was happening is that TeX was +unboxing the \hbox and then implementing 13a (which he wasn't aware of, +or at least didn't mention) by reboxing it with an \hss on either side +so that the effect of my code was as if it said \hss\hss.\hss on one +side and vice versa on the other, which resulted in the dots exactly 1/3 +of the way (or 2/3). At this point, I have come up with + +\def\rdiv{\mathrel{\mathop + {\hbox{\vrule height.55ex width0pt depth-.54ex + \smash{\hbox{\mathsurround=0pt$-$}}}}% + \limits^{\hskip0pt plus3fil\textstyle.}% + _{\smash{\raise1.20ex\hbox{$\textstyle.$}}\hskip0pt plus3fil}}} + +\def\ldiv{\mathrel{\mathop + {\hbox{\vrule height.55ex width0pt depth-.54ex + \smash{\hbox{\mathsurround=0pt$-$}}}}% + \limits^{\textstyle.\hskip0pt plus3fil}% + _{\hskip0pt plus3fil\smash{\raise1.20ex\hbox{$\textstyle.$}}}}} + +which is simpler and allows fine control over the spacing. + +If you have not yet asked DEK about the 13a problem, you might include +these observations. In any case, a little more explanation is clearly +wanting here. By the way, DA suggested (correctly) that a \kern0pt +would prevent the unboxing. + +Allow me to second strongly Nelson Beebe's plea in the last three +paragraphs of his editorial in the most recent tugboat. I have now +spent most of a day getting through the texarcana in building one simple +little sign. The number of permutations of \smash and \raise I had to +try to get the vertical placement right (and only by eye, with no +guarantee it will be right at another point size), the amount of time +wasted on getting the horizontal placement right, they both seemed +infinite. It simply shouldn't be so hard to do something so simple. +The fact that adding a kern of 0pt changes everything is +incomprehensible. The facts that \smash requires, while \raise forbids +a brace following it are incomprehensible. The entire chapter on dirty +tricks is an indictment of the program. Almost everything in that +chapter is entirely reasonable and should have straightforward ways of +doing them, not be the subject of dirty tricks. The lack of a simple +reliable loop is unforgivable. A while ago, someone posed a question on +texhax about leaving a 2"x2" box in the lower right corner of each page. +So far as I know, this question got no answer, perhaps has NO reasonable +answer in tex as currently constituted. Certainly, I could think of +none. Nor could I think of any way of having one page narrower than +another. This sort of thing is not good if we expect TeX to grow. + +Michael Barr + ------- +Date: Wed, 07 Aug 91 15:32:12 BST +From: Chris Thompson +To: Barbara Beeton +Cc: Donald Arseneau , + Michael Barr +Subject: Re: [[barr@triples.math.mcgill.ca: problem with Tex]] + +This one is similar to the height&depth-losing problem you sent me +before, but I think this one *is* unambiguously covered by Appendix G, +unexpected though the effects may be. + +The relevant section is 13a, where the reboxing of \mathop's with +limits is being described. (Code is in TeX module 750.) Reboxing is +decsribed in the middle of p.442 ("There's also a subroutine..."). +The nucleus is this case is 7.7778pt wide; in the first few cases +the super- and sub-scripts are narrower, have \hss glue added on each +side, and are reboxed (losing the old specification). In the last few +cases, the nucleus is narrower and is reboxed, the super- and sub- +scripts being left alone. Because there is already \hss glue in the +boxes, adding more of the same fundamentally alters their appearence. +(Page 442 does warn about this when it says "it centers ... unless +infinite glue is present in addition to the newly added \hss".) + +Donald Arseneau is, I suppose, right to quote (c) from p.441: +the problem is the (false?) optimizations that TeX performs in +math-to-hosizontal conversion when it removes the "outermost" level +of boxing on math node components. His suggested \kern0pt will indeed +prevent this, of course. + +Donald is wrong, however, in saying +> In all cases the boxes for the limits were set to the width of "-", 7.777pt. + +They are, in fact, so set only in the cases when the explicit widths +of the super- and sub-script boxes are smaller than this; in the last +three cases the boxes all end up as 7.8, 7.9 and 8.0pt wide (+/- +rounding errors from the conversions from "em" to "pt"). Easily verified +by using \showlists. + +Chris Thompson + ------- +(reply, 7 Aug 91, to all) +chris, +thanks for your analysis. +the effects here are so unexpected that i think the problem is +worth a good strong warning in tugboat. could you help me to +prepare such a warning, with a very simple example showing what +happens under the relevant circumstances, and what can be done +to avoid it? if i come up with the example, can you prepare the +prose, citing chapter and verse? + -- bb + ------- +Date: Thu, 08 Aug 1991 02:25:27 PDT +From: Donald Arseneau +To: uk%\"CET1@PHOENIX.CAMBRIDGE.AC.UK\"@erich.triumf.ca +Subject: Re: [[barr@triples.math.mcgill.ca: problem with Tex]] + +Arrrggghh! +I could have sworn I saw those little boxes staying at 7.77777pt. + +I guess the description of reboxing on p442 is more complete, and it +doesn't require the box to be "redundant", just a hbox. + +This behaviour of TeX certainly violates the principle that round-off +errors shouldn't produce gross differences in the output. + +Donald + ------- + +[ As suggested above, I intend to follow up with Chris to get a + statement of the problem for publication as a warning in TUGboat. ] + + [ dek: ^^^^^^^^^^^^^^^ right. + If these things had been brought up years ago, TeX might have + changed [e.g. rebox preserving height/depth, \smash always + adding another level of boxing <-- but that might overflow + memory] + The unboxing etc. turns out to be extremely important for + posting of superscripts on accented variables ... + Anyway, no changes now, on grounds of compatibility etc. + ] + + +######################################################################## + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Character code reference +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Upper case letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ +% Lower case letters: abcdefghijklmnopqrstuvwxyz +% Digits: 0123456789 +% Square, curly, angle braces, parentheses: [] {} <> () +% Backslash, slash, vertical bar: \ / | +% Punctuation: . ? ! , : ; +% Underscore, hyphen, equals sign: _ - = +% Quotes--right left double: ' ` " +%"at", "number" "dollar", "percent", "and": @ # $ % & +% "hat", "star", "plus", "tilde": ^ * + ~ +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +[ end of message 034 ] +------- + diff --git a/info/digests/tex-implementors/035 b/info/digests/tex-implementors/035 new file mode 100644 index 0000000000..d4412eba65 --- /dev/null +++ b/info/digests/tex-implementors/035 @@ -0,0 +1,384 @@ +Date: 5 November 91 Message No: 035 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: Messages from DEK, part 4 + + +Fourth and last installment of DEK's September comments. + +Also included in DEK's package were some general comments to Peter +Breitenlohner, who is, with DEK's encouragement, updating PATGEN to +accommodate the new features of TeX 3. This is still a work in +progress; however, anyone else who has examined PATGEN with this +extension in mind might want to get in touch with Peter directly. +(Sorry, Peter, for not warning you ahead of time.) + + +######################################################################## + +TeX -- incompatibilities between \input and \openin + +This report is my own. When updating our user documentation for +AMS-TeX, AMS-LaTeX, et al., I try to keep the files that will be +distributed together in one directory, and run (La)TeX from another, +to segregate the files that are created by the run from the originals. +There is no problem with files based on Plain, but LaTeX first checks +for the existence of some files with \openin and, if they are there, +then applies \input . + +The problem is that (at least in the VMS and some PC implementations) +\openin checks only the connected directory, not the path specified +by TeXinputs: . Discussions with other users and implementors have +uncovered the fact that some implementors have added the logical path +to the \openin procedure, while others have not. (The DEC-20 +implementation did check TeXinputs: for both \input and \openin, so +I had rashly assumed that was what was supposed to happen.) + +I understand that the WEB code for the two procedures is different, but +I believe it's not clear whether or why \openin should *not* check the +same input path as \input , and that means the implementors are free to +make their own interpretation. A clear statement of what the behavior +should be would be very helpful. + + [ dek: + I had some correspondence about this a few months ago, but I + forgot what I said. + The difference in code between \input and \openin is actually + to allow reading files from a system area under \read without + requiring a full path name, but not under \openin. + However, lots of operating systems make it nicer to define + environmental variables for sequences of places to try, and + such implementations naturally make use of the more general + paths on \openin as well as \read. + Clearly LaTeX is important enough that the implementors should + make LaTeX as easy to use as possible. I need the feature also + with my use of Plain TeX: I have put ".." on my standard input + path list, so that I can go to a subdirectory to make a DVI file + and partial cross reference files that won't disturb anything + on the parent directory. + I recommend therefore that implementors use environmental + variables for directory path lists (or a default one if the + programmer hasn't set it up) whenever the operating system + allows it. + My favored conventions on implementation questions in general + are expressed by the change files I have contributed to the + distribution [under `local' directory] ... these are for + Pascal, _not_ C, versions of TeX and MF but I do use them heavily. + Incidentally I dislike several aspects of WEB-to-C versions on + Stanford computers, especially the treatment of command lines -- + they don't check .fmt files for garbage but I guess that hasn't + been a problem. + ] + +************************************************************************ + +WEB system -- dealing with repeating code in .WEB files + +Date: Tue 26 Mar 91 20:09:38-EST +From: bbeeton +To: cet1%phx.cam.ac.uk@nsfnet-relay.ac.uk +Subject: possible bugs, requesting verification + +[ this was in response to my saying that any large .web file + is likely to have repeating blocks of code, and thus a line + number is advisable when listing differences. where he says + "web" he clearly means "tangle". ] + +Date: Sat, 23 Mar 1991 20:22 PST +From: Don Hosek +Subject: Re: Updates to TeX.WEB, MF.WEB, GFtoDVI, et al. + +Incidentally, the repeating code problem is particularly nasty +when writing change files. WEB only checks to see if the first +line matches rather than the whole of the text in the @x..@y +block which caused me a great deal of grief when I wrote the CMS +change file for MFT; there are a lot of repeating first lines of +a block of text. + + -dh + ------- +Date: Wed, 27 Mar 91 18:33:18 GMT +From: Chris Thompson +Subject: Re: [possible bugs, requesting verification] + +... + + As regards Don Hosek's complaint about Web (and it applies to both +TANGLE and WEAVE, of course, which is presumably why he confusingly says +"Web"): I agree, it's a right pain. I understand why it got like that, +though: it means that the programs never have to buffer more than one +line from each input file at a time. I am still paranoid about storage +consumption as well, in an age where there is little sympathy for this! + +The worst cases are when one *removes* a change (maybe one had an ahead- +of-base-source bug fix, for example) and suddenly later changes start +failing to match (or even worse, succeed in matching) the wrong part +of the file. One has to increase the context, often into the TeX parts +of the modules, to ensure uniqueness. I would certainly suggest that you +send Don Hosek's remarks to Don Knuth, but I fear he probably won't want +to change anything in this area now. + +Chris Thompson + ------- +Date: Thu, 28 Mar 91 17:03:50 GMT +From: Chris Thompson +Subject: Re: [possible bugs, requesting verification] + +... + +It is all documented: WEBMAN.DVI page 10, section 11 says: "Whenever the +first ``old line'' of a change is found to match a line in the web_file, +all other lines in that change must match too." There is no bug; it is +just a rather painful spec to live with, as Don Hosek says. It is a bit +painful, as well, that it just reflects the @y, and doesn't tell you +*which* lines mismatched! + +Chris + ------- + + [ dek: + WEB was never intended to be the "last word"; I expect second + generation systems to do all kinds of things with much greater + generality. I stopped when I had something good enough to + get on with what needed to be done. There is something painful + about every system, but really I have lots more problems with + all the other software I have to live with! + ] + + +######################################################################## + +Date: Tue, 30 APR 91 21:31:17 BST +Reply-to: Brian {Hamilton Kelly} +From: TEX@rmcs.cranfield.ac.uk +To: BNB <@nsfnet-relay.ac.uk:BNB@MATH.AMS.com> +Subject: Possible bug in TeX V3.1 ??? + +Dear barbara, + +I'm loth to say this, because I know how rarely anything is genuinely a +bug, but I'm a bit suspicious about TeX's unpacking and repacking of +ligatures before and after hyphenation. + +I have a font that, like DEK's example in the New TeX and MF +announcement, has a variant of "s" for the ends of words (it's actually +an updating of my Greek fonts). + +So the ligature program reads as follows: + +% +% Ligatures for sigma at end of "word" +% +boundarychar := 255; + +ligtable "s": 255 =:| "c", "." =:| "c", "," =:| "c", + ":" =:| "c", ";" =:| "c", "!" =:| "c", + "?" =:| "c", ")" =:| "c", "/" =:| "c", + "]" =:| "c", "*" =:| "c"; +% +% Note that s is not ligatured with apostrophe, so that one can write things +% like s''ena sp'iti ('' in this font produces an apostrophe, since ' +% on its own is an acute accent.) +% + +Now this works beautifully, most of the time. However, if TeX decides +that it should attempt hyphenation, and if the word being hyphenated +ends in punctuation, such as ".", then \S898 of TeX.web gives up on +taking apart the ligatures when it meets the period, since it's a +non-letter (has lc_code=0) --- so the word "xomol'ogysys." (where 'o is +a ligature defined in the font, and for which "'" has a non-zero lccode) +gets passed to the hyphenation procedure as the 12 characters "x o m o l +' o g y s y s" in hc[1:hn]. After hyphenation has been considered, the +period is no longer hanging around for reconstitute to put back +together. (Incidentally, when I read the code, I'd convinced myself that +the final "s" wasn't going to be present in hc[hn] for hyphenate to +consider, but the VAX-Pascal debugger shows that it _is_ there!) + +I've managed to effect a workaround, by setting the \lccodes for all the +punctuation that enters into the ligature program for sigma; but then +the hyphenation algorithm is given the _13_ characters "x o m o l ' o g +y s y s .", which I'm sure it's unlikely to be completely happy with +(although it does seem to find the same breaks); surely, it will no +longer recognize any explicit end-of-word marks in the \patterns? + [ dek: + that is true but perhaps there areen't so many patterns in + Greek. (Of course I am not happy with this workaround either) + ] +Perhaps, instead of setting \lccode`\.=`\., I should perhaps set it as +\lccode`\.=256, so that it's non-zero, but doesn't pass the character +{\it per se\/} into the hyphenation algorithm. + +Perhaps you could ask Don what he advises, or whether perhaps \S898 +should _complete_ its dismantling of the ligature, and only afterwards +exclude the non-letter characters, noting the whole sequence for +reconstitute's benefit. + +Brian +------- +Date: Thu, 02 May 91 00:49:54 BST +From: Chris Thompson +To: bbeeton +Cc: Brian {Hamilton Kelly} +Subject: Re: [[TEX@rmcs.cranfield.ac.uk: Possible bug in TeX V3.1 ???]] + +Barbara, + +There does indeed appear to be something murky going on. I am not at all +familiar with the code for reconstituting new-style ligatures, so a full +report will take a little while... + +Setting the \lccode's for punctuation to pretend that they are letters +is a terrible way to have to work round the problem, and B{HK} is of +course right that +> it will no +> longer recognize any explicit end-of-word marks in the \patterns + +On the other hand +> I should perhaps set it as +> \lccode`\.=256 +certainly won't work: \lccode values are restricted to 0..255. I am not +sure what he is trying to say here. + +Chris Thompson +JANET: cet1@uk.ac.cam.phx +Internet: cet1%phx.cam.ac.uk@nsfnet-relay.ac.uk +------- +Date: Thu, 2 MAY 91 22:11:57 BST +Reply-to: Brian {Hamilton Kelly} +From: TEX@rmcs.cranfield.ac.uk +To: BNB <@nsfnet-relay.ac.uk:BNB@MATH.AMS.com> +Subject: Re: [[TEX@rmcs.cranfield.ac.uk: Possible bug in TeX V3.1 ???]] + +Chris, + +In message of Thu, 02 May 91 +00:49:54 BST, Chris Thompson wrote: + +> There does indeed appear to be something murky going on. I am not at all +> familiar with the code for reconstituting new-style ligatures, so a full +> report will take a little while... + +Thanks! I thought I was going nuts at first! + +> Setting the \lccode's for punctuation to pretend that they are letters +> is a terrible way to have to work round the problem, and B{HK} is of +> course right that +> > it will no +> > longer recognize any explicit end-of-word marks in the \patterns +> +> On the other hand +> > I should perhaps set it as +> > \lccode`\.=256 +> certainly won't work: \lccode values are restricted to 0..255. I am not +> sure what he is trying to say here. + +Sorry, I hadn't tried this; in fact, only thought of it when composing +the message. By analogy with \hyphenchar, I was hoping that I could set +an \lccode to a non-character value, and thus ensure (perhaps?) that the +hyphenation algorithm wouldn't consider the punctuation characters, +since they'd be excluded in |hc|; but I see now that |lc_code| is a +|equiv| and thus in a |quarter_word|, so cannot be set outside range +0..255 (as TeX tells me when I try!) + +One thought: + Perhaps when unravelling ligature nodes in the pre-hyphenation phase, + TeX should take cognizance of whether the ligature program was one + that used =:| or |=:| (I'm not sure of |=:) and still stop at the + [ dek: ^^ is this a smily face? ] + punctuation character, corresponding to the "retained" character, but + remember that it "belonged" and thus still be able to reconstitute it + correctly afterwards. + +Best regards, + Brian +------- +Date: Fri, 03 May 91 17:17:13 BST +From: Chris Thompson +To: Barbara Beeton +Cc: Brian {Hamilton Kelly} +Subject: Re: [[TEX@rmcs.cranfield.ac.uk: Possible bug in TeX V3.1 ???]] + +Barbara, & Brian, + + I have been looking at the pre- and post- hyphenation code, and I have +come to the conclusion that Brian's problem is probably a bug, rather +than a feature. + + The horizontal list for either "...ogysys " or "...ogysys. " contains +a ligature node with |lig_char| = "c" and component character list +containing just "s"; the "." is a separate character node in the second +case. The difference is that in the first case the ligature node's +|sub_type| is 1 ("formed from a right boundary character") while in the +second it is 0. + + If automatic hyphenation is invoked, section 898 reconstructs the +original character list up to "s", and this is what is intended. The +difference in the cases is that section 903 sets |bchar:=255| in the +first case (|hb| is the ligature node described above) but not in the +second case. This allows |reconstitute| to rebuild the ligature node, +but only in the first case. + + The reason I think this is probably a bug is the asymmetry of +treatment of the left-hand and right-hand edges of the word in section +903. There |ha| is examined in great detail in order to decide what +to put into |hu[0]| and |init_lig|, in particular if the word is +preceded by punctuation characters that alter the first letter of the +word (e.g. by |=:> ligatures) then such effects will be recreated by +by |reconstitute|. On the other hand, |bchar| is set only to |non_char| +|font_bchar[hf]|; any following punctuation characters (at |q=link(hb)|) +are never examined. + + Certainly I think this ought to be brought to Don's attention, if +he has any to spare for TeX at the moment. I think it may actually be +a matter of some urgency, in that otherwise people like Brian trying +to use right-boundary effects in fonts may be forced into using +inappropriate work-rounds; maybe even ones that would not survive +a proper fix. + +Chris Thompson +JANET: cet1@uk.ac.cam.phx +Internet: cet1%phx.cam.ac.uk@nsfnet-relay.ac.uk +------- + + [ dek: + Chris is absolutely right; I should have provided better right + context to the reconstitution algorithm. + [Why did I get into this?!] + Draft changes are being put into version 3.14$\alpha$ + In the new version the effect of \noboundary between a word and + punctuation will be lost (for example ...ogysys\noboundary. _will_ + now convert the s to a c ) + but that minor problem is much worse than the present alternative. + An explicit kern + ...ogysys\noboundary\kern0pt. + will preserve such noboundary status if necessary. + The going rate for bugs in the 1989 code is $10.24, so Brian + gets credit for this one! + ] + + +######################################################################## + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Character code reference +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Upper case letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ +% Lower case letters: abcdefghijklmnopqrstuvwxyz +% Digits: 0123456789 +% Square, curly, angle braces, parentheses: [] {} <> () +% Backslash, slash, vertical bar: \ / | +% Punctuation: . ? ! , : ; +% Underscore, hyphen, equals sign: _ - = +% Quotes--right left double: ' ` " +%"at", "number" "dollar", "percent", "and": @ # $ % & +% "hat", "star", "plus", "tilde": ^ * + ~ +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +[ end of message 035 ] +------- + diff --git a/info/digests/tex-implementors/036 b/info/digests/tex-implementors/036 new file mode 100644 index 0000000000..1a9a31fa85 --- /dev/null +++ b/info/digests/tex-implementors/036 @@ -0,0 +1,540 @@ +Date: 14 March 91 Message No: 036 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: Messages from DEK, part 1 + + +The latest package of marked-up messages from DEK was postmarked +15 January 92. It contained 10 checks, including two for actual bugs. +Unfortunately, other matters have conspired to delay my forwarding of +all this material, and I apologize. (I don't suppose anyone out there +would like to be a TUGboat production assistant? Or has lots of +experience in moving from one office to another with less shelf space +without losing track of anything? Didn't think so, somehow.) + +As some of you may know, DEK was awarded an honorary doctorate by the +Royal Institute of Technology in Stockholm last November. At that time, +some bug reports and other questions were apparently given to him in +person, and changes have been delayed as explained in this note which +accompanied the package: + + Barbara: Many thanks for this compilation! I will not however be + ready to update the sources until February because I mistakenly + put some things recd in Sweden into the wrong box and they are + currently being shipped via _sea_ _mail_. + I have gone through this material but will hold off updating the + master sources until I've gotten through some other things sent + to me in Stockholm from Poland, some of which may be extremely + important + +I have just finished checking the /tex area at labrea. There are no new +files in the errata directory, and as these are usually the first to be +installed, I assume that the main update has not yet been made. + + +######################################################################## + +Contents: + [ part 1 ] + >>> responses to DEK Sep 26 package + >>> DEK's alpha test, TeX 3.14a + >>> TeXbook errata + >>> inconsistent ligature/kerning behavior + >>> inconsistent expansion of \string, etc.; \newlinechar + >>> \halign + box assignment within displays + >>> positive/negative xn_over_d, tex.web section 107 + >>> DRF's "remaining comments" + >>> suggestion -- additional tracing facilities for \if* + >>> DEK's "local" change files, not at labrea + [ part 2 ] + >>> glue_ratio overflow + >>> \TeX logo; some problems with \loop + >>> cedilla accent macro in plain.tex + >>> missing \mathsurround in plain.tex + >>> \arrowvert code, plain.tex + >>> MF -- bugs or features? (also, some ACP errata) + >>> MFbook errata + >>> WEAVE -- Peter Breitenlohner + >>> WEAVE -- Brian {Hamilton Kelly} + [ sent separately ] + >>> Barry Smith, |history| variable in TeX.WEB + >>> Chris Rowley, two items: \fontdimen2 and marks + +************************************************************************ + +>>> responses to DEK Sep 26 package + +Date: Mon, 23 Dec 91 13:23:58 +0100 +From: Eberhard Mattes +Subject: Backenfisch, tex.web + +> [ dek: should i have used `backenfisch' instead? ] + +Maybe deleting `compound' on p. 96 would be better since I have found +no word with ck hyphenated k-k *because* it is a compound word. +(Of course there are words containing tt hyphenated tt-t *because* +they are compound words.) + + [ dek: + point well taken ... but I wasn't serious and i _did_ delete + `compound' in September as he requested + ] + --- + +In tex.web, there's a @^system dependencies@> missing for the line + [ dek: \S798 ] + +if n>max_quarterword then confusion("256 spans"); {this can happen, but won't} + ^^^ + This is system-dependent. + [ dek: $2.56 ] + +Yours, + Eberhard Mattes (mattes@azu.informatik.uni-stuttgart.de) + +<<< end responses to DEK Sep 26 package + +************************************************************************ + +>>> DEK's alpha test, TeX 3.14a + +Date: Tue 24 Sep 91 11:22:21-EST +From: bbeeton +To: cet1%phx.cam.ac.uk@nsfnet-relay.ac.uk, + tex%uk.ac.cranfield.rmcs@nsfnet-relay.ac.uk, pzf5hz@ruipc1e.Bitnet +Subject: message from dek -- tex alpha version 3.14a + +chris, brian, and frank, +you are hereby deputized to follow dek's instructions and test out +the new version. [ ... ] +i won't forward this information to anyone else [for at least two +weeks], and you probably should be discreet about it too. thanks. +cheers. -- bb + -------------------- +Date: Fri, 20 Sep 91 12:50:54 -0700 +Subject: note from Don + + [ copy of message from dek ] + ------- +Date: Thu, 26 SEP 91 22:31:01 BST +From: TEX@rmcs.cranfield.ac.uk +Reply-to: Brian {Hamilton Kelly} +Subject: RE: message from dek -- tex alpha version 3.14a + +In message <685725741.0.BNB@MATH.AMS.COM> +of Tue 24 Sep 91 11:22:21-EST, bbeeton wrote: + +> chris, brian, and frank, +> you are hereby deputized to follow dek's instructions ... +> ... (i will take care of the envelope of "comments and checks" + ^ + (Would I spell this cheques? :-) +> as soon as i can after i get back to providence.) + +Well, I've collected the new files (I *love* the README!!), modified my +change file to accommodate the new banner and a few of the +|slow_print|s, and built 3.14a. It's great!! Fixes my problem with +hyphenation vs. boundary ligatures perfectly. And what an elegant +solution: I'd expected the fix to be complicated, but it just requires +one simple global and the odd preservation of context. + +> Date: Fri, 20 Sep 91 12:50:54 -0700 +> Subject: note from Don +> +> Meanwhile, there's some more "immediate" news. I've prepared an +> alpha-test version of TeX, called version 3.14a. Before I release +> it officially, I'd like CET1 and Brian Hamilton-Kelly and maybe +> Frank Mittelbach [and anybody else you think best, but I don't really +> want this version to proliferate] to try it. There are two changes, +> one to cure the anomaly Frank noticed about \newlinechar acting +> differently wrt \write and \message [and other similar glitches I +> then noticed myself], the other to fix I hope the problem Brian was +> having with Greek. I'm reluctant to let the version number converge to +> \pi too quickly, so I would at least like to have Brian accumulate +> some experience with his Greek tests before putting this out widely. +> Of course anybody is free to use it at their own risk. + +Be warned, however, that so far I've only tested it against the input +that caused me problems back in April. I'll try to do some more +thorough testing in the near future. + + [ dek: + Certainly hope you did by now -- I need more reassurance than + a single test + ] + +> The files tex.web and tex82.bug have been moved to labrea.stanford.edu +> where they are accessible via anonymous ftp. After logging in, +> connect to directory alpha (which is for alpha-test software). +> I forgot to copy the trip test files; if they are desperately needed, +> I could bring them in from home. + +I haven't TRIPped the new TeX for this reason. The interesting thing +would be if TRIP were extended to check the new ligature/hyphenation +code: I expect that, with DEK's customary thoroughness, he'll have done +this, so look forward to applying the tests myself when 3.14a emerges as +3.141. + + [ dek: + Actually my customary thoroughness is becoming less customary + ] + +> So, next week you'll get my letter explaining all! Meanwhile, a +> lookahead: I'll be in Sweden during November and December (thanks to +> some good words from Roswitha, I'll getting an honorary degree +> there!), and I plan to make the next official update to TeX sources +> early in January. By then, this version 3.14a should be checked out, +> and I can release it as version 3.141. + +Whilst you're talking to DEK, barbara, what response did he give to that +d..d problem of Weave failing to wrap correctly when processing a TeX +comment? I have a horrible suspicion in my mind that he's already said +something to the effect that he edited it manually! Or am I imagining +that horror? My fix works very well and doesn't have any bugs that I +can see, so why doesn't he adopt it? + +Brian HK + ------- +Date: Sun, 29 Sep 91 00:56:57 BST +From: Chris Thompson +To: Barbara Beeton +Cc: Brian {Hamilton Kelly} , + Frank Mittelbach +Subject: Re: [message from dek -- tex alpha version 3.14a] + +Barbara, Brian, Frank, + + I have fetched and compiled TeX 3.14a. Unfortunately, change 397 +seems to have bugs. Try the following input: + + % TeX 3.14a test + \pretolerance=-1 + \ Respectively.\par + \showboxbreadth=255 \showboxdepth=255 \showlists + \bye + +and compare the log files for 3.14 and 3.14a. That for 3.14a has an +extra kern in between the "-ly" and the ".": + + .\tenrm e + .\tenrm l + .\tenrm y + .\kern-0.83334 \ This kern has been doubled by the + .\kern-0.83334 / automatic hyphentaion algorithm. + .\tenrm . + .\penalty 10000 + + [ dek: + well, this made me feel very sick, but I sure am thankful to + Chris for finding it. + $10.24 + ] + +I discovered this while checking that 'webman.tex' generated the same +DVI file (except for date stamp), which is part of my standard paranoia +suite. There were two discrepancies of the above type in the very first +paragraph... but the rest of the document produced no more! + + [ dek: + I think probably the _old_ 3.0 would also produce double kerns + in cases where kern was specified before right boundary character + by font designer [e.g. to kern after f at end of word] + + While studying this I found another mistake in my code from + September. But I think the basic idea was sound, only the + execution was faulty. + + Still I guess I should try another alpha test with "3.14b"? + ] + +Brian & Frank: can you confirm this effect? + +Chris Thompson +Cambridge University Computing Service +JANET: cet1@uk.ac.cam.phx +Internet: cet1@phx.cam.ac.uk + ------- +Date: Mon, 30 SEP 91 15:46:17 BST +Reply-to: Brian {Hamilton Kelly} +From: TEX@rmcs.cranfield.ac.uk +Subject: Re: [message from dek -- tex alpha version 3.14a] + +In message of Sun, 29 Sep 91 +00:56:57 BST, Chris Thompson wrote: + +> Barbara, Brian, Frank, +> +> I have fetched and compiled TeX 3.14a. Unfortunately, change 397 +> seems to have bugs. [ ... ] +> +> and compare the log files for 3.14 and 3.14a. That for 3.14a has an +> extra kern in between the "-ly" and the ".": +> +> .\tenrm e +> .\tenrm l +> .\tenrm y +> .\kern-0.83334 \ This kern has been doubled by the +> .\kern-0.83334 / automatic hyphentaion algorithm. +> .\tenrm . +> .\penalty 10000 +> +> [ ... ] +> +> Brian & Frank: can you confirm this effect? + +I have repeated Chris' experiment, and can confirm that 3.14a does +indeed double the kern. Oh dear... + +The odd thing is that I compared the outputs resulting from running +DVItype on the DVI outputs of my Greek test, and saw only the expected +change from medial sigma to terminal sigma (with relevant horizontal +positioning changes). But I may have missed other horizontal changes +due to this bug: I've thrown the printout away again by now, +unfortunately! + +Brian + +<<< end DEK's alpha test, TeX 3.14a + +************************************************************************ + +>>> TeXbook errata + +Date: Tue, 19 Nov 91 16:05:02 GMT +From: Chris Thompson +Subject: TeXbook p.178 bug report + + Here is another TeXbook bugette report by Robert Hunt. I suppose it is +right in theory, unless it comes under the "deliberate lie" clause. Anyway, +perhaps you would like to have someone else vet it: I am getting to the stage +with Robert's bug reports that I just wish he would shut up! He seems happy +with the latest p.377 fix, by the way. + + ----------------------------------------------------------------------- +REH10 15 Nov 1991 16.49 +Very minor mistake on p.178 of the TeXbook: it claims that using \phantom{...} +in a maths formula always produces the same spacing (vertical and horizontal) +as just {...}; but of course this isn't true as \phantom can't tell whether the +current maths style is cramped or not, so \phantom{U^2} will produce different +vertical spacing in cramped style compared with what {U^2} would produce. I +don't think this is particularly worth worrying about, but it's always annoyed +me that \mathchoice doesn't distinguish between (say) T and T'. + ----------------------------------------------------------------------- + + [ dek: + $2.56 + I'm going to put the apology on page 360 because the truth would + interfere with the exposition on p 178 + ] + +Chris Thompson + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +Date: Tue, 3 Dec 91 15:13:01 MST +From: Nelson H. F. Beebe +Subject: Possible bug in TeXbook, p.270 + +Last night, while studying to TeXbook to better understand TeX's rules +for when spaces are significant, I found what I believe is a small +error in the TeXbook. I checked errata files errata.one .. errata.six +without finding this error already logged. + +The TeXbook, p.270, gives BNF rules for the grammar of dimensions. +>From this grammar, one concludes from the rules (pulled from +texman.tex) + +\is[true]\alt + +\is + \alt + +\is\alt + +\is\alt + +\is|.|$_{12}$\alt|,|$_{12}$ + \alt + \alt + +that "123 truept" is illegal input, since no space may precede the +word true according to the grammar. + +Nevertheless, TeX the program happily accepts such space: + +This is TeX, C Version 3.14 +**\relax + +*\dimen0 = 12345 true pt + + [ dek: + see the \P on p 268 that begins `We shall use a special + convention for keywords'. _true_ is a keyword + ] + +*\showthe\dimen0 +> 12345.0pt. +<*> \showthe\dimen0 + +? + +I believe that TeX the program is correct, and is consistent with its +permitting optional space before non-true dimensions. + +This suggests that the TeXbook should have the rule + +\is + \alt + +changed to + +\is + \alt + +I'm assuming that AB|CDE is to be parsed as (AB)|(CDE) (the +conventional interpretation in BNF grammars), rather than A(B|C)DE; +the latter would not make sense here anyway. + +======================================================================== +Nelson H.F. Beebe +Center for Scientific Computing +Department of Mathematics +220 South Physics Building +University of Utah +Salt Lake City, UT 84112 +USA + Tel: (801) 581-5254 + FAX: (801) 581-4148 + Internet: beebe@math.utah.edu +======================================================================== + +<<< end TeXbook errata + +************************************************************************ + +>>> inconsistent ligature/kerning behavior + +Date: Wed, 25 Sep 91 13:13:55 +0200 +From: Bernd Raichle +Subject: Bug in TeX's ligature builder?! (No, it's documented.) + +In a letter to DEK in November 1989 (i.e., before TeX 3.0; appeared in +TeXhax 90, Issue 5) Frank Mittelbach summarized some requirements of a +new TeX version. For example, he mentioned manipulations of the +"Ligatures and kerning tables" and the need to "Reconsider paragraphs +after page-breaking". Other users had and have similar wishes and +requirements. + +But nobody mentioned a bug, or better --- because this "bug" is +documented in the TeXbook --- the inconsistent and (for the beginner) +mysterious behaviour when TeX builds ligatures and inserts kerning. + +Try the following in plain TeX and look at the output. I have used +the fl-ligature as an example. (TeX's behaviour for kerning between +two characters is exactly the same.) + + ------------------------------ CUT ------------------------------ +\hsize=5cm % linebreak for more than three words +\hyphenation{Au-flage}% for demonstration (correct german is Auf-la-ge) + +Auflage\par % (1) show `fl' ligature +Auf{}lage Auf\relax lage\par % (2) simple way to avoid the ligature + +\pretolerance=10000 % no second pass +Auf{}lage +Auf{}lage Auf{}lage Auf{}lage Auf{}lage\par % (3) no ligatures + +\pretolerance=-1 % force second pass +Auf{}lage % no(!) ligature, because there's no preceding glue +Auf{}lage Auf{}lage Auf{}lage Auf{}lage\par % (4) ligatures + +Auf{}lage % (5) no(!) ligature, there's no preceding glue +Auf\kern0pt lage % no lig, explicit kern +Auf\/lage % no lig, explicit kern +$\rm Auflage$ % example of ligature in math mode +$\rm Auf{}lage$ % no lig, in math mode +\hbox{Auf{}lage} % no lig, in packed hbox +Auf{}lage\vrule width0pt\ % no lig, followed by a rule node +Auf{}lage\kern0ptAuf{}lage % 1st ligature, 2nd no ligature +Auf{}lage\par % ligature +\bye + ------------------------------ CUT ------------------------------ + +Example (1) shows the normal fl ligature, in example (2) I suppress +the ligature with an empty group (see TeXbook, exercise 5.1 and +answer) or a \relax (both are non-character tokens). + +In example (3) I use empty groups to suppress the ligatures. The +same(!) input paragraph in example (4) contains ligatures. The only +and very important difference between (3) and (4) is the value of +\pretolerance. (Note that the first word in (4) has no fl-ligature!) + +Example (5) gives a quick overview of TeX's behaviour, when the same +word (= the same input!) is used in a different context. You can +think of other examples: hbox the word... and unhbox it. Try the same +with the ''-ligature (i.e. compare '' with '{}'), etc. + + +Very short explanation of this behaviour: when TeX is in hmode, +ligatures and kernings are build out of the (current input) token +list. Non-character tokens (like { or \relax) influence ligatures and +kerning. + +When TeX is in math mode or after hyphenation is done in the second +pass of the line_break algorithm, ligatures and kernings are build out +of the node list representing the current paragraph (or math list). +This node list doesn't contain representations for tokens like { or +\relax anymore. Because not all parts of the node list are tried for +hyphenation, not all of the supressed ligatures are reconstituted. + + +TeX has a powerful linebreak algorithm, a powerful hyphenation +capability and powerful ligature and kerning tables. +But the connection between them shows IMHO design bugs, if you want to +use them and expect the same output from the same input. + + [ dek: + This is unfortunate but known and I decided long ago that + the cure would be worse than the disease. + ] + +Comments, etc. ...?? (... are expected!!) + + -bernd + +PS: I have ideas how to make ligatures/kerning more consistent. + But the result, after the necessary changes (in a few places) + are applied, is a "TeX" which fails the Trip-Test. + + __________________________________________________________________________ + Bernd Raichle, Student der Universit"at Stuttgart | "Le langage est source + privat: Stettener Str. 73, D-W-7300 Esslingen | de malentendus" + email: raichle@azu.informatik.uni-stuttgart.de | (A. de Saint-Exupery) + +<<< end inconsistent ligature/kerning behavior + + +######################################################################## + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Character code reference +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Upper case letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ +% Lower case letters: abcdefghijklmnopqrstuvwxyz +% Digits: 0123456789 +% Square, curly, angle braces, parentheses: [] {} <> () +% Backslash, slash, vertical bar: \ / | +% Punctuation: . ? ! , : ; +% Underscore, hyphen, equals sign: _ - = +% Quotes--right left double: ' ` " +%"at", "number" "dollar", "percent", "and": @ # $ % & +% "hat", "star", "plus", "tilde": ^ * + ~ +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +[ end of message 036 ] + diff --git a/info/digests/tex-implementors/037 b/info/digests/tex-implementors/037 new file mode 100644 index 0000000000..f19a3018a3 --- /dev/null +++ b/info/digests/tex-implementors/037 @@ -0,0 +1,716 @@ +Date: 14 March 91 Message No: 037 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: Messages from DEK, part 2 + + +************************************************************************ + +>>> inconsistent expansion of \string, etc.; \newlinechar + + [ dek: + Here he has come across exactly what I think I fixed in the + _other_ change made to 3.14a. I am contacting him directly + about this. + ] + +Date: Mon, 4 Nov 91 10:42:40 +0100 +From: Bernd Raichle +Subject: TeX.web 3.14: Bug Report #1 (+ Fix Proposal): \string, + \special, ... + +Dear Ms. Beeton, + +I have found two bugs in TeX.Web 3.14: +Bug #1: Incorrect "expansion" of unprintable chars for |selector=new_string| +Bug #2: Incorrect handling of \newlinechar + (I'll send a second mail with the report of bug #2.) + + +The first bug looks like an inconsistent behaviour of \string (and +\meaning, \fontname, \jobname, \special) in all TeX versions. + +Example: +1. \catcode`\^^Y=12 \string^^Y +2. \catcode`\^^Y=13 \string^^Y + +TeX 3.14 prints line 1 always as character "19 of the current font. +Line 2 is printed either as char"19 or as three characters ^^Y, +dependent on the TeX implementation! + + +Other examples: +3. If ^^Y has one of the catcodes 1-4, 6-8, 11 or 12 + |\string ^^Y| is printed like |\char"19|. +4. With \escapechar="19, the output of |\string\relax| is + either like |^^Yrelax| or |\char"19 relax|. +5. The same is true for \catcode`\^^Y=11 \string\test^^Ytest +6. \newlinechar=`\^^Y \message{^^Y \string ^^Y} outputs two newlines + only, if ^^Y is a printable character. + (Remark: I have discovered the second bug with a variation of + this example.) +7. The same is true for things like \special{^^Y}. +8. etc. for other characters (e.g. national characters)! + + +An TeX implementor can (and should) change section 21 and 22 +(character set translations) and section 49 (unprintable characters) +to make TeX more user friendly. The predicate in section 49 specifies +if a characters is printable or unprintable. +Example: \ss (= char "19 in CM fonts) should be output as a single +character instead of ^^Y. An implementor will change section 49 to +exclude this character (i.e., to make this character printable). + +[With TeX 3 this is done for more and more characters on more and more +machines with extended character set (especially if the new DC/EC +fonts with national characters are available).] + + +This implementation dependency is no problem (*), if the output is +printed on a terminal or written in a file (log file or output +stream). [(*) see the second bug report for some problems] + +But it can be a problem, if it is "printed" for further `internal' +use (i.e., with |selector:=new_string|). + +Example: + \def\a{\expandafter\b\string} + \def\b#1{{\tt #1}} + +The output (in the dvi file) is implementation dependent, if \a is +called with national characters, control sequence names with national +characters, etc. +The dvi file will also be different, if someone uses \special commands +with national characters. E.g. \special{^^Y} should put one byte +with value "19 into the dvi file, but for most TeX versions the three +characters "^^Y" are written. + +Fix proposal: + +|print| and |slow_print| (\S 59,60) should print a single character +without using |str_pool| if |selector = new_string|. (I.e., the +`expansion' of unprintable characters to ^^X or ^^xx is inhibited.) + + procedure print(s : integer); + label exit; + var j : poolpointer; + begin if s >= str_ptr then s:="???" + else if s < 256 then + if s < 0 then s:="???" ++ else if selector = new_string then ++ begin print_char(s); return ++ end; + else if (s = new_line_char) then + if selector < pseudo then + begin print_ln; return + end; + j:=str_start[s]; + while j < str_start[s+1] do + begin print_char(so(str_pool[j])); incr(j); + end; + exit: end; + +... and the same for |slow_print|. + + +Additional changes: + + |issue_message| (used by \message and \errmessage) calls |print| +and |print_err|. Because the string argument can contain unprintable +character with the fix above, it has to be replaced by |slow_print|. +Additionally the |print_err| call has to be replaced by a call to a +new procedure |slow_print_err|, which calls |slow_print| instead of +|print|. + I don't know, if it's better to print strings like |job_name|, +|log_name|, |font_name()|... with |slow_print| (This could be a third +bug?). If this is true, the string |formatident| has to be printed +with |slow_print|, because it incorporates |job_name|. + All other strings `printed' with |selector:=new_string| are either +made out of internal strings and integers or they are used only +temporary (|special_out|, |ship_out|) or printed with |print_esc| +(|font_id_text()|), so they do not need further changes. + + +Possible problems: + +- Perhaps some macro writers assume the current behaviour of \string et.al. + I.e., they assume that \string expands to a fixed set of "printable" + characters only (e.g. for verbatim text like {\tt \string\foo}), + but this set of printable characters changes if section 49 is changed. +- The behaviour of \message and \errmessage will change: \newlinechar + has an effect to these primitives (the TeXbook describes only the + effect for \write). +- I have made and tested the changes above... and this changed TeX + passes the Trip-Test without problems. Perhaps it would be a good + idea to add checks for \special and \string with arguments containing + unprintable characters to `trip.tex'. + Additionally there should be a short note, that the Trip-Test can + produce a different output, if section 49 is changed. The output + is different if one of the characters ^^@, ..., ^^82, ... is + printable. + + +Yours, + Bernd Raichle + __________________________________________________________________________ + Bernd Raichle, Student der Universit"at Stuttgart | "Le langage est source + home: Stettener Str. 73, D-W-7300 Esslingen, FRG | de malentendus" + email: raichle@azu.informatik.uni-stuttgart.de | (A. de Saint-Exupery) + ------- + +Date: Mon, 4 Nov 91 10:43:42 +0100 +From: Bernd Raichle +Subject: TeX.web 3.14: Bug Report #2 (+ Fix Proposal): \newlinechar + +Dear Ms. Beeton, + +here is the report of the second bug. I have found this bug when +experimenting with examples (to test the behaviour of \message and +\write) and possible fixes for the first bug. + +The second bug deals with \newlinechar and the inconsistent behaviour +of \message and \write when it is set to some "exotic" values. + +Example: + + \catcode`\^^Y=11 \edef\test{\string\t^^Yt} + % (1) + \newlinechar=`\^ + \message{^^Y ^ \string\^^Y ^ \test} + \immediate\write0{^^Y ^ \string\^^Y ^ \test} + % (2) + \newlinechar=`\^^Y \escapechar=`\^^Y + \message{^^Y \string ^^Y \relax} + \immediate\write0{^^Y \string ^^Y \relax} + % (3) + \newlinechar=`\o + + +The output of this example is implementation dependent! The output +differs, if section 49 of TeX.web is changed to make the character ^^Y +printable. + +1. In part (1) of the example, the character ^^Y is printed as two + newlines followed by a `Y' (if ^^Y is unprintable). The same + aplies for all other ^^Y characters, even for ^^Y characters + inside control sequences. +2. The same ^^Y character is printed as character |xchr["19]|, if + section 49 is changed to make it printable. +3. The output of \write and \message in part (2) differs, if ^^Y is + unprintable. \message produces three |^^Y|, \write prints + three newlines. +4. There is no difference between \write and \message in part (1) and + (2), if character ^^Y is made printable. + +(Remark: the TeXbook doesn't mention \newlinechar w.r.t. \message, so +one could assume that changing \newlinechar will not change the output +of \message (and \errmessage).) + + +What behaviour should be correct for |print|, |slow_print|, ... +w.r.t. \newlinechar, if something is printed to a file or the +terminal? + +Here are my wishes: + +1) if one of these functions is called with the current \newlinechar, + it should output a newline. +2) if a tokenlist printed with \write, \message, \errmessage contains + a \newlinechar, it should be printed as a newline. +3) _all_ other characters should never produce a newline character + (even if there are unprintable characters and \newlinechar = `\^ !) +4) control sequence names containing a character equal to the current + \newlinechar should not produce a newline (a user should use \string, + if the newline character in the csname should produce a newline) +5) all fixed strings printed to the log file should never produce a + newline. I think error messages in the log file should be readable + for all values of \newlinechar! I have added part (3) in my example + to show the current (mis-)behaviour. + + + [ dek: + Here we have a disagreement ... + I don't believe it is necessary to support every possible + \newlinechar in an optimum way; here the simpler rule without + exceptions wins + ] + +Fix proposal: + +The changes below needs the changes in |issue_message|, I have +described in my first bug report (replace call of |print| in this +function with |slow_print|, introduce new function |slow_print_err| +and replace |print_err| in |issue_message| with a call of this +funtion). Otherwise \message and \errmessage produce incorrect +output for unprintable characters. + +I have made the following changes to |print_char|, |print| and +|slow_print|: + + (* the old |print_char| procedure: *) + procedure print_the_char ( s : ASCII_code ) + (* special handling of current new_line_char deleted *) + case selector of + ... etc, etc. old code of |print_char|... + end; + + procedure print_char ( s : ASCII_code ) + label exit; + begin if then + if selector < pseudo then + begin print_ln; return; + end; + print_the_char(s); + exit: end; + + procedure print ( s : integer ); + label exit; + var j : poolpointer; + begin if s >= str_ptr then s:="???" + else if s < 256 then + if s < 0 then s:="???" + (* bug fix from bug report #1: *) ++ else if selector = new_string then ++ begin print_the_char(s); return ++ end; + else if (s = new_line_char) then + if selector < pseudo then + begin print_ln; return + end; + j:=str_start[s]; + while j < str_start[s+1] do + (* to fulfill wish #4: *) +! begin print_the_char(so(str_pool[j])); incr(j); + end; + exit: end; + + procedure slow_print ( s : integer ); + label exit; + var j : poolpointer; + begin if s >= str_ptr then s:="???" + else if s < 256 then + (* for wish #3: *) +! begin print(s); return + end; + j:=str_start[s]; + while j < str_start[s+1] do + begin print(so(str_pool[j])); incr(j); + end; + exit: end; + + +I was very astonished that (after I had applied the changes) the +resulted "TeX" passes the Trip-Test! + + +Possible Problems(?): + +- \newlinechar handling is done in \write, \message or \errmessage. + \write uses |token_show| to output the tokenlist and this is done + by calls of |print_char| or |print| with single characters or by + calls of |print_cs|. + \message and \errmessage uses |slow_print| or |slow_err_print|, + which handles newline characters at the `toplevel' of the string. + +- There should be additional changes to satisfy my wish #5 + (I don't know, if it is enough to change the |print_char| calls + in the procedure |show_token_list| to call a |print_char| procedure + with \newlinechar handling. And the calls of |print_char| in all + other places are calls to a |print_char| version without \newlinechar + handling (e.g. the |print_the_char| above).) + + +Yours, + Bernd Raichle + +<<< end inconsistent expansion of \string, etc.; \newlinechar + +************************************************************************ + +>>> \halign + box assignment within displays + +Date: Thu, 21 Nov 91 16:55:55 GMT +From: Chris Thompson +Cc: Robert Hunt +Subject: TeX bug in math alignments (Robert Hunt) + +Barbara, + + I received the following bug report from Robert Hunt + +> Accepted: 12:02:31 21 Nov 91 +> Submitted: 23:36:12 19 Nov 91 +> IPMessageId: A4D2794E8E47F040 +> From: Robert Hunt +> To: cet1 +> Subject: Bug (sigh) in TeX +> +> Here's a bug in TeX: or possibly in the TeXbook, though I'd much +> prefer it to be considered the former! The input +> +> $$\halign{#\cr x\cr}\global\setbox1=\hbox{y}$$ +> +> generates a "Missing $$ inserted" error just before the "y" token. +> (Pressing RETURN then generates an "I can't go on meeting you like +> this" error, and TeX bombs out.) This appears to be because TeX +> objects to having horizontal mode material to process after an +> alignment in displayed maths mode. However, page 291 of the TeXbook +> clearly states that optional may follow the closing +> brace of an \halign in display maths mode, and \setbox certainly +> counts as an ! + +It is definitely a bug in TeX: here's a log file (duplicated on Unix +TeX, by the way) + + --------------------start log file +This is TeX, Phoenix Version 3.14:0.75 (preloaded format=plain 90.7.18) + 21 NOV 1991 14:17 +**sysin +(&TEXR +! Missing $$ inserted. + + y +l.1 $$\halign{#\cr x\cr}\global\setbox1=\hbox{y + }$$ +? h +Displays can use special alignments (like \eqalignno) +only if nothing but the alignment itself is between $$'s. + +? +! I can't go on meeting you like this. + + y +l.1 $$\halign{#\cr x\cr}\global\setbox1=\hbox{y + }$$ +One of your faux pas seems to have wounded me deeply... + [ dek: ^^^^^^^^^^^^^^^^^ how true ] +in fact, I'm barely conscious. Please fix it and try again. + +No pages of output. + --------------------end log file + +The problem is that the state of the world when |do_assignments| in +module 1206 returns can be quite different from when it is called, +in respect of the mode nest and the save stack in particular. It +occurred to me that one should be able to create a simlar effect +with the call in |make_accent| (module 1123), and indeed, one can: + + --------------------start log file +This is TeX, Phoenix Version 3.14:0.75 (preloaded format=plain 90.7.18) + 21 NOV 1991 15:05 +**sysin +(&TEXS +! This can't happen (vpack). + } + +l.1 \accent"7F\global\setbox1=\vbox{\vskip1in} + z +I'm broken. Please show this to someone who can fix can fix + +No pages of output. + --------------------end log file + + [ dek: $327.68 made out to Hunt ] + +Can you add this to Don's input queue, please? + + [ dek: + As Chris undoubtedly knows, this is not at all easy to fix. + I think it would be far too risky trying to allow arbitrary + boxes to be assigned after \halign in display or between \accent + and the accentee ... making _fin_align_ and _accent_ recursive + would open up a huge can of worms and would make \afterassignment + even murkier than it is now. Therefore I am modifying the + TeXbook to disallow such things [which nobody has ever used + because they never have worked] and modifying TeX to detect + this prohibited activity + ] + +Chris Thompson +Cambridge University Computing Service +JANET: cet1@uk.ac.cam.phx +Internet: cet1@phx.cam.ac.uk + +<<< end \halign + box assignment within displays + +************************************************************************ + +>>> positive/negative xn_over_d, tex.web section 107 + +Date: Thu, 21 Nov 91 18:38:51 GMT +From: CET1@phoenix.cambridge.ac.uk +Cc: Wayne Sullivan +Subject: Wayne Sullivan's new TeX bug + +Barbara, + + Here is the promised bug report from Wayne Sullivan. I don't think +I have anything useful to add to the messages below. I can produce +backtraces very like Wayne's. The calls can come from |math_kern| as +well as from |math_glue|. + +> Accepted: 16:47:07 15 Nov 91 +> Submitted: 14:42:13 15 Nov 91 +> From: "Wayne G. Sullivan" +> To: Chris Thompson +> Subject: possible bug in TeX + +In TeX WEB section 107, Knuth claims that for use of the procedure xn_over_d, +n and d are always nonnegative. Whether the actual code makes use of this +in section 107, I am not sure. However, some implementations utilize the +assumed positivity in optimizing this section. In sections 716 and 717 +xn_over_d is used in context with cur_mu. Though one would expect cur_mu +to be nonnegative, I see no place where this is assured: I think one could +simply change the corresponding font parameter to a negative value. + + Wayne Sullivan + + [ dek: + $327.68 + \S716-7 + ] + +> Submitted: 17:18:39 15 Nov 91 +> IPMessageId: A4CD1EF77B402240 +> From: Chris Thompson +> To: "Wayne G. Sullivan" +> Subject: Re: [possible bug in TeX] + +I think you are right. |cur_mu| is set in section 703 and there is +no reason why it has to be positive. Hence |f| in both sections 716 +and 717 can be negative (as |x_over_n| gives a negative remainder +when x and n have opposite signs). |xn_over_d| is *not* robust against +negative n, quite apart from the promises in sections 107 and 99, +because it causes u to be negative, and so (a) you can't assume +u=d*(u div d)+(u mod d) in ANSI Pascal any longer, & (b) the test +for (u div d) being too large would need to be supplemented by one +for it being too small. + +I would like to construct a hard example of obvious bad results +before passing this to Barbara & Don, though. + +Chris Thompson + +> Accepted: 14:57:26 18 Nov 91 +> Submitted: 09:55:30 18 Nov 91 +> From: "Wayne G. Sullivan" +> To: Chris Thompson +> Subject: xn_over_d + +I grabbed the pascal code for xn_over_d out of my change file to compare +the result with an optimized version. On tangling I discovered that the +intermediate values t,u,v are declared as nonnegative_integer. Hence a +range checking compiler will choke on a negative cur_mu: Can DEK escape +from that? + +> Accepted: 15:38:21 18 Nov 91 +> Submitted: 09:32:41 18 Nov 91 +> From: "Wayne G. Sullivan" +> To: Chris Thompson +> Subject: xn_over_d + +The use of xn_over_d with the possibly negative cur_mu only affects the +the lower precision term in a `split' precision calculation so that +the problem of overflow arises only if the input values are beyond the +allowed values, i.e., with valid input values no overflow arises. Thus +the algorithm will give the correct answer even though cur_mu is negative. +However, this does depend on the div procedure satisfying negation symmetry: +(-n) div d =-(n div d) when n,d>0. At any rate the documentation needs to +be corrected so that optimized versions of the code will also give the +correct result. + +> Accepted: 17:40:28 18 Nov 91 +> Submitted: 11:05:39 18 Nov 91 +> From: "Wayne G. Sullivan" +> To: Chris Thompson +> Subject: xnod + +Here is an example of the xn_over_d problem. Sorry about the antique version +of TeX currently on our VM/CMS: I use it only to illustrate the problem. + The TeX file: +\showboxdepth100 +\showboxbreadth100 +\scrollmode +\showthe\fontdimen6 \tensy +\fontdimen6 \tensy=-10pt +\showthe\fontdimen6 \tensy +$$a\;a$$ +\showlists +\end + + The LOG file (errors were reported on the terminal). Look for negative glue. + +This is TeX, VM/CMS Version 2.1 (preloaded format=PLAIN 87.5.19) 18 NOV 1991 11 +**xnod +(xnod.tex.* +> 10.00002pt. +l.4 \showthe\fontdimen6 \tensy + + +> -10.0pt. +l.6 \showthe\fontdimen6 \tensy + + + +### horizontal mode entered at line 7 +spacefactor 1000 +### vertical mode entered at line 0 +### current page: +\glue(\topskip) 10.0 +\hbox(0.0+0.0)x469.75499, glue set 449.75488fil +.\hbox(0.0+0.0)x20.0 +.\penalty 10000 +.\glue(\parfillskip) 0.0 plus 1.0fil +.\glue(\rightskip) 0.0 +\penalty 10000 +\glue(\abovedisplayshortskip) 0.0 plus 3.0 +\glue(\baselineskip) 7.69446 +\hbox(4.30554+0.0)x7.79407, shifted 230.98047 +.\teni a +.\glue -2.77771 plus -2.77771 +.\teni a +\penalty 0 +\glue(\belowdisplayshortskip) 7.0 plus 3.0 minus 4.0 +total height 29.0 plus 6.0 minus 4.0 + goal height 643.20255 +prevdepth 0.0, prevgraf 4 lines + +! OK. +l.8 \showlists + + +[1] +Output written on xnod.dvi (1 page, 264 bytes). + +> Submitted: 17:48:09 18 Nov 91 +> IPMessageId: A4D0EAFE6C983690 +> From: Chris Thompson +> To: "Wayne G. Sullivan" +> Subject: Re: [xnod] + +Wayne, + + Thanks for the messages. There is no doubt that there is a bug: the +declaration of t,u,v as |nonnegative_integer|, which I had missed, makes +it definite. I have traced through |xn_over_d| using a debugger, and +found it storing negative values, as expected. + + I'll put all this together and send it off to Barbara Beeton, if you +are agreeable. + +Chris Thompson + +> Accepted: 12:02:21 21 Nov 91 +> Submitted: 09:54:31 19 Nov 91 +> From: "Wayne G. Sullivan" +> To: Chris Thompson +> Subject: xn_over_d + +Thanks in advance for passing the problem on to BNB/DEK. Enclosed below +are screen messages which appear when xnod.tex is processed on our ancient +VM/CMS version of TeX. Other things happen with the PC version I use, but +that uses an assembly language equivalent of the old xn_over_d which will +have to be upgraded to whatever Knuth decides to the procedure. It is unlikely +that he will employ the obvious modification. + [ dek: ^^^^^^^^^^^^^^^^^^^^ which is? ] + +Ready; T=0.05/0.11 09:49:43 +tex xnod +This is TeX, VM/CMS Version 2.1 (no format preloaded) +** +(xnod.tex.* +> 10.00002pt. +l.4 \showthe\fontdimen6 \tensy + +> -10.0pt. +l.6 \showthe\fontdimen6 \tensy + + + AMPX031E Low bound checking error + TRACE BACK OF CALLED ROUTINES + ROUTINE STMT AT ADDRESS IN MODULE + XNOVERD 6 024014 TEX + MATHGLUE 4 03E1B8 TEX + MLISTTOHLIST 73 041F54 TEX + AFTERMATH 68 052EBE TEX + MAINCONTROL 128 058098 TEX + 110 05B86C TEX + PASCAL/VS 05BDAE + + + AMPX031E Low bound checking error + TRACE BACK OF CALLED ROUTINES + ROUTINE STMT AT ADDRESS IN MODULE + XNOVERD 10 024074 TEX + MATHGLUE 4 03E1B8 TEX + MLISTTOHLIST 73 041F54 TEX + AFTERMATH 68 052EBE TEX + MAINCONTROL 128 058098 TEX + 110 05B86C TEX + PASCAL/VS 05BDAE + + + AMPX031E Low bound checking error + TRACE BACK OF CALLED ROUTINES + ROUTINE STMT AT ADDRESS IN MODULE + XNOVERD 6 024014 TEX + MATHGLUE 7 03E236 TEX + MLISTTOHLIST 73 041F54 TEX + AFTERMATH 68 052EBE TEX + MAINCONTROL 128 058098 TEX + 110 05B86C TEX + PASCAL/VS 05BDAE + + + AMPX031E Low bound checking error + TRACE BACK OF CALLED ROUTINES + ROUTINE STMT AT ADDRESS IN MODULE + XNOVERD 10 024074 TEX + MATHGLUE 7 03E236 TEX + MLISTTOHLIST 73 041F54 TEX + AFTERMATH 68 052EBE TEX + MAINCONTROL 128 058098 TEX + 110 05B86C TEX + PASCAL/VS 05BDAE + +! OK (see the transcript file). +l.8 \showlists + +[1] +(see the transcript file for additional information) +Output written on xnod.dvi (1 page, 264 bytes). +Transcript written on xnod.texlog. + + ----- End of Included messages ----- + +Chris Thompson +JANET: cet1@uk.ac.cam.phx +Internet: cet1@phx.cam.ac.uk + +<<< end positive/negative xn_over_d, tex.web section 107 + + +######################################################################## + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Character code reference +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Upper case letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ +% Lower case letters: abcdefghijklmnopqrstuvwxyz +% Digits: 0123456789 +% Square, curly, angle braces, parentheses: [] {} <> () +% Backslash, slash, vertical bar: \ / | +% Punctuation: . ? ! , : ; +% Underscore, hyphen, equals sign: _ - = +% Quotes--right left double: ' ` " +%"at", "number" "dollar", "percent", "and": @ # $ % & +% "hat", "star", "plus", "tilde": ^ * + ~ +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +[ end of message 037 ] + diff --git a/info/digests/tex-implementors/038 b/info/digests/tex-implementors/038 new file mode 100644 index 0000000000..1a72ea20b1 --- /dev/null +++ b/info/digests/tex-implementors/038 @@ -0,0 +1,712 @@ +Date: 14 March 91 Message No: 038 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: Messages from DEK, part 3 + + +************************************************************************ + +>>> DRF's "remaining comments" + +Date: Fri, 3 Jan 92 17:23:42 PST +From: drf@frame.com (David Fuchs) +Subject: Re: flash!!! notice that tex update is about to happen + +My remaining comments: + +============================================================================ + +Plain.tex never sets emergencystretch. + + [ dek: + True; it doesn't set \tolerance real high either. Changing that + would affect huge no of existing documents, not to mention + STORY.TEX in Chapter 6 + ] + +============================================================================ + +Change "twice" to "thrice" here: + + [ dek: \check $2.56 ] + + @ The `\ignorespaces|loop|\unskip' in the following code is performed at most + twice per call of |line_break|, since it is actually a pass over the + entire paragraph. + + @= + +============================================================================ + +The last line makes a lie out of "two"; and there's a little misinformation +about the absoluteness of the second pass, which may not happen at all(?): + + Two passes might be made through the paragraph in an attempt to find at +[^^^ Several dek: $2.56 ] + least one set of feasible breakpoints. On the first pass, we have + |threshold=pretolerance| and |second_pass=final_pass=false|. + If this pass fails to find a + feasible solution, |threshold| is set to |tolerance|, |second_pass| is set + |true|, and an attempt is made to hyphenate as many words as possible. + If that fails too, we add |emergency_stretch| to the background + stretchability and set |final_pass=true|. + +<<< end DRF's "remaining comments" + +************************************************************************ + +>>> suggestion -- additional tracing facilities for \if* + + [ dek: + Barbara -- such suggestions are out of order and need not be + sent to me in future -- just a waste of your time and mine + ] + +Date: Thu, 21 Nov 91 11:47:12 +0100 +From: Bernd Raichle +Subject: Proposal for an enhancement of TeX's \tracingcommands + +Dear Ms. Beeton, + +I have the following proposal for a TeX enhancement; the idea is +initiated by an article in TUGboat. Perhaps it's worth (and small +enough) to get incorporated in the next version of TeX? + + [ dek: + NEVER -- WILL PEOPLE PLEASE LEAVE ME ALONE. + YIPES, I HAVE SAID IT ENOUGH, NOBODY LISTENS. + I'M THROUGH! + ALL SYSTEMS CAN BE IMPROVED _ENDLESSLY_ BUT IMPROVEMENTS + EVENTUALLY HAVE A NEGATIVE EFFECT + ] + +In TUGboat vol.12, no.2, p.238ff, David Salomon wrote a tutorial about +"The \if, \ifx and \ifcat Comparisons". At the end of the article he +suggested an enhancement of TeX's tracing facilities to show the +result (current feature) and the two comparands (new feature) of these +comparisons. (He suggested a new control sequence \tracingcomparands +to toggle the additional log output, but I think that it's better to +use \tracingcommands with a value >= 3.) + +I have made the following changes to TeX 3.14 to print additional +lines containing the comparands: + +For \if and \ifcat change \S 506: + + begin + ... + get_x_token_or_active_char; + if (cur_cmd > active_char) or (cur_chr > 256) then + begin cur_cmd := relax; cur_chr := 256; + end; +(* begin of new part *) + if tracing_commands > 2 then + begin begin_diagnostic; print_char("{"); + if this_if = if_char_code then print("if") else print("ifcat"); + print_char(" "); print_cmd_chr(m, n); print(" ("); + if this_if = if_char_code then print_int(n) else print_int(m); + print(") = "); print_cmd_chr(cur_cmd, cur_chr); print(" ("); + if this_if = if_char_code then print_int(cur_chr) else print_int(cur_cmd); + print(")}"); end_diagnostic(false); + end; +(* end of new part *) + if this_if = if_char_code then b := (n = cur_chr) else b := (m = cur_cmd); + end + + [ dek: + I appreciate a student's enthusiasm but wish it were channeled + into new directions ... + How about a really integrated system for Literate Programming, + for example ... + or how about a well documented replacement for UNIX? + ] + +For \ifx change \S 507: + + begin + ... + q := cur_chr; get_next; +(* begin of new part *) + if tracing_commands > 2 then + begin begin_diagnostic; print_char("{"); + print("ifx"); print_char(" "); print_cmd_chr(p, q); + if p >= call then + begin if n <> 0 then + begin print_char(" "); sprint_cs(n); + end; + if q <> 0 then + begin print_char(":"); + show_token_list(link(q), 0, 32); + print_char("."); + end; + end; + print_ln; print(" = "); print_cmd_chr(cur_cmd, cur_chr); + if cur_cmd >= call then + begin if cur_cs <> 0 then + begin print_char(" "); sprint_cs(cur_cs); + end; + if cur_chr <> 0 then + begin print_char(":"); + show_token_list(link(cur_chr), 0, 32); + print_char("."); + end; + end; + print_char("}"); end_diagnostic(false); + end; +(* end of new part *) + if cur_cmd <> p then b := false + else if cur_cmd < call then b := (cur_chr = q ) + ... + end + + +The changed "TeX" passes the TRIP test because TRIP sets +\tracingcommands to 0, 1 or 2 only. There is no test for other +values. + [ dek: + So what? Anybody can enhance their private version but they + can't put it on a public system and call it TeX if it has any + extensions. + ] +Is this a forgotten topic in TRIP? Is the "TeX" with the changes +above still a TeX? Is it allowed to make further tracing enhancement + [ dek: + I do believe however, that some kind of `system call' is a + permissible implementation option if it is handled entirely + via \read and \write to specific special files ... + That is as far as I believe extensions are tolerable. + ] +which affects the log output only and to call the result TeX? + + [ dek: + Obviously TRIP cannot possibly check for all possible extensions, + all of which are impermissible + ] + +Yours, + -bernd + __________________________________________________________________________ + Bernd Raichle, Student der Universit"at Stuttgart | "Le langage est source + home: Stettener Str. 73, D-W-7300 Esslingen, FRG | de malentendus" + email: raichle@azu.informatik.uni-stuttgart.de | (A. de Saint-Exupery) + +<<< end suggestion -- additional tracing facilities for \if* + +************************************************************************ + +>>> DEK's "local" change files, not at labrea + +extract from dek's bug responses dated 26 Sep 91: + My favored conventions on implementation questions in general + are expressed by the change files I have contributed to the + distribution [under `local' directory] ... +it seems that your change files haven't been updated at labrea recently; +i'm hoping that the local mod referred to in this interchange really is +something you've done for yourself, and an update to labrea will solve +the problem. + ------- +Date: Thu, 17 Oct 91 01:55 PDT +From: barry@reed.edu (Barry Smith) + +Barbara, perhaps you can help me easily? I'm looking for an optional +change/patch to TeX by Knuth, around version 2.94; it changed the +handling of end-of-file to normal termination, for UNIX[-like] systems. +Doug and I poked around labrea, getting sticky with tar; I'm no +FTP expert, and couldn't locate the appropriate file or changes. + +Any ideas? + +Barry Smith, Blue Sky Research +barry@reed.edu + ------- +(reply, 17 Oct 91) +hi, barry. +i have to admit, i don't remember that one; of course, here at ams, +we weren't really interested in the unix mods until earlier this year. +but i'd guess that karl berry (karl@cs.umb.edu, the web2c guru), might + [ dek: ^^^^^ + Note: I do _not_ use web2c, I use the pascal compiler on Sun + ] +remember it. worth a try, anyhow. +if this fails, i can dig around in my own archives to see what might +be there, but i don't promise much. what i've kept is the canonical +changes (tex82.bug, etc.) and items from knuth in answer to questions +i forwarded. since he still had a net connection at the time of 2.94 +(at least i think he still did), if a question came from another source +i might well not have any record. i figure it'll take at least half a +day to do the necessary exploring, so you understand why i'm suggesting +that you check first with karl. even if he doesn't have knuth's code, +it's quite likely that he will be able to come up with something on his +own pretty quickly. +let me know what happens. and good luck. + -- bb + ------- +Date: Sat, 30 Nov 91 15:36 PST +From: barry@reed.edu (Barry Smith) + +Barbara, can I ask you to take a longer look (for that Knuth patch to +TeX to make end-of-file a normal exit\end)? Neither Karl Berry nor +Pierre MacKay can find it, and the .local directories on labrea seem to +be confused... (that's where I'd expect to really find what I'm looking +for, in a Knuth change file for UNIX; but I find no trace of Knuth change +files on labrea even though he explicitly referred to such in his most +recent missive via yourself.) + +Anyway, if it's at all easy to "grep" or equivalent on everything you've +received from Don for, say, 'UNIX' or ('end' and 'file'), I'd appreciate +the work. I'm beginning to doubt that I ever saw it... + +barry@reed.edu +Barry Smith +------- +(reply, 10 Dec 91) +barry, +sorry to take so long to reply, but i've been out of town (again!). +although knuth did say he intended that the .local directories on +labrea would hold his examples, i can't find any evidence of them +having been updated with this material. i'll try to get in touch +with the person who was last doing the updating, to see what he +might know. + +as for having the patch for end-of-file here in my collection of +stuff, i can't find it, so i suspect it wasn't among anything he's +sent me. (i'm a pretty thorough pack rat, and if i ever got it, +i'm sure i didn't get rid of it. on the other hand, since we've +only recently started to use a unix implementation of tex, that's +not something i would have sought out.) it's vaguely possible +that it might have been posted on texhax, and i didn't check there. + +i'll forward your inquiry to don, but am not sure when he'll be +answering mail again; i'd been led to believe that he wouldn't +be back in gear until january. +sigh. -- bb + + [ dek: + I no longer remember exactly what Barry asked that I was + answering on 26 Sep; but I did check the sources at labrea + and found everything on the directory ~ftp/pub/tex/local + (and its subdirectories) + ] + +<<< end DEK's "local" change files, not at labrea + +************************************************************************ +------- +Date: Sun 5 Jan 92 21:41:55-EST +From: bbeeton +To: winkler@cs.stanford.edu +Subject: bug reports, part 2 of 2 + +>>> glue_ratio overflow + +[ this is a discussion from the tex-implementors discussion list ] + ------- +Date: Mon, 23 Dec 91 13:23:32 +0100 +From: Eberhard Mattes +To: tex-implementors@math.ams.com +Subject: overflow when converting real -> integer (scaled) + +% This TeX input causes an overflow in the following line of |vlist_out|: +% +% rule_ht:=rule_ht+round(float(glue_set(this_box))*stretch(g)); +% +% The |round| Pascal function usually prints an error message and aborts +% if the |real| value cannot be converted to an |integer| (as in this case). +% +% What should a decent TeX implementation do? +% +% Does TeX need a special |round| implementation which uses some $x$ or +% $-x$ (depending on the sign of the argument) on overflow, where both $x$ +% and $-x$ are |integer| values (|maxint|, for instance)? But that `solution' +% would break other combinations of values. Is there any real solution? +% +% DEK writes in glue.web: +% +% surely we need not bother trying to accommodate such anomalous +% combinations of values. +% +% but there are real-life texts, where this happens, see below. LaTeX uses +% +% \vskip 0pt plus .0001fil +% +% in \raggedbottom! (Maybe that can be changed.) +% +% The behavior of TeX is machine/implementation-dependent for this file, +% maybe @^Overflow in arithmetic@> should be added to tex.web for that line +% and similar lines. +% + +\shipout + \vbox to 100pt{% + \vskip0pt plus 1fil + \vskip0pt plus -1fil + \vskip0pt plus 0.00001fil + } +\end + + +% +% Here's a short LaTeX/REVTEX input file which shows the problem (the +% problem is not due to the almost empty tabular environment!): +% + +\documentstyle[revtex]{aps} +\begin{document} +\begin{table} +\begin{tabular}{rr} +\\ +\end{tabular} +\end{table} +\pagebreak +\end{document} + +% +% Yours, +% Eberhard Mattes (mattes@azu.informatik.uni-stuttgart.de) +% + ------- +Date: Mon, 23 Dec 91 10:35:26 EST + [ dek: Merry Christmas ] +From: jjs@arbortext.com +To: mattes@azu.informatik.uni-stuttgart.de, +Subject: Re: overflow when converting real -> integer (scaled) + +Greeting, + + We ran into this quite a while back as well at ArborText. I reported the +problem to Knuth, whose response basically was: "Why would you ever want +to do that? That's really not a bug in tex.web, it's in implementation +restriction that you're more than welcome to fix up in your change files." + + Turns out we had quite a few legimate reasons to want to do that as well... + + The only "correct" way to solve this would be to use 8-byte long arithmetic +for these computations. + [ dek: + Well then you would exceed dvi limitations ... and if you patch + that you will break the drivers. + ] + Short of that, we did the following. Note that the +problem shows up in both |hlist_out| and |vlist_out|. + +@x Module 625 +@ @= +begin g:=glue_ptr(p); rule_wd:=width(g); +if g_sign<>normal then + begin if g_sign=stretching then + begin if stretch_order(g)=g_order then + rule_wd:=rule_wd+round(float(glue_set(this_box))*stretch(g)); +@^real multiplication@> + end + else begin if shrink_order(g)=g_order then + rule_wd:=rule_wd-round(float(glue_set(this_box))*shrink(g)); + end; + end; +if subtype(p)>=a_leaders then + @; +goto move_past; +end +@y4 +@ For Pub\TeX, we add some logic to the step where the glue set is multiplied +by the stretch/shrink. The product can be greater than |max_int| in +certain situations. To prevent an integer overflow on the subsequent +|round| operation, truncate large products to |max_allowed_glue|. + +The rationale for picking the value of |max_allowed_glue| was simply to +use a very large number approaching |maxdimen|. There is the potential +that this truncation may result in incorrect results, but our experience +has shown that with glue values this large the truncation makes little +difference and is much preferable to simply letting an integer +overflow exception happen. + [ dek: + ( I agree ) + ] + +@d max_allowed_glue==float_constant(100000000) + [ dek: + about 21 inches ... fine, + but 200 000 000 should be OK too [and slightly better] + ] + +@= +begin g:=glue_ptr(p); rule_wd:=width(g); +if g_sign<>normal then + begin if g_sign=stretching then + begin if stretch_order(g)=g_order then + begin + g_temp:=float(glue_set(this_box))*stretch(g); +@^real multiplication@> + if abs(g_temp)>max_allowed_glue then + begin + if g_temp > float_constant(0) then g_temp:=max_allowed_glue + else g_temp:=-max_allowed_glue; + end; + rule_wd:=rule_wd+round(g_temp); + end; + end + else begin if shrink_order(g)=g_order then + begin + g_temp:=float(glue_set(this_box))*shrink(g); +@^real multiplication@> + if abs(g_temp)>max_allowed_glue then + begin + if g_temp > float_constant(0) then g_temp:=max_allowed_glue + else g_temp:=-max_allowed_glue; + end; + rule_wd:=rule_wd-round(g_temp); + end; + end; + end; +if subtype(p)>=a_leaders then + @; +goto move_past; +end +@z + +@x Module 629 +@!g_order: glue_ord; {applicable order of infinity for glue} +@!g_sign: normal..shrinking; {selects type of glue} +@y4 +@!g_order: glue_ord; {applicable order of infinity for glue} +@!g_sign: normal..shrinking; {selects type of glue} +@!g_temp: real; {used while stretching/shrinking glue} +@z + +@x Module 634 +@ @= +begin g:=glue_ptr(p); rule_ht:=width(g); +if g_sign<>normal then + begin if g_sign=stretching then + begin if stretch_order(g)=g_order then + rule_ht:=rule_ht+round(float(glue_set(this_box))*stretch(g)); +@^real multiplication@> + end + else begin if shrink_order(g)=g_order then + rule_ht:=rule_ht-round(float(glue_set(this_box))*shrink(g)); + end; + end; +if subtype(p)>=a_leaders then + @; +goto move_past; +end +@y4 +@ See the comments in |hlist_out| for an explanation of the +Pub\TeX\ related changes made to the way the floating point multiplication +is done in this module. + +@= +begin g:=glue_ptr(p); rule_ht:=width(g); +if g_sign<>normal then + begin if g_sign=stretching then + begin if stretch_order(g)=g_order then + begin + g_temp:=float(glue_set(this_box))*stretch(g); +@^real multiplication@> + if abs(g_temp)>max_allowed_glue then + begin + if g_temp > float_constant(0) then g_temp:=max_allowed_glue + else g_temp:=-max_allowed_glue; + end; + rule_ht:=rule_ht+round(g_temp); + end; + end + else begin if shrink_order(g)=g_order then + begin + g_temp:=float(glue_set(this_box))*shrink(g); +@^real multiplication@> + if abs(g_temp)>max_allowed_glue then + begin + if g_temp > float_constant(0) then g_temp:=max_allowed_glue + else g_temp:=-max_allowed_glue; + end; + rule_ht:=rule_ht-round(g_temp); + end; + end; + end; +if subtype(p)>=a_leaders then + @; +goto move_past; +end +@z + + + Jim Sterken + ArborText, Inc. + +============================================================ + + [ repeat of message from Eberhard Mattes ] + ------- +Date: Sun, 29 DEC 91 23:22:49 GMT +From: CA_ROWLEY@vax.acs.open.ac.uk +Subject: RE: overflow when converting real -> integer (scaled) + +A few observations on this problem. + +1. Despite the use of: + +\vskip 0pt plus 0.0001fil + [ dek: + by the way I believe .001fil or even .01fil will be + sufficiently undetectable to be acceptable in LaTeX + ] + +*pure* LaTeX will not produce this problem (unless the actual +page-size and, hence, the size of some glue really gets too big). + +However, the example below shows that the run-time error can be +produced by the use of \filbreak, a command that is not documented in +LaTeX but is nevertheless available (and useful). + +It (\filbreak) has been in frequent use within our LaTeX-based system +for about 5 years now, and has only produced this run-time error when +running test documents: ie it is not, in practice, a problem. + +Here is the type of LaTeX+\filbreak document which does produce it. + +\documentstyle{article} +\raggedbottom +\begin{document} +Small amount of text. +\filbreak +Small amount of text. +\par +\pagebreak +Next page +\end{document} + +[I have not yet looked at the REVTEX styles to see why they produce +it, as documented by Eberhardt.] + +2. Although the Arbortext idea will work for Eberhardt's example: + +> \shipout +> \vbox to 100pt{% +> \vskip 0pt plus 1fil +> \vskip 0pt plus -1fil +> \vskip 0pt plus 0.00001fil +> } +> \end + +it will produce completely incorrect layout for this, similar, example: + +\shipout + \vbox to 100pt{% + \vskip 0pt plus 0.00001fil + \hbox{Text.} + \vskip 0pt plus 1.00001fil + \vskip 0pt plus -1fil} +\end + [ dek: + actually I think this will come out fine but other (similar) + examples will break + ] + +This is not intended to imply that their solution is not good enough: +it will certainly be OK for all the code in use which I know of (the +above example was constructed, in the true spirit of numerical +analysis, explicitly to break their solution!). + +What it does illustrate is that certain pieces of TeX code lead to +such inherently ill-conditioned calculations; thus nothing short of + [ dek: ^^^^^^^^^^^^ + but only in places where the user (=style designer) will + understand her error + ] +higher precision arithmetic will solve the problem in general. + +3. What is needed in the TeX code is something such as Arbortext's +solution PLUS something which writes in the LOG file to record where the +value was changed and the fact that the spacing may therefore be +incorrect. This would be better than implementation-dependent code + [ dek: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + sure + ] +but could be open to the criticism that it does not allow an + [ dek: ^^^^^^^^^^^^^^ + ? why doesn't it allow higher precision? + ] +implementation to use higher precision arithmetic as its solution. + +4. What is needed elsewhere is education of TeX programmers which: + +A. Describes why certain types of TeX code are dangerous in that they +can lead to such calculations. + +B. Explains what the TeX program does about the problem and what +affects this can have (eg how it can give incorrect layout). + +C. For known dangerous uses of such code, shows how to change the +TeX coding so that it still does what is needed whilst avoiding the +problems. + +4. To implement 3C, we need to know what sort of code is in use which +either has, or may one day, produce this error (I wonder how many +times it has been seen and not reported?). For example, what are +Arbortext's uses? + [ dek: + yes + ] + +chris + ------- +Date: Fri, 03 Jan 92 09:46:25 GMT +From: "Wayne G. Sullivan" + +Subject: glue ratio overflow + +Glue ratio overflow can never occur with nonnegative glue entries provided +that individual terms and their sums do not exceed TeX max dimen value +(the `minus' in glue specifications refers to shrink, not negation). + +Negative glue values are `tricks', but there are important applications. +When negative values are used, overflow is possible at any fill level, +including `normal'. In practical cases overflow will not occur unless +the total is nearly, but not equal, zero, and relatively large glue +entries occur. No range or accuracy of floating point arithmetic can +overcome glue ratio overflow without changing the basics of TeX +arithmetic. + +A glue value of the form \vskip 10pt plus 0.0001 fil will cause problems +only when there the additional trick of the form +\vskip 0pt plus 1 fil \penalty -500 \vskip 0pt plus -1 fil +is used. Since TeX does have 3 levels of infinity for fil, is it wise to +use 0.0001 fil? The basic LaTeX files never use filll, if a skip less than +1 fil is necessary, perhaps it would have been better to have used fill and +filll instead of fil and fill in the basic files. + +To avoid glue ratio overflow one need only insure that the use of teeny +fil's does not occur with plus 1 fil and plus -1 fil, or better, make +these tricks at a different fil level. + +<<< end glue_ratio overflow + + +######################################################################## + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Character code reference +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Upper case letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ +% Lower case letters: abcdefghijklmnopqrstuvwxyz +% Digits: 0123456789 +% Square, curly, angle braces, parentheses: [] {} <> () +% Backslash, slash, vertical bar: \ / | +% Punctuation: . ? ! , : ; +% Underscore, hyphen, equals sign: _ - = +% Quotes--right left double: ' ` " +%"at", "number" "dollar", "percent", "and": @ # $ % & +% "hat", "star", "plus", "tilde": ^ * + ~ +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +[ end of message 038 ] + diff --git a/info/digests/tex-implementors/039 b/info/digests/tex-implementors/039 new file mode 100644 index 0000000000..8dd5efb829 --- /dev/null +++ b/info/digests/tex-implementors/039 @@ -0,0 +1,684 @@ +Date: 14 March 91 Message No: 039 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: Messages from DEK, part 4 + + +************************************************************************ + +>>> \TeX logo; some problems with \loop + +i accidentally misfiled this with another problem that had already +been solved; it should have been sent to you months ago. + ------- +Date: Mon 24 Jun 91 14:39:46-EST +From: Michael Downes +Subject: \TeX + +% These %'s are so that you can move this file out of mail +% and \TeX{} it as is to run the tests given below. +% +% What version of plain.tex were you using when you checked the +% spacefactor after \TeX? The one running on the TeXserver is +% presumably quite recent since the version of TeX is 3.1, from +% the standard Unix distribution. The following test demonstrates +% that the spacefactor after \TeX{} has to be manually adjusted +% to get proper spacing when punctuation follows (if \nonfrenchspacing +% is in effect). This can be corrected so easily by adding +% \spacefactor\@m at the end of \TeX's definition that I +% don't know why it hasn't been done already. Perhaps there's +% some reason not to do so that Knuth can explain. + [ dek: + That would have been better but I think it's too late now to + make such a change + ] + +% The space after the first period differs from the space after +% the second period, as demonstrated by the \showlists command. +\tracingonline=1 \showboxbreadth=\maxdimen +\TeX{}. Next. Third.\showlists + +% If Knuth changes plain.tex to fix \multispan perhaps he'll be +% willing to consider another obvious improvement: +% +% Redefine \loop, as described in TUGboat vol 8 no 2 July 1987 +% by Alois Kabelschacht. +% +% This allows an \else branch on the repeat condition to be used, +% which seems rather important in light of the fact that TeX \ifnum +% and \ifdim tests only allow <, =, and > comparisons, with no +% "not" operator or <= or >= combinations. Knuth might be unwilling +% to do this, however, since it would require corresponding changes +% in the TeXbook in the description of plain.tex; and it might be + [ dek: + All the macros in Plain TeX are merely simple examples that can + be improved ad infinitum ... I cannot keep doing it + ] +% only 99.8% backward compatible. [However, no existing TeX file +% will fail to run under the following redefinition unless it +% refers to the internal pieces of \loop (\body and \next), and +% perhaps the most likely reason someone might have done so would +% be to compensate for the lack of an \else possibility!!] + +\def\loop#1\repeat{\def\iterate{#1\expandafter\iterate\fi}% + \iterate \let\iterate\relax} + +% The following example illustrates an \else condition in +% the internal loop. It takes an even number and keeps +% dividing it until the result is odd. Try a large +% power of 2, e.g., 65536. +\newcount\n +\newlinechar=`\& +\loop +\message{&Enter a large even number (RETURN to stop): }% +\read-1 to\answer \n=0\answer\relax + [ dek: ^^^^^^ + wow, a trick I didn't know + ] +\ifnum\n>0 +% Braces to localize \iterate +{\loop +\divide \n by 2 +\message{&N divided by 2 = \number\n}% +\ifodd\n +\else\repeat}% +\repeat + +\bye + ------- +comment by bb: +i thought the definition of \TeX had been changed, because the +following definition accompanied DEK's article of October '90 +on "The future of TeX and METAFONT": + \def\TeX{T\hbox{\hskip-.1667em\lower.424ex\hbox{E}\hskip-.125em X}} +i'm pretty sure if that had been my addition, i would have marked it as +such, or would have made the change at a more general level. but i +could very well be misremembering. + ------- + +Date: Fri, 3 JAN 92 22:14:36 GMT +Originally-from: TEX "Brian {Hamilton Kelly} " +From: TEX@rmcs.cranfield.ac.uk +Subject: RE: flash!!! notice that tex update is about to happen + +[ ... ] +Brian +PS I'd love to see some way of using \loop... within an \halign; at +present it falls over because each & cancels a level of grouping, and so +the definition of \body (or is it \repeat) keels over. But I guess this +is too big a change. + [ dek: + Well \dosplits on page 397 does iterate within \valign + (which is similar) + ] +------- + +<<< end \TeX logo; some problems with \loop + +************************************************************************ + +>>> cedilla accent macro in plain.tex + +Date: Mon, 23 Sep 91 11:56:15 +0200 +From: Bernd Raichle +Subject: TeX Bug Report -- plain.tex, cedilla accent macro + +Dear Ms. Beeton, + +I've found a small bug in `plain.tex' (and a missing index entry in +the TeXbook). Perhaps someone has reported it before, but I have seen +no fix for it... + +1. There's a missing index entry for "ligatures" in the TeXbook. + Page 306 contains the answer of exercise 5.1. This answer explains + how to supress unwanted ligatures. + [ dek: + No ... p 19 (ex 5.1, about suppressing unwanted ligs) is indexed. + see p 457 "an answer page is not indexed unless ..." + ] + +2a. The \c macro in `plain.tex' produces a box with the wrong dimensions + (height = depth = 0pt) for arguments with height != 1ex. + + Fix 1: exchange the \unhbox\z@ and \hidewidth\char24\hidewidth in + the macro definition + [ dek: + good + $2.56 + \ooops + ] + +\def\c#1{\setbox\z@\hbox{#1}\ifdim\ht\z@=1ex\accent24 #1% + \else{\ooalign{\unhbox\z@\crcr\hidewidth\char24\hidewidth}}\fi} + +2b. For characters with depth != 0pt, the "cedilla" character is not + lowered. I don't know of any use for this, because there's only the + c-cedille accent. But the idea used in the proposed fix can be + used for the under-dot and under-bar accent (and \AA) too. The + accent characters of these macros are misplaced if used within a + slanted font. + + Fix 2: use the \accent primitive and a changed ex-value to shift + the accent character to the correct place + +\def\c#1{{\dimen@ 1ex% + % Compute new ex value: + % The cedilla accent should not be shifted for uppercase characters, + % => new-ex := height(#1). + {\setbox\z@\hbox{#1}\dimen@\ht\z@ + % but we have to shift it down, if the character has depth. + % => new-ex := new-ex + depth(#1) + \advance\dimen@\dp\z@ + % Set the `ex' value (fontdimen change is always global), + \fontdimen5\font\dimen@}% + % ... set the accent char, reset `ex' to the old value + % and do the rest. + \accent24\fontdimen5\font\dimen@ #1}} + + +Yours, + Bernd Raichle (raichle@azu.informatik.uni-stuttgart.de) + +PS: Please can you add me to the `tex-implementors' list? + Thanks in advance. + ------- +Date: Sun, 29 Sep 91 15:37:10 BST +From: Chris Thompson +Subject: Re: [[Bernd Raichle : + TeX BugReport -- plain.tex, cedi]] + +Dear Barbara, + +> 1. There's a missing index entry for "ligatures" in the TeXbook. +> Page 306 contains the answer of exercise 5.1. This answer explains +> how to supress unwanted ligatures. + +Yes, I think it plausible that 306 should appear in the list. It doesn't +in the most recent 'texbook.tex' I have access to. + +> 2a. The \c macro in `plain.tex' produces a box with the wrong dimensions +> (height = depth = 0pt) for arguments with height != 1ex. +> +> Fix 1: exchange the \unhbox\z@ and \hidewidth\char24\hidewidth in +> the macro definition +> +> \def\c#1{\setbox\z@\hbox{#1}\ifdim\ht\z@=1ex\accent24 #1% +> \else{\ooalign{\unhbox\z@\crcr\hidewidth\char24\hidewidth}}\fi} + +Amazing that this hasn't come to light earlier: \hbox{\c C} has zero +height and depth as stated! Bernd's fix would appear to be the right +one: but maybe there is some subtle reason why the alignment is written +that way round at the moment---it's such a counterintuitive thing to do! + +> 2b. For characters with depth != 0pt, the "cedilla" character is not +> lowered. I don't know of any use for this, because there's only the +> c-cedille accent. But the idea used in the proposed fix can be +> used for the under-dot and under-bar accent (and \AA) too. The +> accent characters of these macros are misplaced if used within a +> slanted font. +> +> Fix 2: use the \accent primitive and a changed ex-value to shift +> the accent character to the correct place +> +> \def\c#1{{\dimen@ 1ex% +> % Compute new ex value: +> % The cedilla accent should not be shifted for uppercase characters, +> % => new-ex := height(#1). +> {\setbox\z@\hbox{#1}\dimen@\ht\z@ +> % but we have to shift it down, if the character has depth. +> % => new-ex := new-ex + depth(#1) +> \advance\dimen@\dp\z@ +> % Set the `ex' value (fontdimen change is always global), +> \fontdimen5\font\dimen@}% +> % ... set the accent char, reset `ex' to the old value +> % and do the rest. +> \accent24\fontdimen5\font\dimen@ #1}} + +This is a much more ambitious change, and I have doubts about its +having sufficient backwards compatibility, and its robustness. An +interesting technique, though, which relies on the x-height of the +current font being recorded before the |do_assignments| call in +|make_accent|. I think you should show it to Don together with +the rest. + +Chris Thompson + +<<< end cedilla accent macro in plain.tex + +************************************************************************ + +>>> missing \mathsurround in plain.tex + +Date: Mon, 4 Nov 91 13:35:11 +0100 +From: schoepf@sc.ZIB-Berlin.DE (Rainer Schoepf) +Organization: Konrad-Zuse-Zentrum fuer Informationstechnik Berlin +Subject: Glitches in plain.tex + +Barbara, + +while revamping the LaTeX files I found that some macros from +plain.tex lack the \m@th (i.e. \mathsurround=0pt) assignment. The +macros in question are: + +\overrightarrow +\underrightarrow + [ dek: (scratched out \underrightarrow) + \overleftarrow + ] +\overbrace +\underbrace +\notin/\c@ncel +\rightleftharpoons/\rlh@ + [ dek: + $2.56 x 3 + A359, A360, A361 + ] + +What do you think? I append a demo file. + +Rainer + + ------------------demo for plain tex-------------------- + +text$\overrightarrow{abcdef}$text + +text$a \notin b$text + +\mathsurround =10pt + +text$\overrightarrow{abcdef}$text + +text$a \notin b$text + +text$a \rightleftharpoons b$text + +\bye + +<<< end missing \mathsurround in plain.tex + +************************************************************************ + +>>> \arrowvert code, plain.tex + +comment by bb: +there are several symbols in cmex* that are meant as midsections of +arrows, brackets, etc., but which are also given \cs names. these +include + \arrowvert + \Arrowvert + \bracevert +it seems that as long as these are referenced indirectly, through +\uparrow, \downarrow, etc., they are well behaved, but when they are +referenced by the \cs name, the wrong symbol is produced. i'm not the +only one who finds the \delimiter values assigned in plain somewhat +mysterious. if these really are errors, there's a different claimant +for each one: \arrowvert -- Phil Taylor, \Arrowvert -- me, \bracevert -- +Chris Thompson. if the values are correct though, we'd really +appreciate a good explanation of how this works. + +re the comments by michael barr regarding how much memory is required for +rules vs. characters, i know that's been explained before, but perhaps +it's time to do it again. i shall ask chris thompson or brian {hk}. + ------- +Date: Mon, 11 NOV 91 17:43:28 BST +Reply-to: Philip Taylor (RHBNC) +From: CHAA006@vax.rhbnc.ac.uk +Subject: [Surely not another] bug in Plain.TeX ? + +For a book on French linguistics, I need up/down arrows which span rows +in an \halign; I use \uparrow, \downarrow and \arrowvert. In both the +MS/DOS (emTeX) and VAX/VMS versions of Plain.TeX, \arrowvert translates +to \delimiter"33C000. Character "3C in family 3 (cmex10) is the centre +part of a brace, not a vertical arrow ... + [ dek: + right, as stated on page 150. I admit these names are not the + best, but you are supposed to regard them as _verts_ (with + differing weights) derived from arrows/braces _not_ as + arrows/braces + ] + + ** Phil. + +P.S. Plain version 3.0 (can't find a date). + ------- +Date: Mon, 18 NOV 91 10:57:30 BST +Reply-to: Philip Taylor (RHBNC) +From: CHAA006@vax.rhbnc.ac.uk +Subject: Re: [Surely not another] bug in Plain.TeX ? + +>>> however, now that i look at this, i'm wondering why you haven't just +>>> used \uparrow, \downarrow, and \updownarrow, forcing them to whatever +>>> size you want with phantoms. or have you? if so, and you're really +>>> getting the wrong pieces, then there's a problem in the .tfm file too. + +I did, in the end; here's the current version: + +% +\newbox \arrowbox +\setbox \arrowbox = \hbox + {\let|=\strut\smash{$\left\updownarrow\matrix{|\cr|\cr|\cr|\cr}\right.$}} +\def \arrow {\copy \arrowbox} +% +\Begin {columns} \options = {\listindent = 0.25 \listindent} +% + \+&&Il&&&&effondr{\'e}&&&&&&&&une chaise.&\cr + \+&&Pierre&&s'est&&assis&&sur&&&&&&un si{\`e}ge.&\cr + \omit&\arrow&&&&\arrow&&&&&&&&\arrow&&\cr + \+&&L'{\'e}tudiant&&&&install{\'e}&&&&&&&&un tabouret.&\cr + \+&&&&&&&&&&&&&&un canap{\'e}.&\cr + \+&&\multispan 4{\qquad \leftarrowfill\rlap {$\joinrel \rightarrow$}}&& + \multispan 2{\llap {$\leftarrow$}$\joinrel$\rightarrowfill}&&&&& + \multispan 2{\llap {$\leftarrow$}$\joinrel$\rightarrowfill}&\cr +% +\End {columns} + +[ ... ] + ------- +Date: Wed 20 Nov 91 07:02:41-EST +From: bbeeton +To: CET1@phx.cam.ac.uk + +by the way, phil taylor has found another plain bug -- the character +referenced by \arrowvert is wrong; following his lead, i discovered +that \Arrowvert also looks bad. (these are rarely used, but even so, +it's surprising they haven't been found before; i think they've +been this way since versions >1.) phil is concocting a routine to +print out all the plain math characters for checking. + -- bb + ------- +Date: Thu, 21 Nov 91 16:39:06 GMT +From: Chris Thompson + +[ ... ] + + I met Phil Taylor at the UKTeX meeting in Oxford yesterday, and he +told me about the \arrowvert..\Arrowvert problem. I was surprised that +such a bug had gone unnoticed so long. Are you both sure about this? +I get the appearance described on page 150 of the TeXbook in test +programs. (All this complicated by the variable-character codes in +cmex10, by which a character rarely means itself! "3C as varchar is +actually repeating bits of "3F, and "3D as a varchar is repeating bits +of "77.) There was a change in plain \fmtversion 2.92 (I think) in which +the definitions of \arrowvert, \Arrowvert and \bracevert were changed +from "33C, "33D & "33E to "33C000, "33D000 & "33E000: I never understood +in what circumstances this could make a difference! + [ dek: + Yes, see the bottom of page 156 + ] + +Chris Thompson + ------- +Date: Fri, 22 NOV 91 11:02:27 BST +Reply-to: Philip Taylor (RHBNC) +From: CHAA006@vax.rhbnc.ac.uk +Subject: Arrowvert (forgot to cc you) + +Dear Chris --- + +>>> I was using tests like + +>>> $$\left\arrowvert X\sp h \over J_y \right\Arrowvert$$ + +>>> and they seem to work. Have you got an example which fails? + +Yes ! $ \arrowvert $ ! [I suppose this means I must be abusing \arrowvert, + [ dek: ^^ + \bigg would produce a particular size + I will pay Phil $2.56 + ] +but I can't for the life of me see why ...] + + ** Phil. + ------- +Date: Fri, 22 Nov 91 15:37:37 GMT +From: Chris Thompson +To: Philip Taylor (RHBNC) +Subject: RE: \arrowvert..\Arrowvert + +Phil, + +Ah, I see! Although $\left\arrowvert...$ works, $\arrowvert$ doesn't. +The trouble is, I don't see how it can be made to... + +When \arrowvert is used in the context of a , only +the top 15 bits of the 27-bit number following \delimiter are used. +Before the change in plain 2.92 (if that is in fact when it was) this +would have produced \mathchar"0000 (clearly wrong); now it produces +\mathchar"033C (unfortunately, still wrong). cmex10 character "3C as +a math character is the middle piece of a large \lbrace as shown on +p.432, but when used as a (after \left, or the macros \bigl, +\Biggl, etc.) its varchar definition is used, and that says that it +should be made up of a lot of copies of character "3F (no top, middle +or bottom piece used). If the definition of \arrowvert was changed to +"033F000, then the context would work, but the +one wouldn't: instead it would be like \updownarrow. + + [ dek: + Next version of plain has a good compromise: + \lmoustache "437A340 \arrowvert "026A33C + \rmoustache "437B341 \Arrowvert "026B33D + \lgroup "462833A \bracevert "077C33E + \rgroup "462933B + ] + +Chris Thompson + ------- +Date: Thu, 21 Nov 91 11:31:24 EST +X-ListName: TeX-Related Network Discussion List +From: barr@triples.Math.McGill.CA +Subject: Optimizing TeX? + +Let me begin by mentioning a misprint in the Book. On page 358, line +-8 (17th printing, Jan. 1990), it says +\mathchardef\mapstochar="322F \def\mapsto{\mapstochar\rightarrow} +and the "322F should be (and is, in plain.tex) "3237. + [ dek: + $2.56 was paid to Karl Berry for this on 19 Sep 91. Labrea + sources haven't changed yet but my texbook.tex had this + correct as of 18 Sep 91 acc. to errata.tex + ] + +The reason I noticed this was that a colleague had tried to make a +\mapsfrom macro and discovered a curious fact. The \mapstochar is not +just a vertical line, but has a blip in the middle on the right hand +side that effectively ruins it for any other purpose. I told my +colleague to use a rule and he did. + +I know from something that appeared in UKTeX a ffew weeks ago that rules +are expensive in space. There is a reason for this. It requires 4 real +numbers to specify a rule (the space of rules is a 4-manifold and fewer +numbers will not do, no matter how you describe them). + [ dek: + not true; 3 numbers (height, width, depth) suffice in context + ] + Possibly 4 16 +bit numbers would have given sufficient precision, but Knuth coded all +dimensions as 32 bit numbers. So, it presumably takes 16 bytes to +specify a rule and it is going to be much more wasteful of space to use +a rule than it would have been to use the \mapstochar. Is this correct? +More to the point, how can one find out about coding TeX to optimize for +space? For time? Knuth drops a few clues in the discussion on pp. +373-374, but that is almost the only place this is done. For instance, +can anyone tell me the relative cost of factoring macros into smaller +ones, assuming you never reuse the pieces? + +Michael Barr + ------- +Date: Fri, 22 Nov 91 17:07:28 GMT +From: Chris Thompson +Subject: This and that + +Barbara, + +You write +> there was another in that category reported just +> today by michael barr -- the \mapstochar. if you read comp.text.tex, +> look for his report, because it's asking a couple more basic questions, +> namely how much memory space do certain techniques require, and what's +> the most efficient way to do certain things. + +I follow comp.text.tex only intermittently, as its volume is really +rather high. I took a look at Michael Barr's posting, and have posted +a reply. He is certainly right about \mapstochar: the TeXbook said +"322F in 1984, and the latest texbook.tex from labrea still says it; +on the other hand plain.tex has always (correctly) had "3237 since 1.0 +(I am fairly sure of this: despite the absence of a plain.tex.history +file, I do do compares of old with new each time I upgrade and note +down the salient changes). + +Chris Thompson + +<<< end \arrowvert code, plain.tex + +************************************************************************ + +>>> MF -- bugs or features? (also, some ACP errata) + +Date: Tue, 22 Oct 91 12:04:23 +0100 +From: schoepf@sc.ZIB-Berlin.DE (Rainer Schoepf) +Organization: Konrad-Zuse-Zentrum fuer Informationstechnik Berlin +Subject: Questionable features of Metafont + +Barbara, + +here is the report about two features of Metafont that I find +questionable. I hesitate to call them bugs as it is said nowhere in +the book that Metafont should not behave that way. + +Number 1: +--------- + +The book says that + +addto V also P; + +is "essentially the same as" + +V := V + P; + +But this is only true if the evaluation of the picture expression P +does *not* change the value of the picture variable V as a side +effect. The second expression is correctly evaluated left to right. +The first one, however, uses the value of V *after* P has been +evaluated. Looking into the program one sees that "addto" reads the +token list for V, evaluates the expression P, and converts the token +list for P into an edge structure afterwards. + +I assume that the same behaviour happens with "cull". + [ dek: + I suppose so -- just as you would expect in C when comparing + x=x+f(x) to x+=f(x) when f has side effects + ] + + +Number 2: +--------- + +Define the following macro: + +def xxx = + begingroup + save x; + newinternal x; + .... + endgroup +enddef; + +After a hundred expansions Metafont gives you an "capacity exceeded" +error since every call to newinternal statically allocates a slot in +an internal array, which is not freed again at the end of the group. +However, in this case, it is very easy to free the slot again. + [ dek: ^^^^^^^^^ + STRONGLY DISAGREE that _any_ change can be described as + ``very easy''! + + +Bugs or features? + +At least, this behaviour should be documented! + [ dek: + Maybe in TUGboat. Certainly the ``capacity exceeded'' error + tells you that you've exceeded the number of internals. + ] + + +[ ... ] + + +Rainer + +<<< end MF -- bugs or features? (also, some ACP errata) + +************************************************************************ + +>>> MFbook errata + +Date: Tue, 5 Nov 1991 05:48:03 +0100 +From: Lutz Birkhahn +Subject: Errors in METAFONTbook (C&T Vol. C) + +Barbara, +just for the record, here are some minor bugs in the METAFONTbook (C & T +vol. C) index: + + "openwindow", "or", and "string" + +each are METAFONT primitives, so they deserve to get a starred entry (preceded +with an asterisk `*') in the index on pages 353, 354, and 356, respectively. + +This error shows up in my edition from 1986 (first printing, I think) as well +as in the source code I have, stating "Fifth printing, revised, March 1990" +(although the C & T Publication info table you posted recently said that +the 4th printing of Volume C, Sept 1991, is the latest...). + + [ dek: + 3 x $2.56 many thanks C354^2 C356 + ] + +Bye, +Lutz + +Lutz Birkhahn (Germany) email: lutz@bisun.nbg.sub.org (don't use another!) +F"urther Str. 6 +-------------------------------------------------- +D-W-8501 Cadolzburg 2 | "It is an error to not have enough arguments" +Voice: 09103 / 2886 | (Hype Programmer's Guide) + +<<< end MFbook errata + + [ dek: + notes to myself + only boolean was done as I had intended + 353 numeric 356 string 357 transform + 354 openwindow + or + pair + path + pen + picture + ] + + +######################################################################## + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Character code reference +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Upper case letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ +% Lower case letters: abcdefghijklmnopqrstuvwxyz +% Digits: 0123456789 +% Square, curly, angle braces, parentheses: [] {} <> () +% Backslash, slash, vertical bar: \ / | +% Punctuation: . ? ! , : ; +% Underscore, hyphen, equals sign: _ - = +% Quotes--right left double: ' ` " +%"at", "number" "dollar", "percent", "and": @ # $ % & +% "hat", "star", "plus", "tilde": ^ * + ~ +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +[ end of message 039 ] + diff --git a/info/digests/tex-implementors/040 b/info/digests/tex-implementors/040 new file mode 100644 index 0000000000..12ca5aa7ab --- /dev/null +++ b/info/digests/tex-implementors/040 @@ -0,0 +1,661 @@ +Date: 14 March 91 Message No: 040 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: Messages from DEK, part 5 + + +************************************************************************ + +>>> WEAVE -- Peter Breitenlohner + +Date: Sun, 10 Nov 91 17:11:15 GMT +From: Peter Breitenlohner +Organization: Max-Planck-Institut fuer Physik, Muenchen +Subject: message for dek + +Barbara, can you please forward this message. Thanks Peter + ---------------- + +To: Donald E. Knuth +From: Peter Breitenlohner + +1. Thanks for your comments on patgen. I mostly wanted to make sure +that you don't object to the character translation scheme. (You had +quite a few argumantss against my first ideas on how to do that.) + +2. Yet another bug/misfeature in WEAVE. + +After a discussion with Bart Childs I looked at the way WEAVE marks +modules as changed and did some experiments. Consider the following web +and change file (maybe somewhat atypical, but no modules are removed or +inserted): +================ cut here ==================================== +@ One. +11111 +@ +Two-c. +22222 +@ Three. +33333 +@ Four-c. +44444 +@ Five-c. +55555 +@ Six. +66666 +@ Seven. +77777 +@ Eight-c. @ Nine-c. @ Ten-c. +@ Eleven. +@ Twelve-c?. + @ Thirteen-c. +@ Fourteen. +@*Index. +================ cut here ==================================== +@x - this changes Two +@ +Two-c. +22222 +@y + [ dek: not much of a change ] +@ +Two-c. +22222 +@z +@x - this changes Four and Five +44444 +@ Five-c. +55555 +@y +@ Five-c. +55555 +@z +@x - this changes Eight, Nine, and Ten +@ Eight-c. @ Nine-c. @ Ten-c. +@y +@ Eight-c. @ Nine-c. @ Ten-c. +@z +@x - this changes Thirteen (and maybe also Twelve) + @ Thirteen-c. +@y + @ Thirteen-c. +@z +================ cut here ==================================== +One would think that modules Two, Four, Five, Eight, Nine, Ten, and +the index are changed. One might argue whether module Twelve has been +changed or not. Technically the blank preceding '@ Thirteen' is part +of module Twelve. That blank could, however, also be a form feed with +xord[form_feed]=" ", a situation not uncommon until recently in many web +files. Thus one might prefer not to count blanks, tabs, form feeds, and +blank lines as changes. + +Incidentally I don't quite see how a tab_mark can enter into the input +buffer of WEAVE or TANGLE unless through modified xchr/xord arrays. + +Actually modules Four, Eight, and Nine are not marked as changed by + [ dek: ^^^^ + this is the only one I personally would care about, of course + ] +WEAVE 4.2 +Unfortunately I see no simple fix for that, which would not also mark +modules One and Seven as changed (I guess that would just undo the +Aug 83 changes). + +The code below uses a completely revised changed-module-algorithm: + [ dek: @ 1 ] +1. a module is marked as changed if it starts while changing is true + [ dek: @ 2 ] +2. when a matching change is detected, the current module is marked as + changed unless the first non blank line after the '@x' and after the + '@y' both start with '@ ' or '@*' (possibly preceeded by blanks/tabs). + [ dek: ^^^^^^^^^ ^^^^^^^^^^^ + preceded whitespace + ] + +================ cut here ==================================== +% All line numbers refer to WEAVE.WEB 4.2, as of September 5, 1990. + +@x [9] m.71 l.1274 - fix bug in changed_module reckoning +@!changing: boolean; {if |true|, the current line is from |change_file|} +@y +@!changing: boolean; {if |true|, the current line is from |change_file|} +@!change_pending: boolean; {if |true|, the current change is not yet + recorded in |changed_module[module_count]|} +@z +%--------------------------------------- +@x [9] m.79 l.1364 - fix bug in changed_module reckoning +prepares to read the next line from |change_file|. +@y +prepares to read the next line from |change_file|. + +In addition the current module is marked as changed unless the first +line after the \.{@@x} and after the \.{@@y} both start with either +|'@@*'| or |'@@ '| (possibly preceded by blanks and\slash or blank +lines). The \.{WEB} macro |if_start_of_module_then_change_pending| +tests for this condition. + +@d if_start_of_module_then_change_pending== + [ dek: ^^ (#) would be less tricky ] + loc:=0; buffer[limit]:=" "; + while (loc; +if changing then + begin @; + if not changing then + begin changed_module[module_count]:=true; goto restart; + end; +@y this is identical to the corresponding code in TANGLE +begin restart: if changing then + @; +if not changing then + begin @; + if changing then goto restart; +@z +%--------------------------------------- +@x [9] m.84 l.1453 - fix bug in changed_module reckoning +if limit>1 then {check if the change has ended} +@y +if limit>1 then {check if the change has ended} + [ dek: ^ + Here I think it should be 0 + ] + begin if change_pending then + begin if_start_of_module_then_change_pending:=false; + if change_pending then + begin changed_module[module_count]:=true; change_pending:=false; + end; + end; + [ dek: + And I added buffer[limit]:=" "; here +@z +%--------------------------------------- +@x [9] m.84 l.1464 - fix bug in changed_module reckoning + end; +@y + end; + end; +@z +%--------------------------------------- + [ dek: + Suppose change-pending and limit = 1, then the change won't + have ended. If the line comes in as `.' say and the _next_ + line begins `@*' then we won't have marked the current module + as changed. + In your test the line comes in as `@' and you seem to be + lucky because you increase module_count + ] +@x [11] m.110 l.1934 - fix bug in changed_module reckoning +changed_module[module_count]:=false; {it will become |true| if any line changes} +@y +changed_module[module_count]:=changing; + {it will become |true| if any line changes} +@z +%--------------------------------------- +================ cut here ==================================== +Regards Peter + +<<< end WEAVE -- Peter Breitenlohner + +************************************************************************ + +>>> WEAVE -- Brian {Hamilton Kelly} + +Date: Mon, 18 NOV 91 14:44:15 GMT +Originally-from: TEX "Brian {Hamilton Kelly} " +From: TEX@rmcs.cranfield.ac.uk +Subject: RE: Bugs or mis-features in WEAVE + +barbara, + +I was more than somewhat disappointed by DEK's response to my message +about WEAVE, which you (re-)relayed to him on 8 May 91 (your message-id +<673745280.0.BNB@MATH.AMS.COM>). + +(I'll adopt below your usual artifice of interpolating DEK's pencilled +notes.) + +In a message of 29-SEP-1989 13:07 BST, I wrote: + + +> It looks as though fixing the long line bug has introduced one!!! +> +> I think I've engineered a fix: can you feed it through to DEK please? +> +> @x [Section 122 |flush_buffer|] +> write_ln(tex_file); incr(out_line); +> if b @y +> write_ln(tex_file); incr(out_line); +> per_cent:=false; +> if b for k:=1 to j do +> if (out_buf[k] = "%") and ((k=1) or (out_buf[k-1] <> "\")) +> then per_cent:=true; +> if per_cent then {Ensure continuation line starts in comment mode} +> begin +> out_buf[b]:="%"; +> decr(b) +> end; +> if b @z + [dek: + Sorry, I do not have time to update WEAVE and TANGLE... + (I prefer to shorten the long lines and get back to Vol. 4) + but if Brian feels so strongly about that he *has* to see this in, + he should send me *debugged* code!... + The above looks flaky (has undeclared variable [anyway I'd probably + use a goto!] and missing begin end at least.] + + +OK, after more experience of actually writing in WEB ab initio (vs. just +writing change files) I'm prepared to accept that the other `misfeature' +reported in the same message isn't such a bad idea after all [viz. +actually listing multiple references to the same WEB section when a +section is invoked more than once in-line]. + +However, I do think that the above problem really is a bug, and one +that's likely to cause all sorts of untold grief to someone who only +ever uses WEAVE to pretty-print someone else's changes; especially if +the author hasn't him/herself done this (cf. TeX V2.991 when DEK had +index entry macros used without accounting for \_ requirements) + +I'll admit that I've never compiled the code above per se, because the + [ dek: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + AHA, just as I guessed. + ] +correction to the bug for the VMS implementation is subtly different, +since that implementation uses a separate auxiliary buffer for outputs +to the .tex file. But the same phenomenon (of Weave inserting an +infelicitous line-wrap) was observed on two separate implementations of +Weave for the IBM-PC: my colleague Niel Kempson fed through the above +suggested fix to each of the authors, and it was included, compiled +quite happily, and fixed the bug in each version without any further +problem. + [ dek: + And this should have been stated so that I wouldn't have + started with the wrong impression. + ] + +Therefore, I cannot see why DEK says that there's an undeclared + [ dek: + because I don't have the foggiest idea what WEAVE does anymore + ] +variable: I've just gone through the above suggested correction with a +fine-toothed comb, and every variable used therein is not only declared, +but already in *use* in \S122 of weave.web. (OK, |per_cent| is a +parameter, but it's a call-by-value one, and therefore can legitimately +be re-used, after it's done it's initial job] as a local variable for + [ dek: ^^^ its ] +after all, it already has a most apposite name). Moreover, at the risk of +some comment about grandmothers and sucking eggs, why should it require +a begin...end pair?... + [ dek: + Well if he hadn't said ``I think i've engineered a fix'' I would + have had more confidence. But this going back to maintain old + programs always takes several days off my life... I have come + to really hate doing it, please excuse me but it is the truth. + Talk about stress! + ] + +Forgetting about the comment, and rearranging... + +> if b for k:=1 to j do +> if (out_buf[k] = "%") and ((k=1) or (out_buf[k-1] <> "\")) then +> per_cent:=true; + +can be parsed into: + +> if b for k:=1 to j do +> if then ; + +thence to: + +> if b for k:=1 to j do +> ; + +and + +> if b for := to do +> ; + +then + +> if b ; + +and finally + +> if then +> ; + +So what need for a compound statment? If Weave et al made a habit of +always surrounding the single statment controlled by a conditional or + [ dek: + Not sure what I meant but I guess I may have been thinking + about efficiency -- no need to test per_cent if b>=out_ptr + in that code + ] +iterative statement into a compound statement (as is done by many writers +in C, to avoid potential problems when multiple statements are later +inserted in place of the original single one), then I'd be prepared to +agree that this too should become a compound statment. But there are +many places in Weave, TeX and elsewhere where an if or for controls but +a single unardorned statement. Of course, had this been Modula-2 (a + [ dek: ^ unadorned ] +language that I cannot commend too highly) there'd be no possibility of +confusion about the statements controlled by any construct, although no +BEGIN would ever be required, and I don't agree with Wirth's overloading +of END. + + [ dek: + Anyway I looked at it again and found a real bug in Brian's + ``engineering'': Sometimes flush_buffer is called with b=out_ptr + when you want to propagate a %. (You see why I can't satisfy + everybody's whims without spending a lot of time that I haven't + got.) The next time anybody asks for anything I just won't + even try; I don't like to disappoint people, but a h*** of a lot + more people will be disappointed if I don't finish Volume 4. + [But after wasting this much time I _did_ put in a patch that + should satisfy Brian. Hoping that he will be so happy he will + help me with Vol. 4 by convincing all his friends never to + pester me again.] + + Barbara please excuse me for getting so upset. + Some day I will no doubt be happy again! + ] + +> Again, could you please pass this to DEK? + +Best regards, + + Brian {Hamilton Kelly} + ++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ++ JANET: tex@uk.ac.cranfield.rmcs + ++ BITNET: tex%uk.ac.cranfield.rmcs@ac.uk + ++ INTERNET: tex%uk.ac.cranfield.rmcs@nsfnet-relay.ac.uk + ++ Smail: School of Electrical Engineering & Science, Royal Military + ++ College of Science, Shrivenham, SWINDON SN6 8LA, U.K. + ++ Phone: Swindon (0793) 785252 (UK), +44-793-785252 (International) + ++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + ------- +(reply, 19 Nov 91) +brian, +you would like me to send it around one more time? +------- +Date: Wed, 20 NOV 91 10:41:14 GMT +Originally-from: TEX "Brian {Hamilton Kelly} " +From: TEX@rmcs.cranfield.ac.uk +Subject: RE: Bugs or mis-features in WEAVE + +Dear barbara, + +In your message <690606220.0.BNB@MATH.AMS.COM> +of Tue 19 Nov 91 22:03:40-EST, you wrote: + +> you would like me to send it around one more time? + +Yes please; Chris Thompson has since come back to me (I circulated my +message for you to him before sending it for you to forward to DEK) and +suggested that perhaps trailing comments (apart from the percent itself) +should be eliminated from the woven TeX before even reaching the output +routine, so that this problem wouldn't arise. I'm not so sure that I +agree, although the problem HAS only raised its ugly head because of TeX +comments in the Web that were only there to explain why the Web was +written that way, not why the program was so written (or in limbo +material providing a revision history), so perhaps nothing's lost by +discarding them. + +>>> WEAVE -- Brian {Hamilton Kelly} + + [ dek: + Please tell Peter B and Brian H~K that the new WEAVE.WEB is + now available for alphatesting + on labrea ~ftp/alpha directory + I hope they can check it before February + thanks + ] + +************************************************************************ + +>>> Barry Smith, |history| variable in TeX.WEB + +Date: Mon 6 Jan 92 21:36:47-EST +From: bbeeton +To: winkler@cs.stanford.edu +Subject: another tex report for don + +this report just arrived. + --------------- + +Date: Mon, 6 Jan 92 17:15 PST +From: barry@reed.edu (Barry Smith) +To: BNB@MATH.AMS.COM +Subject: Re: flash!!! notice that tex update is about to happen + +hmmm, mail here was down over the weekend, so this may be too late, but... + +I noticed (while working on Lighting Textures) that in section 1335 +(final_cleanup), the |history| variable is not updated when either of +these error messages is produced. Only a problem when someone (something?) +external to TeX is looking at history, of course. + +(might even qualify as a high-value bug?) + +Barry Smith, Blue Sky Research +barry@reed.edu +------- + + [ dek: + I don't think I'll make any change here, since this sort of + ``warning'' is not the kind for which there is info in the + transcript file ... so it would look funny if TeX then said + ``(see the transcript file for info)''. + Of course a system dependent error level can be signalled + here if somebody wants. + ] + +<<< end Barry Smith, |history| variable in TeX.WEB + +************************************************************************ + +>>> Chris Rowley, two items: \fontdimen2 and marks + +Date: Tue 7 Jan 92 11:02:12-EST +From: bbeeton +To: winkler@cs.stanford.edu +Subject: another tex comment for don + +little comments keep dribbling in ... + --------------- + +Date: Mon, 6 JAN 92 23:43:37 GMT +From: CA_ROWLEY@vax.acs.open.ac.uk +To: BNB <@nsfnet-relay.ac.uk:BNB@MATH.AMS.com> +Subject: RE: flash!!! notice that tex update is about to happen + +b + +Just one thing on the TeXbook: I mentioned this to you but have not +sent it to Don. + +In the table on page 447, it states that \sigma_2 is used in Rule 17. +Now, \sigma_2 is (page 441) \fontdimen2 of a font in family 2, but +Rule 17 uses \fontdimen2 of the font from which the character comes +(page 445). This may seem a bit pedantic but it has misled more than +one person in an area where a lot of misunderstandings are found (not +caused by what is in the TeXbook)! + + [ dek: + $2.56 + Well it might be \sigma_2 or \xi_2 but I agree that the + present chart is misleading. + (TFM designers do need to make \sigma_2, \sigma_5, \xi_2, + \xi_5 sensible for characters in those fonts used as Ord.) + ] + +\chi +------- +Date: Fri 10 Jan 92 22:41:54-EST +From: bbeeton +To: winkler@cs.stanford.edu +Subject: message for don re tex update + +i just received this today. +i'm pretty sure this will be the last, as i'm leaving sunday +morning to go to los angeles for two weeks. + --------------- + +Date: Fri, 10 JAN 92 18:53:27 GMT +From: CA_ROWLEY@vax.acs.open.ac.uk +To: bnb <@nsfnet-relay.ac.uk:bnb@math.ams.com> +Subject: for Don, copy sent to CET1 + +Don and Barbara + +As Joachim Schrod discovered (in implementing change-bar macros), when +the output routine is called with no intention to shipout anything, +then not only is it necessary to ensure that the inserts are left as +before (using \holdinginserts positive) but it is also sensible to +leave the values of the three marks as they were, especially if they +are null. + +Frank and I have been discussing this and we now think that what is +needed for marks is a little more complex than for inserts, as +follows. + +Even when \holdinginserts is positive, it is useful to have the three +marks set as normal: this is so that the output routine can use the +information in them but, in the case that \holdinginserts is +positive, after the end of the output routine they should be restored +to the values they had before the output routine was called. + +This needs to be done at the Pascal level because it is not possible, +at the TeX level, to restore the pointer associated with a mark to + [ dek: + You can simulate the behavior without great difficulty; no + need to `put back' a value into the real mark registers. + Solutions to that are well known and the user can be disciplined + in marks used. + ] +have the value "null"; and it is also difficult to detect, in a +robust way, whether one of these pointers does have the value "null" +or to distinguish this value from a pointer to an empty string. + +Therefore, at the Pascal level, the values of "top_mark", "bot_mark" +and "first_mark" should be saved before these pointers are updated (in +the procedure "fire_up"), and then the values of all three to be +restored to these saved values when the user's output routine +finishes. This will also require appropriate changes to the parts of +the code which call "delete_token_ref" and "add_token_ref". + + [ dek: + Somehow my message about TeX being frozen is not getting through. + If you feel extremely strong about this, please + (a) send me a carefully written detailed report about why + this is an important problem -- say 5-10 pages long and + easy for me to understand -- and include rigorous proofs + that TeX as it stands cannot possibly deal with a certain + important application -- and include rigorous justification + for assertion that an incompatible change such as you + propose will not affect any present users adversely + (b) send me complete list of necessary changes to the Pascal + code after having tested them thoroughly, including + extensive documentation about the tests you have made. + Vague paragraphs about `save a pointer and make appropriate + changes' are inadmissible. + (c) Wait until I have time to look at TeX again. + ] + +Best wishes + +Chris +Frank +------- + +<<< end Chris Rowley, two items: \fontdimen2 and marks + +************************************************************************ + +dek: + +Barbara, while I've got all this whitespace I have room to tell you that +I have made several changes to Computer Modern fonts: + (1) Arrowheads made thicker and wider + (2) Calligraphic F, H, I, and T revised. +I have seen too many cases of `arrowhead burnoff' after weak +laserprinter and Xeroxing, hence (1). I have begun to read lots of math +papers that use the \cal letters and I've had very negative personal +reaction to H and T, slightly to I, and very very slightly to F. Thus I +have to try to change them so as to minimize the number of future times +my mind is taken from math to fonts ... + +I realize it's a hassle changing fonts, so the upgrade will take awhile +before it spreads around (although with Rokicki's DVIPS it's very +simple, I just update the CM sources and delete the affected fonts, then +DVIPS will remake them automatically as needed). + +The affected fonts are cmsy* (and cmbsy10) mainly, but the harpoons +change in math italic and the arrows change a bit in cmtt. + ==> NO TFM FILES ARE AFFECTED <== +so there is no change to TeX's line breaks. I will never change the +TFMs again (unless I discover a major glitch). + +At the same time I'm installing a new cmbase with ideas by John Hobby; +it makes digitization better (_much_ better at low res and some better +even at 300dpi). The new CM sources are available for alphatesting +on labrea ~ftp/alpha . + +[ enclosed: proofs of arrows and modified \cal letters as noted above ] + + +######################################################################## + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Character code reference +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Upper case letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ +% Lower case letters: abcdefghijklmnopqrstuvwxyz +% Digits: 0123456789 +% Square, curly, angle braces, parentheses: [] {} <> () +% Backslash, slash, vertical bar: \ / | +% Punctuation: . ? ! , : ; +% Underscore, hyphen, equals sign: _ - = +% Quotes--right left double: ' ` " +%"at", "number" "dollar", "percent", "and": @ # $ % & +% "hat", "star", "plus", "tilde": ^ * + ~ +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +[ end of message 040 ] + diff --git a/info/digests/tex-implementors/041 b/info/digests/tex-implementors/041 new file mode 100644 index 0000000000..ebf24c72f8 --- /dev/null +++ b/info/digests/tex-implementors/041 @@ -0,0 +1,179 @@ +Date: 11 Sep 93 Message No: 041 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: TeX 3.1415 and other updates -- file 1 of 2 + + +The /tex area at labrea.stanford.edu was updated on Sep 4 with Knuth's +most recent versions of TeX, MF, and a number of other items. The +dates on these items vary from February to June 26 of this year, but +in fact, there has not been an update at labrea since spring of 1992, +so any file with date later than about April 1992 is almost certainly +new there. + +The labrea updates are done by a volunteer, and without real management +support -- the TeX project at Stanford has been closed for quite a few +years now, and maintenance is not part of the official program. For +this reason, some parts of the /tex area are being withdrawn from labrea +in favor of the now more reliable CTAN archives: + ftp.shsu.edu + ftp.tex.ac.uk + ftp.uni-stuttgart.de +Concurrently with the updates of the Knuth material, the /tex/tugboat +area was emptied and its contents replaced with a single README file +pointing to the CTAN sites. I believe that Rainer Schoepf has just +asked that the same thing be done with the /tex/latex directory, as +maintenance is now officially in the care of the LaTeX3 project, and +the canonical files originate in Germany. + +I have one administrative request: the last numbered message was sent +to TeX-implementors in March 1991. Undoubtedly some addresses are out +of date. I have checked the current addresses for those of you with +whom I correspond regularly on other topics, or for whom I have noticed +new addresses in postings to comp.text.tex, etc., but I'm not sure that +I've got them all. I will know soon enough from the mailer the addresses +that really don't work, but I would still appreciate an acknowledgement +of receipt if this message gets through -- and an address update if you +have a different preferred address. + +The files listed below have new dates, as compared with a directory +listing from August 1992. It's not certain that all of these files +came from Knuth (for example, the /tugboat README file didn't), but +I will leave it to your judgment what you feel is important for you. + +In a separate message I am sending the commentary from Don on the +bug reports of the past nearly year and a half. + +######################################################################## + +new files at labrea.stanford.edu + +/tex/errata: +-rw-r--r-- 1 468 56231 Aug 17 1992 cm85.bug +-rw-r--r-- 1 468 16328 Jun 26 22:56 errata.eight +-rw-r--r-- 1 468 31881 Aug 17 1992 errata.four +-rw-r--r-- 1 468 29653 Feb 27 1993 errata.seven +-rw-r--r-- 1 468 15837 May 18 1992 errata.six +-rw-r--r-- 1 468 4005 Jun 26 23:00 errata.tex +-rw-r--r-- 1 468 150842 Jun 26 16:40 errorlog.tex +-rw-r--r-- 1 468 310855 Jun 26 16:36 tex82.bug + +/tex/lib: +-rw-r--r-- 1 468 3448 Mar 24 07:37 logo.mf +-rw-r--r-- 1 468 22628 Jun 26 22:48 plain.mf +-rw-r--r-- 1 468 44102 Jun 26 06:38 plain.tex + +/tex/local/cm: +-rw-r--r-- 1 468 3700 Jan 3 1993 cmsl6.mf +-rw-r--r-- 1 468 3804 Sep 7 12:46 gen.mf + +/tex/local/etc: +-rw-r--r-- 1 468 797 Jul 17 1992 Makefile + +/tex/local/lib: +-rwxr-xr-x 1 468 2499 Aug 13 1992 blackdvi.tex +-rwxr-xr-x 1 468 258 Aug 15 1989 blackimagen.mf +-rwxr-xr-x 1 468 333 Aug 24 1992 blacklino.mf +-rwxr-xr-x 1 468 7494 Aug 13 1992 colordvi.tex +-rwxr-xr-x 1 468 18480 Mar 10 1993 ctwimac.tex +-rwxr-xr-x 1 468 15314 Jun 12 06:36 cwebmac.tex +-rwxr-xr-x 1 468 2153 Aug 18 1992 e.mft +-rwxr-xr-x 1 468 8210 Aug 13 1992 epsf.tex +-rwxr-xr-x 1 468 4081 Nov 24 1992 local.mf +-rwxr-xr-x 1 468 72673 Jun 8 1992 mfman.mf +-rwxr-xr-x 1 468 421 Feb 23 1993 mproof.tex +-rwxr-xr-x 1 468 15836 Mar 7 1993 proofmac.tex +-rwxr-xr-x 1 468 1936 Aug 13 1992 rotate.tex +-rwxr-xr-x 1 468 210 Aug 24 1992 slantlino4.mf +-rwxr-xr-x 1 468 8343 Jun 23 04:24 xepsf.tex + +/tex/local/mf: +-rwxr-xr-x 1 468 2048 Aug 19 1992 Makefile +-rwxr-xr-x 1 468 12603 Jul 17 1992 ext.c +-rwxr-xr-x 1 468 680 Feb 22 1993 ini_to_trap +-rwxr-xr-x 1 468 54327 Feb 22 1993 inimf.ch +-rwxr-xr-x 1 468 22157 Aug 19 1992 mf.pool +-rwxr-xr-x 1 468 2645 Aug 19 1992 mf_sunwin.c +-rwxr-xr-x 1 468 56644 Jun 26 22:51 plain.base +-rwxr-xr-x 1 468 696 Jun 26 22:51 plain.log + +/tex/local/mfware: +-rw-r--r-- 1 468 31182 Jun 8 1992 gf2dvi.ch + +/tex/local/tex: +-rw-r--r-- 1 468 1960 Mar 20 06:13 Makefile +-r--r--r-- 1 468 41 Aug 10 1989 dvitype.in +-rw-r--r-- 1 468 13234 Jul 17 1992 ext.c +-rwxr--r-- 1 468 705 Jan 26 1992 ini_to_trip +-rw-r--r-- 1 468 53901 May 1 19:26 initex.ch +-rw-r--r-- 1 468 166300 Jun 26 17:07 plain.fmt +-rw-r--r-- 1 468 2415 Jun 26 17:07 plain.log +-rw-r--r-- 1 468 25806 Jun 26 16:59 tex.pool + +/tex/local/texware: +-rw-r--r-- 1 468 834 Jul 17 1992 Makefile + +/tex/local/web: +-rw-r--r-- 1 468 705 Jul 17 1992 Makefile +-rw-r--r-- 1 468 23671 Feb 28 1993 tangle.ch +-rw-r--r-- 1 468 47215 Feb 28 1993 tangle.p + +/tex/mf: +-rwxr-xr-x 1 468 917972 Feb 25 1993 mf.web +-rwxr-xr-x 1 468 939224 Jun 26 22:47 mfbook.tex + +/tex/tex: +-rw-r--r-- 1 468 1027648 Jun 26 16:28 tex.web +-rw-r--r-- 1 468 1383013 Jun 26 16:22 texbook.tex +-rw-r--r-- 1 468 2436 Feb 27 1993 trip.fot +-rw-r--r-- 1 468 184117 Feb 27 1993 trip.log +-rw-r--r-- 1 468 22682 Feb 27 1993 trip.tex +-rw-r--r-- 1 468 18062 Feb 27 1993 trip.typ +-rw-r--r-- 1 468 12895 Feb 27 1993 tripin.log + +/tex/tugboat: +-rw-r--r-- 1 468 1440 Sep 7 13:20 README + +/tex/web: +-rw-r--r-- 1 468 130099 Feb 28 1993 tangle.web +-rw-r--r-- 1 468 187249 Jan 12 1992 weave.web +-rw-r--r-- 1 root 1156534 Jun 18 16:59 web-5.84b.tar.gz +-rw-r--r-- 1 root 1180627 Jun 18 17:00 web-5.851b.tar.gz +-rw-r--r-- 1 root 1180628 Jun 18 17:00 web-5.851c.tar.gz +-rw-r--r-- 1 root 1166500 Jun 18 17:01 web-5.851d.tar.gz +-rw-r--r-- 1 root 1166493 Jun 18 17:01 web.tar.gz +-rw-r--r-- 1 root 336272 Jun 18 17:02 web2c-5.84b.tar.gz +-rw-r--r-- 1 root 381425 Jun 18 17:02 web2c-5.851b.tar.gz +-rw-r--r-- 1 root 386993 Jun 18 17:02 web2c-5.851c.tar.gz +-rw-r--r-- 1 root 441904 Jun 18 17:02 web2c-5.851d.tar.gz +-rw-r--r-- 1 root 441897 Jun 18 17:02 web2c.tar.gz + + +######################################################################## + +xxx + + +######################################################################## + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Character code reference +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Upper case letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ +% Lower case letters: abcdefghijklmnopqrstuvwxyz +% Digits: 0123456789 +% Square, curly, angle braces, parentheses: [] {} <> () +% Backslash, slash, vertical bar: \ / | +% Punctuation: . ? ! , : ; +% Underscore, hyphen, equals sign: _ - = +% Quotes--right left double: ' ` " +%"at", "number" "dollar", "percent", "and": @ # $ % & +% "hat", "star", "plus", "tilde": ^ * + ~ +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +[ end of message 041 ] diff --git a/info/digests/tex-implementors/042 b/info/digests/tex-implementors/042 new file mode 100644 index 0000000000..89cfb879cf --- /dev/null +++ b/info/digests/tex-implementors/042 @@ -0,0 +1,1971 @@ +Date: 11 Sep 93 Message No: 042 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: TeX 3.1415 and other updates -- file 2 of 2 + + +######################################################################## + +Commentary from Don Knuth + +>>> DEK message accompanying shipment + [ received 6 Jun 93 ] + +Barbara, I don't know when (if ever) you plan to put out another +supplement to TUGboat containing TeX errata. But I did make some +changes to errata.tex that you should know about: + + New file errata.eight contains the changes subsequent to + errata.seven that are in the "final" publication form of + Volumes A-E (and the TeXbook and MFbook paperback variants). + + Henceforth errata.tex contains the changes subsequent to the + final versions. The final versions will not be updated in + future printings. But I will keep my electronic copies up + to date in preparation for future electronic publication. + +Plain format 3.1415 includes two inportant changes regarding the \b +accent in slanted fonts and the \upbracefill \downbracefill macros. + +Please encourage everybody to install this version ASAP. It is +documented in errata.tex; five pages of the TeXbook are slightly +affected, but (as I say) the hardcopy versions will no longer be +updated. + +Similarly everybody needs plain.mf version 2.71 (it has two important +corrections to the cutdraw macro). + + don + +encl: errata.tex + errata.eight + +************************************************************************ + +>>> TeXbook / MFbook bugs + +Date: 26 Jan 1993 18:19:09 +0100 +From: Roegel Denis +Cc: roegel@pandore.loria.fr +Subject: bug in TeXbook + +Mrs Beaton, + +I noticed a few weeks ago that you have the privilege to +report bugs to the Grand Wizard. Here is a small one that +appears in my printed edition of volume A (tenth printing) +as well as in the files dated may 1991: + +page 320, answer to exercise 17.12: there is either a parenthesis +too much or one lacking. +[ dek: $2.56 +] + +Denis (roegel@loria.fr) +------- + +[ the following are in consequence of repagination; a paragraph that + was formerly broken between pp.271-272 is now complete on p.271. + it is certain that other index items are involved as well. +] +[ dek: +] +Date: 19 Feb 1993 12:21:42 +0100 +From: Roegel Denis +Subject: TeXbook bugs (cont'ed) ? + +Mrs Beeton, + +Yesterday, when I was reading in the TeXbook the entries related to +\mathchardef, I found that there are two slightly wrong entries in +the index, viz., + + On page 471, \mathchardef points to page 272, but I think 271 was meant. + + The same problem happens for \chardef: 272 instead of 271. +[ dek: $2.56 +] +Well, that's all! + +Denis (roegel@loria.fr) +------- + +Date: Thu, 09 Apr 92 00:16:21 BST +From: Chris Thompson +To: Barbara Beeton +Cc: Robert Hunt +Subject: TeXbook (chapter 26) error from Robert Hunt + +Barbara, + +Here is a TeXbook bug report from Robert Hunt: + +> (a) TeXbook error: chapter 26 ("Summary of Math Mode") claims that +> \unhbox is an invalid command (and so generates an error) in maths +> mode. In fact, it is allowed so long as the box being unboxed is void! +> (The \S and \P macros make use of this fact.) + +This is right, I think. \unhbox and \unhcopy are not mentioned in +Chapter 26, explicitly or implicitly, in the current texbook.tex, +and so would fall into the "none of the above" on page 293. But they +are in fact allowed in math mode provided the box register is void +[ dek: $2.56 +] +(tex.web section 1110, |unpackage|: this case is actually mentioned as +change 232 in tex82.bug, TeX version 0.999). The fact that \leavevmode +is allowed in math mode (doing nothing) depends on this. (It is called +from \S and \P, hence Robert's mention of them above.) + +Chris Thompson +------- + +Date: 3 Feb 1993 09:58:52 GMT +From: schwab@lamothe.informatik.uni-dortmund.de (Andreas Schwab) +To: tex-news@SHSU.EDU +Subject: Typesetting bugs in The TeXbook and The METAFONTbook + +There are some typesetting bugs in The TeXbook (March 1992) and The +METAFONTbook (February 1992): + +1. In the last line of page 358 in The TeXbook there is too much space +between `that' and `give'. +[ dek: (and it talks about "the proper spacing"!) $2.56 +] +2. In the middle of page 296 in The METAFONTbook there is one comma +too much after `tension 4..'. +[ dek: $2.56 +] +3. Likewise in The METAFONTbook, on page 299, second text line, the +name `Bernshte\u\in' is misspelled. I don't know the correct +spelling, but `Bernshtein' occurs three times and `Bernstein' only two +times. On the other hand, one of the occurences of the latter form is +in the index... +[ dek: His name usually transliterated with just ...stein but when + I'm transliterating an original Russian mane I aim to be + consistently sh for {\cyr sh}. The recent printings have + this corrected. +] + +--- texbook.tex~ Wed Mar 25 20:40:20 1992 ++++ texbook.tex Fri Jan 1 20:07:40 1993 +@@ -20089,5 +20089,5 @@ + After defining characters ^|\ldotp| and ^|\cdotp| that act as math + punctuation, it is easy to define ^|\ldots| and ^|\cdots| macros that +-\vadjust{\penalty-50} % fairly good breakpoint (on July 27, 1983) ++\vadjust{\penalty-50}% fairly good breakpoint (on July 27, 1983) + give the proper spacing in most circumstances. Vertical and diagonal + dots (^|\vdots| and ^|\ddots|) are also provided here: +--- mfbook.tex~ Wed Mar 25 20:17:08 1992 ++++ mfbook.tex Fri Jan 1 18:00:58 1993 +@@ -15944,5 +15944,5 @@ + With slight changes to this code, you can get weird effects. + For example, if the definition of |rp| is changed to `|]..tension 4..|', +-^^{tension}, and if `|scaled|~|5pt|' is inserted before `|withweight|', ++^^{tension} and if `|scaled|~|5pt|' is inserted before `|withweight|', + the image will be an ``^{almost digitized}'' character: + \displayfig Daa (18.5mm) +@@ -16099,5 +16099,5 @@ + (1-t)^{n-k}t^{k-1}u_k,$ + \enddisplay +-a Bernste{\u\i}n polynomial of order $n-1$.) ++a Bernshte{\u\i}n polynomial of order $n-1$.) + + Our problem is to change the meaning of \MF's ^{brackets} so that +-- +Andreas Schwab +schwab@ls5.informatik.uni-dortmund.de +------- + +[ these may already have been sent, but i can't find them quickly. ] +Date: 23 Feb 1993 20:17:58 +0100 (MEZ) +From: Joachim Schrod +Subject: errors in TeXbook + +Hi barbara, + +isn't this the time DEK works on TeX again? Have you forwarded him +the following errors/problems, which I mentioned to you a year ago? +(All apply to the Oct 89 edition, 9th hardcover printing.) + + ---------------------------------------------------------------------- + +On p.368 it is specified: ``After ^^ TeX simply adds or subtracts '100 +from the character immediately following.'' The example is given with +^^j. Aren't lowercase letters in the range a-f and digits forbidden +due to the new hex input of chars >"7f ? +[ dek: Page 368 is correct (but not complete). Page 370 likewise. + Also you can et p with ^^0 if no hex digit follows (but the + full rules are on p47) +] + + ---------------------------------------------------------------------- + +On p.226 it is mentioned that two whatsit-nodes are realized as +extensions to TeX. \language is the third. +[ dek: Again, page 226 does not claim "two and only two". Page 455 + mentions the other case. (I've changed the index entry for + whatsit, so you win $2.56 for that) p481 +] + + ---------------------------------------------------------------------- + +Exercise 8.7 is printed twice. +[ dek: (Known) +] + +This should be mentioned against AW, not against DEK. It's obviously a +printer's error. +[ dek: Well, I didn't communicate successfully enough or check it + well enough +] + + ---------------------------------------------------------------------- + +Joachim + +************************************************************************ + +>>> The TeX program + + +++ Comments at the top of tex.web / mf.web + +Date: Mon, 23 Mar 92 18:04:08 GMT +From: Chris Thompson +Subject: A small oversight in MF.WEB 2.71 + +Barbara, + + Line 23 of mf/mf.web at labrea (i.e. the new official MF 2.71) reads + +% Version 2.71 fixed bug in draw, allowed unprintable filenames (not yet released). + +I imagine Don forgot to update it when making 2.7a into 2.71 (they are +identical apart from the banner change)! Perhaps someone could draw his +attention to this. + +Chris Thompson +JANET: cet1@uk.ac.cam.phx +Internet: cet1@phx.cam.ac.uk +------- +(reply, 23 Mar 1992) +chris, +i noticed that too. similarly in tex.web, in that the date given +is september '91. +------- + + ---------------------------------------------------------------------- + + +++ Changes in kerning in 3.141 + +Date: Thu, 19 Mar 92 15:55:26 GMT +From: Chris Thompson +To: Barbara Beeton , + Brian {Hamilton Kelly} +Subject: Bug (?) report on TeX 3.141 by Wayne Sullivan + +I have received the following message from Wayne. I am not in a +position to do *any* testing for the next few days, but it sounds +as though he's saying that the bug in TeX 3.14a hasn't been entirely +stopped up in TeX 3.141 (although it did seem to be in 3.14b). Can +anyone check? + +> Accepted: 15:25:12 19 Mar 92 +> Submitted: 15:04:28 19 Mar 92 +> IPMessageId: -unspecified- +> From: "Wayne G. Sullivan" +> To: Chris Thompson +> Subject: TeX 3.141 +> +> I got the WEB file for 3.141 and adapted my MS-DOS CHG file: The resulting +> EXE's give no problem with the TRIP test, but as a extra check, I ran off +> my test version of TEXMAN. The DVI file produced by my 3.141 that of +> an '89 version differs at only one point: the index entry for `box memory,'. +> The new version has a kern between the `y' and ',' as there should be for +> cmr8. However, Knuth has made the comma active for the index so that the +> usual inner loop does not insert kerns (there are several instances of +> `y,'). The new DVI file only inserts one kern. Is there something in the +> new mechanism that could cause the tokens to be rescanned in this single +> case so that a kern is inserted? The full entry in the index is +> +> box memory, 300, 394. +> +> Of course it could be a bug in my new version, but it is hard to see how +> it could cause something like this to happen. +> Wayne Sullivan + +Chris Thompson +Cambridge University Computing Service +JANET: cet1@uk.ac.cam.phx +Internet: cet1@phx.cam.ac.uk +------- +Date: Fri, 20 MAR 92 18:35:49 GMT +Reply-to: Brian {Hamilton Kelly} +From: TEX@rmcs.cranfield.ac.uk +Subject: RE: TeX 3.141 + +In a message to BHK of Fri, 20 Mar 92 13:03:51 GMT, +"Wayne G. Sullivan" wrote: + +> In testing an MS-DOS version of TeX 3.141, I noticed an example where +> the DVI file produced by 3.141 differs from that produced by 3.14. The +> test file I used is over 1 Mbyte, but I have been able to produce the +> same problem in a much smaller file. I thought Knuth always tried to +> make upgrades of TeX downward compatible, so 3.14 and 3.141 should +> not yield different DVI files in this case. It is possible that the +> difference is due to something I have done to my CHG file -- but the +> CHG files for 3.14 and 3.141 are nearly the same. Could you check to see +> whether your VAX versions of TeX produce different DVI files for +> the input file included below? +> +> %% 3.141 DVI file includes a kern between `y' and `,' in `memory,' +> %% but not in `display,' . +> %% 3.14 DVI file does not have a kern in either case. +> +> \let\comma=,% +> \let\period=.% +> \raggedright \tolerance=5000 \hbadness=5000 \parfillskip 0pt plus 3em +> \hsize=17.5pc +> \catcode`\,=\active \def,{\tenrm\comma} +> \catcode`\.=\active \def.{\tenrm\period\par\hangindent 2em } +> \parindent0pt\relax +> box display, 66, 75, 79, 158--159, 302, 455. +> box memory, 300, 394. +> \bye + +I can confirm this phenomenon: moreover, the additional kern first +appears at V3.14a, and is also present in V3.14b. Goodness alone knows +why just this one manifestation occurs in such a huge test file. The +point is: should DEK fix it? + +Brian +PS My mailer ain't very clever: this was REPLYed to Wayne, and copied to +bnb and Chris Thompson +------- +Date: Sun, 22 Mar 92 02:23:46 GMT +From: CET1@phx.cam.ac.uk +To: tex-implementors@MATH.AMS.COM +Cc: Wayne Sullivan , + Brian {Hamilton Kelly} , Barbara Beeton +Subject: A feature(?) of TeX 3.141 discovered by Wayne Sullivan + +Wayne Sullivan has discovered a situation in which TeX 3.141 gives +different character spacing from TeX 3.14. I think it is probably a +`feature', but maybe it is a `bug': read the following and judge for +yourselves. The change was in fact already present in the alpha test +versions 3.14a and 3.14b, but Brian and I failed to discover it. + +Here is Wayne's original report to me + +> I got the WEB file for 3.141 and adapted my MS-DOS CHG file: The +> resulting EXE's give no problem with the TRIP test, but as a extra +> check, I ran off my test version of TEXMAN. The DVI file produced by +> my 3.141 that of an '89 version differs at only one point: the index +> entry for `box memory,'. The new version has a kern between the `y' +> and ',' as there should be for cmr8. However, Knuth has made the comma +> active for the index so that the usual inner loop does not insert +> kerns (there are several instances of `y,'). The new DVI file only +> inserts one kern. Is there something in the new mechanism that could +> cause the tokens to be rescanned in this single case so that a kern is +> inserted? The full entry in the index is +> +> box memory, 300, 394. +> +> Of course it could be a bug in my new version, but it is hard to see +> how it could cause something like this to happen. + +and later he provided the following stripped down test case + +> Yet a simpler file displaying the problem. With 3.141 one `y,' has no +> kern (display,) while the other does (memory,). 3.14 has no kern for +> both cases. +> +> \let\comma=,% +> \let\period=.% +> \raggedright \tolerance=5000 \hbadness=5000 \parfillskip 0pt plus 3em +> \hsize=17.5pc +> \catcode`\,=\active \def,{\tenrm\comma} +> \catcode`\.=\active \def.{\tenrm\period\par\hangindent 2em } +> \parindent0pt\relax +> box display, 66, 75, 79, 158--159, 302, 455. +> box memory, 300, 394. +> \bye + +The fact that the comma is active is significant only in that it +generates a "\tenrm" between the "y" and the ",". This causes TeX +(in |main_control|) to think they are in separate words and so the +usual implicit kern doesn't get generated. There is no change here +in TeX 3.141. + +In TeX 3.14 and earlier, if automatic hyphenation was later applied +to the horizontal list, no change was made here. In TeX 3.141, however, +automatic hyphenation re-asseses the relationship between the last +letter of the word and subsequent punctuation, and reinserts the +implicit kern. (TeX 3.141 has changes in this area to fix bugs +associated with right boundary characters, discovered by Brian HK.) +The effect can be demonstrated by a simple test: + + % TeX 3.141 (3.14a,3.14b) test following Wayne Sullivan. + \ Display\tenrm,\par + \ Display{}.\par + \pretolerance=-1 % now force a hyphenation pass + \ Display\tenrm,\par + \ Display{}.\par + \showboxbreadth=255 \showboxdepth=255 \showlists + \bye + +In TeX 3.14 the kerns never reappear, in TeX 3.141 they reappear just +in the last two cases. + +Note: I am relying on Wayne and Brian in saying that the effect happens +in TeX 3.141; at the moment I only have 3.14a and 3.14b available. But +I don't believe there is any significant change between 3.14b and 3.141. + +Of course, we are used to the fact that TeX's automatic hyphenation +recalculates ligatures and implicit kerns within a word. We know that +it is not sufficient to write `shelf{}ful', but that we must must use +`shelf\/ful' (say) instead. The change in TeX 3.141 extends this state +of affairs slightly. So: `feature' or `bug' ? +[ dek: ^^^^^^^ + Chris' explanation is lucid and correct, as usual. But nobody + has explained why TeX would try hyphenation for `box memory' + (the short line) _rather_ than `box display' (the long line)! + The reason is that the index is typeset with special parfillskip + that tries to avoid short last lines. So `box display' turns + out to meet pretolerance but `box memory' doesn't. Even more + interesting is the index entry `beauty, 1.' which spectacularly + fails to meet pretolerance [badness 2913] yet it does _not_ + gain a kern. The reason is that TeX finds no hyphenation points + in `beauty' so does not bother reconstructing its kerns. + [Please communicate this to Chris and the others. By the way, + shelf\-ful is better than shelf\/ful on two counts: (1) it + hyphenates; (2) it works in italics.] +] + +Chris Thompson +Cambridge University Computing Service +JANET: cet1@uk.ac.cam.phx +Internet: cet1@phx.cam.ac.uk +------- +Date: Sun, 22 Mar 1992 22:42 GMT +0100 +From: Frank Mittelbach +To: CET1@PHX.CAM.AC.UK, BNB@MATH.AMS.COM, WSULIVAN%IRLEARN.BITNET@vm.gmd.de, + TEX@RMCS.CRANFIELD.AC.UK +Subject: Re: bug or feature in 3.141 + +> Note: I am relying on Wayne and Brian in saying that the effect happens +> in TeX 3.141; at the moment I only have 3.14a and 3.14b available. But +> I don't believe there is any significant change between 3.14b and 3.141. + +I checked that the effect doesn't happen with 3.14 as distributed by +ArborText so it was most certainly introduced with the last changes. + +> Of course, we are used to the fact that TeX's automatic hyphenation +> recalculates ligatures and implicit kerns within a word. We know that +> it is not sufficient to write `shelf{}ful', but that we must must use +> `shelf\/ful' (say) instead. The change in TeX 3.141 extends this state +> of affairs slightly. So: `feature' or `bug' ? + +I would vote for feature, not that I like this particular one :-) but +the new behavior seems in my eyes more consistent then TeX's behavior +before. The whole area of loosing information when reconstructing the +horizontal list after hyphenation is something I think is a +(mis)feature since it depends on side effects of other areas. + +When one like to call this a bug then only in the respect that \tenrm +interrupts the construction of ligatures or kerns and this fact is not +mentioned in the book (so probably $2.56 :-) or is it? +[ dek: ^^^^^ it is (page 286) +] + +Frank + + ---------------------------------------------------------------------- + + +++ \language and \setlanguage + +Date: 16 Jul 1992 15:23:11 -0300 (BST) +From: Chris Thompson +To: Rainer Schoepf +Subject: Re: [\language and \setlanguage -- the story continues] + +Rainer, + + I am copying this reply to Barbara, and for her benefit I will +include your original message here: + +> I've just spent some time tracing down a strange behaviour with +> multiple hyphenation patterns. Have a look a the following simple +> file: +> +> --- +> \language=1 +> +> \scrollmode +> +> \showhyphens{zwischen} +> +> \setbox1=\hbox{B\"ohme Robert,} +> \setbox0=\hbox{Der Lykomide : Tradition und Wandel +> zwischen Orpheus und Homer :} +> +> \hsize=10.2cm +> \vsize=7,8cm +> +> \vbox{\unhbox1 \space\unhbox 0} +> +> \eject +> +> \bye +> --- +> +> The hyphenation patterns inside the \vbox are that of \language=0. +> However, if I put one character at the very beginning of the \vbox, it +> uses \language=1. +> +> The reason is rather simple: the procedure new_graf sets the variable +> clang to 0, and it is set to the value of language ony later, when a +> character is contributed to the current list. \unhbox does not change +> the value clang. Of course, I can get around it using \setlanguage. +[ dek: and \everybox +] +> +> I think this is a bug, since \setlanguage should only be needed when +> working with more than one language. I think new_graf should initialize +> clang to the current value of \language. What do you think? + +There is no doubt that the current setup gives favoured treatment to +the \language=0 case. However it certainly wouldn't be right to simply +modify |new_graf| as you suggest. There are three places which have to +be kept consistent: + +Module 891: + The value which |cur_lang| is initialised to. +Module 1091: |new_graf| + The value which |clang| is initialised to. +Module 1200: |resume_after_display| + The value which |clang| is initialised to. +[ dek: and consistent with TeXbook p455 on which people have been + told they can rely. However, I guess the rule makes absolutely + no difference in any reasonable application, so i have a chance + to change page 455. +] + +Currently all the initialisations are zero, and therefore consistent. +If modules 1091 and 1200 were to use the value of \language, then this +value has to be remembered somewhere so that module 891 can use it +(clearly the value of \language when module 891 comes to execute +is not what is wanted). Note that the values of \lefthyphenmin and +\righthyphenmin have to be remembered in the vertical mode |nest| entry +*below* the |nest| entry for the paragraph itself, as the latter no +longer exists when module 891 executes. + +A possible line to take would be that whenever unrestricted horizontal +mode is started (modules 1091 and 1200), a \setlanguage whatsit should +be automatically generated if \language is non-zero. This would make +these values more like first-class citizens: one could view the special +arrangements for remembering \lefthyphenmin and \righthyphenmin +in |nest| as merely an optimisation for the common case when \language +is zero. But there are potential problems with this: for example, is +the whatsit to be inserted before or after the \everypar tokens are +scanned? If before, the \everypar{\setbox0=\lastbox} mechanism will +no longer work: if after, what if the \everypar does something like +your \unhbox'ing? + +Whatever Don may want to do about the above, I think the following is +definitely a bug: + +> \language=0 % throughout +> \hsize=1in +> \tracingparagraphs=\maxdimen +> +> \lefthyphenmin=1 \righthyphenmin=1 +> This is the moment in time for all good men, +> \lefthyphenmin=2 \righthyphenmin=3 \setlanguage\language +> to come to the assistance of the party. +> $$ x\sp n+y\sp n \ne z\sp n $$ +> as Pierre Fermat announced to all and sundry, although he +> couldn't fit the proof into his margin. +> +> \bye + +The text after the displayed equation reverts to being hyphenated +with (left,right)hyphenmin=(1,1), even though that immediately before +the equation has (2,3). This is because |resume_after_display| in +module 1200 doesn't set |lhmin| & |rhmin| in the way that module 1091 +does, but instead leaves the values set by the original |new_graf|. +I think this is just wrong, even though changing \{left,right}hyphenmin +without changing \language is, perhaps, a rather unusual thing to do. +[ dek: True; I shall have to fix this in 3.415 $20.48 + And then I have to essentially contradict page 455 because + I'm resetting clang to 0 after every displayed equation, not + only at beginning of paragraph. So the rules stated in + TeXbook are faulty. +] + +Chris Thompson +Cambridge University Computing Service +JANET: cet1@uk.ac.cam.phx +Internet: cet1@phx.cam.ac.uk +------- +Date: 16 Jul 1992 17:48:17 +0200 +From: schoepf@sc.ZIB-Berlin.DE (Rainer Schoepf) +To: Chris Thompson +Subject: Re: [\language and \setlanguage -- the story continues] + +Chris, + +(A copy of this message goes to Barbara.) + + > There is no doubt that the current setup gives favoured treatment to + > the \language=0 case. However it certainly wouldn't be right to simply + > modify |new_graf| as you suggest. There are three places which have to + > be kept consistent: + > + > Module 891: + > The value which |cur_lang| is initialised to. + > Module 1091: |new_graf| + > The value which |clang| is initialised to. + > Module 1200: |resume_after_display| + > The value which |clang| is initialised to. + > + > Currently all the initialisations are zero, and therefore consistent. + +I agree that they are consistent with each other but, in my opinion, +not consistent with the setting of language. The conclusion is that +you cannot globally set language to a value different from 0, since +TeX will sometimes use the hyphenation patterns for language 0. +[ dek: The intent was to have language 0 be the user's "global" + language [not to have it be English]. But I guess this + requires more .fmt files (one for each home language) +] + + > If modules 1091 and 1200 were to use the value of \language, then this + > value has to be remembered somewhere so that module 891 can use it + > (clearly the value of \language when module 891 comes to execute + > is not what is wanted). Note that the values of \lefthyphenmin and + > \righthyphenmin have to be remembered in the vertical mode |nest| entry + > *below* the |nest| entry for the paragraph itself, as the latter no + > longer exists when module 891 executes. + +I'd argue that cur_lang should be set to the value of language that +was in effect at the beginning of the paragraph. I haven't thought +this completely through yet, but wouldn't it be just sufficient to set +cur_lang to clang in module 891? When this code is executed, the +semantic nest has already been popped, so that clang is the value that +was in effect just before the call to new_graf. On the other hand, if +there was a change to \language in between, then a setlanguage whatsit +will be present, and cur_lang be set appropriately. + + Rainer Schoepf + Konrad-Zuse-Zentrum ,,Ich mag es nicht, wenn + fuer Informationstechnik Berlin sich die Dinge so frueh + Heilbronner Strasse 10 am Morgen schon so + W-1000 Berlin 31 dynamisch entwickeln!'' + Federal Republic of Germany + or +------- +Date: 17 Jul 1992 14:38:53 -0300 (BST) +From: Chris Thompson +To: Rainer Schoepf +Subject: Re: [\language and \setlanguage -- the story continues] + +Rainer (& Barbara), + +> I agree that they are consistent with each other but, in my opinion, +> not consistent with the setting of language. The conclusion is that +> you cannot globally set language to a value different from 0, since +[ dek:^^^^^^^^^^^^^^^ + you can just say \everyhbox{\setlanguage 1} + (Agreed that this is not 100% efficient!) +] +> TeX will sometimes use the hyphenation patterns for language 0. + +I wasn't saying (I think) that they shouldn't be changed, just that +they need to be changed consistently. + +> I'd argue that cur_lang should be set to the value of language that +> was in effect at the beginning of the paragraph. I haven't thought +> this completely through yet, but wouldn't it be just sufficient to set +> cur_lang to clang in module 891? When this code is executed, the +> semantic nest has already been popped, so that clang is the value that +> was in effect just before the call to new_graf. On the other hand, if +> there was a change to \language in between, then a setlanguage whatsit +> will be present, and cur_lang be set appropriately. + +No, this is confused. |clang| is part of the |aux| field in a |nest| +entry, and is only defined when the mode is horizontal. The current +mode is vertical when module 891 is executing. Notice how |lhmin| and +|rhmin| are set *before* the |push_nest| in |new_graf|, while |clang| +is set *after*. + +The |lhmin| and |rhmin| fields exist in every |nest| entry (although +only used in a few). It would be perfectly possible to add a new field +to the structure to save the initial \language value, in the same way: +this would be the cleanest thing to do and I should have mentioned it. +But it would mean increasing the size of each |list_state_record|. + + --- Pause --- + +Ah ha! There is something one could do to achieve this effect *without* +increasing the size of |list_state_record|, and indeed reclaiming the +2 quarterwords |lhmin| and |rhmin| that were added to it in TeX 3.0. The +|prev_graf| field exists in all |nest| entries but contains meaningful +information only for those with vertical mode. Use a redefinition of +this field for the unrestricted horizontal mode entry to hold the +*initial* values of \lefthyphenmin, \righthyphenmin, *and* \language +in |new_graf| and |resume_after_display|; they would fit easily enough. +Then break the values out into local variables in |line_break| *before* +the |pop_nest| (module 816), so that they are available to module 891. + +I rather like this scheme. + +Chris Thompson +Cambridge University Computing Service +JANET: cet1@uk.ac.cam.phx +Internet: cet1@phx.cam.ac.uk +------- +[ dek: OK, it's in. + No advantage to the old rule and no reason to assume anybody + made use of it in ways that are incompatible with the new one. +] + + ---------------------------------------------------------------------- + + +++ Cramped style inconsistencies + +[ i forwarded this to chris thompson, but received no reply. ] +Date: 17 Sep 1992 14:06:57 -0400 (EDT) +From: herschor@math.mcgill.ca (Michael Herschorn) +To: BNB@MATH.AMS.ORG +Subject: Is it a bug? + +On July 21 I sent the appended lengthy submission to Info-Tex, and +it was automatically posted to comp.text.tex on the net. (Because of +its length, I do not use the standard quotation indicators.) + +I have received no comments; maybe that's because it's much ado +about not very much. (Since I'm a relative newcomer to TeX, it may also +be because I'm totally "off-track".) Nevertheless, there's at least one +part of the submission that you are best placed to give an opinion on. It +reads: + +: (I also haven't come across any discussion of a "feature" which turns +: cramping off, viz., prefix the material which TeX would normally +: cramp by an explicit style reminder. Compare, for example, +: $\sqrt{X^2+Y^2}$ with $\sqrt{\textstyle X^2+Y^2}$. However, I doubt +: that this is an intended feature since: +: i) TeX is normally insensitive to redundant style commands, and from +: the user's point of view, this is the way it should be; and, +: ii) cramping will be turned off in midstream by an explicit style +: command (e.g., $\sqrt{X^2+\textstyle Y^2} has X^2 in cramped style +: and Y^2 in uncramped style). +: I am completely out of my depth when it comes to understanding the +: details of The Program, and please, no flames (not even for the +: mixing of metaphors!), but it seems to me that this "feature" +: is a result of the cramped_style calculation in section 702 of The +: Program being ignored while section 703 updates only size-dependent +: quantities. +: Although I reserve my rights to priority for the "finder's fee" +: mentioned in the Preface to The Program, I would like to hear the +: opinions of gurus on the net.) + +I would greatly appreciate your comments on these paragraphs, and if +you care to, on the rest of the posting. + +Michael Herschorn + +[ dek: TeX should have had a primitive something like `\cramp' to force + a cramped style, but it's too late now. TeX shouldn't preserve + crampedness when \textstyle comes along because then there's + no way to override it... well I guess one could use \hbox but + again it is too late to make changes. +] + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% +%% July 21, 1992 Posting +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +Newsgroups: comp.text.tex +Date: Tue, 21 Jul 92 12:25:00 EDT +Organization: Info-Tex<==>Comp.Text.Tex Gateway +From: herschor@math.mcgill.ca (Michael Herschorn) +Subject: CRAMPED STYLES & solution to:fraction spacing default_rule_thickness. +Lines: 374 + + At the end of this submission you will find a solution to the + problem relating to the minimum separation between the numerator or + denominator of a fraction and the fraction bar, a question raised and + discussed in several postings last month. I would like + to begin with a more general problem which provides the tool + used for that solution. + + PART ONE: + + To measure typeset text from a math list in TeX, the material is + placed in an \hbox. One must then specify the style of + the text's "free state" inside the box. The horizontal dimension in + the free state is affected by "actions at infinity" (glue) and is + intrinsically uncertain; the height and depth are determined + "quasi-locally", and are fixed once TeX decides on the current style. + However, if an item is to be set in a cramped style, absent a TeX + command \cramp{}, how does one measure its height and depth? + + I have also felt a need for \cramp for aesthetic reasons when there + is a repetition of an expression close by the original in a line of + text, once in +an uncramped style, and once in the corresponding + cramped style. As well, there is a not insignificant amount of space + that can be saved in a document with multiple occurrences of, e.g., + ${\x}^{{\x}^{{\x}^{\cdot^{\cdot^{\cdot^{\x}}}}}}$, if this could + be set in a cramped style. +[ dek: For such a document I would fiddle with parameter \sigma_14 +] + + I have most of the standard TeX references, but I haven't come across + any mention of the possibility of obtaining a cramped style "on + demand". Thus there may be some general interest in the preliminary + version of my macro, and I append it below. + + (I also haven't come across any discussion of a "feature" which turns + cramping off, viz., prefix the material which TeX would normally + cramp by an explicit style reminder. Compare, for example, + $\sqrt{X^2+Y^2}$ with $\sqrt{\textstyle X^2+Y^2}$. However, I doubt + that this is an intended feature since: +[ dek: It is "intended" in the sense that it is rule 3 on page 442 +] + i) TeX is normally insensitive to redundant style commands, and from + the user's point of view, this is the way it should be; and, + ii) cramping will be turned off in midstream by an explicit style + command (e.g., $\sqrt{X^2+\textstyle Y^2} has X^2 in cramped style + and Y^2 in uncramped style). + I am completely out of my depth when it comes to understanding the + details of The Program, and please, no flames (not even for the + mixing of metaphors!), but it seems to me that this "feature" + is a result of the cramped_style calculation in section 702 of The + Program being ignored while section 703 updates only size-dependent + quantities. + Although I reserve my rights to priority for the "finder's fee" + mentioned in the Preface to The Program, I would like to hear the + opinions of gurus on the net.) + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% cramped.sty Preliminary version July 21,1992 +% +% Enables the typesetting of material in the cramped styles +% D', T', S' and SS'. +% +% \cramp{} will set in the cramped version C' of +% the current style C. +% +% \Cramp{\...style}{} (where you specify the current style) +% has been left accessible. +% +% +% Author: Michael Herschorn +% Departmentof Mathematics and Statistics +% McGill University +% 805 Sherbrooke Street West Phone: 514-398-3825 +% Montreal QC CANADA H3A 2K6 FAX: 514-398-3899 +% email: herschor@gauss.math.mcgill.ca +% +% Please email me your comments and suggestions as well as informing +% me directly of any bugs you may find. +% +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\catcode`@=11 +\def\cramp{\mathpalette\Cramp}% +\def\Cramp#1#2{\setbox0=\hbox{$\m@th#1\cr@mp{#2}$} +% [ dek: As an alternative, you could reset \nulldelimiterspace here +% ] + \Ch@p#1 \dimen2=\the\ht0 \advance\dimen2 -\dimen0 + \ht0=\the\dimen2 \box0} +\def\cr@mp{\kern-\the\nulldelimiterspace\radical"380380}% +% [ dek: ^^^^^^^ +% nonexistent characters; better to say \radical 0 +% ] +\def\Ch@p#1{\ifx#1\displaystyle + \dimen0=\the\fontdimen5\textfont2 + \advance\dimen0 -.75\dimen0 +% [ dek: why not say \dimen0=.25\fontdimen5\textfont2 +% ] + \advance\dimen0\the\fontdimen8\textfont3 + \else +%% \ifx#1\textstyle + \dimen0=\the\fontdimen8\textfont3 + \advance\dimen0 .25\dimen0 + \fi}%%%%%%%%% If you have "variations" in family 3, +%%%%%% comment out the preceding line and "uncomment" +%%%%%% the 7 lines beginning with "%%". +%% \else +%% \ifx#1\scriptstyle\dimen0=\the\fontdimen8\scriptfont3 +%% \advance\dimen0 .25\dimen0 +%% \else \dimen0=\the\fontdimen8\scriptscriptfont3 +%% \advance\dimen0 .25\dimen0 +%% \fi\fi\fi} +\catcode`@=12 +\endinput +%% +% end of file cramped.sty +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +[ dek: The same idea + but using TeX more fluently: + \def\Cramp#1#2{\setbox0=\hbox{\nulldelimiterspace=\z@ + @\m@th#1\radical0{#2}$}% + \ifx#1\displaystyle + \dimen0=\fontdimen8\textfont3 + \advance\dimen0 .25\fontdimen5\textfont2 + \else \dimen0=1.25\fontdimen8 + \ifx#1\textstyle\textfont + \else\ifx#1\scriptstyle\scriptfont\else\scriptscriptfont + \fi\fi 3 \fi + \advance\dimen0-\ht0 \ht0=-\dimen0 \box0 \relax} + + (He uses \the' unnecessarily and doesn't factor \if...\fi) + + This works. (worth publishing in TUGboat) + ---- + Note that \cramp{x^{\cramp{y^2}}} + causes TeX to typeset y^2 16 times! + The same is true whenever a \mathpalette is inside a \mathpalette +] + + + PART TWO: + + Michael Downes (22 Jun 1992, Info-TeX@shsu.edu) + wrote: + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++Dan Luecking wrote (19 Jun 1992, Info-TeX@shsu.edu): ++ ++> Michael Barr posted a query a while back about the separation ++> between the numerator/denominator of a fraction and the fraction bar. ++> ++> I have not seen a response, so having tried to understand the ++> TeXbook on this point and made some headway in doing so I thought ++> I might discuss the problem. ++ ++> ... I have run into it several times and would like to know if ++> anyone has defined a fraction making command to deal with it. One ++> way is to insert a 0 width rule extending below the numerator and ++> above the denominator, but I do not see a good way to make this ++> automatic. A way I have considered, but rejected, is to increase the +[ dek: clever thought +] ++> relevant parameter, (something like \fontdimen8\textfont3=1pt ++> instead of 0.4pt) and then define all \frac's using \above (in which ++> the thickness of the rule is explicitly given). The problem is that ++> default_rule_thickness is used in several internal calculations +[ dek: \overline is screwed up but could be handled as special kind + of \radical (with new font)! +] ++> including the positioning of sub/superscripts. +[ dek: rule 18e, not too bad if increased +] ++> ++> Does anybody have anything to say about this? ++ ++ I have observed the same problem in Amer. Math. Soc. publications, ++ although the examples I've happened to notice involved letters with ++ descenders such as p and q, rather than vertical bars. Your analysis ++ of the problem corresponds closely to what I found in some cursory ++ investigations. ++ ++ The problem seems to be slightly worse than you suggest---or maybe you ++ just didn't bother to amplify on results of your experiments: The most ++ significant drawback of the rejected solution of setting \fontdimen 8 ++ \textfont 3 to a larger value and using \above instead of \over is ++ not the internal calculations you mention but the fact that the fraction ++ bar thickness and the space around it are always dependent, even in ++ \above, so that if we say $1\above.4pt 2$ the space around the ++ fraction bar is calculated from the .4pt, not from \fontdimen 8 of ++ \textfont 3, and we're back where we started from. +[ dek: Oh, right! +] ++ ++> ... Is it worthwhile suggesting ++> that a major macro package try do something about it? Have any done ++> anything? ++ ++ If my understanding of the problem is correct, it's impossible for a ++ macro package to provide any reasonable solution. The only reasonable ++ solution is to change TeX, the program. (And my definition of ++ `reasonable' is pretty extreme when it comes to macro writing; I have ++ done or contemplated doing things at the macro level that any ++ `reasonable' programmer would consider unreasonable.) ++ ++> Is there any real problem at higher resolutions (i.e., does ++> everything look OK printed at 1000dpi)? ++ ++ In my opinion, there is not enough space around the fraction bar in ++ the problematic combinations (textstyle fractions, vertical bars, ++ letters with descenders), even at high resolution. I'd rather have ++ some control to adjust the space slightly. +[ dek: For these you are probably best off tuning the \sigma's... + although it's probably OK to teach keyboarders what I actually + do [see next comment] +] ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + The Grand Wizard made his design choices a.e. optimally, and I would + stick with his implementation of 15d in Appendix G of The TeXbook. + Apparent differences between the letter-base levels in the numerators + and in the denominators of fractions in the same line spoil the + appearance of the line; shifting the numerator up or the denominator + down in a fraction with adequate clearance so as to match the letter- + base levels of another fraction in the line introduces ugly white +[ dek: I am occasionally unhappy with fractions, much more often + unhappy with \root's, and guilty of overlooking several + fontdimens in false belief that I was getting more + unity/elegance. So I occasionally use ^{\mathstrut} in + denominators (or superscripts therein), often in \root's, + _{\mathstrut} in numerators (or subscripts therein). +] + space. The more I understand the problem, the better I like the GW's + balancing act. + + Nevertheless, as pointed out by Dan Luecking, Berthold K.P. Horn and + Michael Downes, it would have been nice to have a free parameter to + adjust in special circumstances. ("Just so you shouldn't need to + use it", as the Yiddish expression puts it.) + + Once we have , it becomes a simple hack to solve this + problem (and other similar ones). I wrote (and attach a copy of) + as an illustration. (The coding is not elegant, + but it works.) It should be used only when absolutely necessary, + and even then, it should be used sparingly. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% spreadfraction.sty Preliminary version July 21,1992 +% +% If used in a non-cramped context, \xfrac{#1}{#2}{#3} produces +% {#1\over #2} exactly as TeX would, except that the minimum clearance +% that will be tolerated between the numerator or denominator of this +% fraction and the bar line is #3 times the default rule thickness. +% (See Rule 15d in Appendix G of The TeXbook. TeX hardwires in +% #3=3 in \displaystyle and #3=1 in the other styles; spreadfraction.sty +% allows the use of arbitrary values. In other words, .phi. is replaced +% by #3 times the default rule thickness, everything else is kept +% constant.) +% +% In a cramped context, i.e., if the entire fraction is a Rad atom +% (under a root sign), an Over atom (from \overline), in the denominator +% of another fraction, is a subscript, or is a superscript to an +% entity in cramped style, \xfracc{#1}{#2}{#3} should be used instead +% of \xfrac{#1}{#2}{#3}. (I may automate the selection of \xfracc in a +% future version; since spreadfraction.sty is intended for touch-up use, +% I don't consider automation a priority (and it may be like putting a +% tiara on a baglady!)). +% +% \Xfrac{\...style}{}{}{} (identical to \xfrac{}{}{}, except +% that you specify the style) and \Xfracc{\...style}{}{}{} (DITTO), +% have been left accessible to the user. +% +% To obtain a version of spreadfraction in which the minimum clearances +% are #3 times the hardwired ones, declare \DEKtrue after inputting +% spreadfraction.sty +% +% +% Author: Michael Herschorn +% Departmentof Mathematics and Statistics +% McGill University +% 805 Sherbrooke Street West Phone: 514-398-3825 +% Montreal QC CANADA H3A 2K6 FAX: 514-398-3899 +% email: herschor@gauss.math.mcgill.ca +% +% Please email me your comments and suggestions as well as informing +% me directly of any bugs you may find. +% +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newif\ifDEK +\input cramped.sty +\catcode`@=11 +\def\xfrac#1#2#3{\M@thpalette\Xfrac{#1}{#2}{#3}} +\def\M@thpalette#1#2#3#4{% + \mathchoice{#1\displaystyle{#2}{#3}{#4}}% + {#1\textstyle{#2}{#3}{#4}}% + {#1\scriptstyle{#2}{#3}{#4}}% + {#1\scriptscriptstyle{#2}{#3}{#4}}} +\def\Xfrac#1#2#3#4{\ifx#1\displaystyle + \def\C@rr@ntF@nt{\textfont} + \let\@djSt@le=\textstyle + \L@rgeS@ze#1{#2}{#3}{#4} + \else + \ifx#1\textstyle \def\C@rr@ntF@nt{\textfont} + \let\@djSt@le=\scriptstyle + \N@rmalS@ze#1{#2}{#3}{#4} + \else + \ifx#1\scriptstyle + \def\C@rr@ntF@nt{\scriptfont} + \let\@djSt@le=\scriptscriptstyle + \N@rmalS@ze#1{#2}{#3}{#4} + \else + \def\C@rr@ntF@nt{\scriptscriptfont} + \let\@djSt@le=\scriptscriptstyle + \N@rmalS@ze#1{#2}{#3}{#4} + \fi + \fi + \fi} +\def\L@rgeS@ze#1#2#3#4{\dimen1=\the\fontdimen8\textfont2 + \dimen2=\the\fontdimen11\textfont2 + \N@mer@tor#1{#2}{#3}{#4}} +\def\N@rmalS@ze#1#2#3#4{% + \dimen1=\the\fontdimen9\C@rr@ntF@nt2 + \dimen2=\the\fontdimen12\C@rr@ntF@nt2 + \N@mer@tor#1{#2}{#3}{#4}} +\def\N@mer@tor#1#2#3#4{% + \dimen3=\the\fontdimen22\C@rr@ntF@nt2 + \dimen4=\the\fontdimen8\C@rr@ntF@nt3 + \dimen5=#4\dimen4 + \ifDEK\ifx#1\displaystyle\advance\dimen5 2\dimen5 + \else + \fi + \else + \fi + \advance\dimen4 -.5\dimen4 + \setbox1=\hbox{$\m@th\@djSt@le{#2}$} + \dimen0=\dimen1 \advance\dimen0 -\the\dp1 + \advance\dimen0 -\dimen3 + \advance\dimen0 -\dimen4 + \ifdim\dimen5>\dimen0 \advance\dimen1 \dimen5 + \advance\dimen1 -\dimen0 + \D@nomin@tor#1{#3} + \else + \D@nomin@tor#1{#3} + \fi} +\def\D@nomin@tor#1#2{% + \setbox2=\hbox{$\m@th + \@djSt@le\Cramp\@djSt@le{#2}$} + \dimen0=\dimen2 \advance\dimen0 \dimen3 + \advance\dimen0 -\the\ht2 + \advance\dimen0 -\dimen4 + \ifdim\dimen5>\dimen0 \advance\dimen2 \dimen5 + \advance\dimen2 -\dimen0 \Qu@ti@nt#1 + \else + \Qu@ti@nt#1 + \fi} +\def\Qu@ti@nt#1{% + \ifdim\wd1<\wd2 \dimen9=\the\wd2 + \setbox3=\hbox to \the\dimen9{% + $\m@th\hfil\box1\hfil$} + \setbox1=\box3 \dimen8=\dimen9 + \else \dimen9=\the\wd1 + \setbox3=\hbox to \the\dimen9{% + $\m@th\hfil\box2\hfil$} + \setbox2=\box3 + \fi + \advance\dimen1 -\the\dp1 + \advance\dimen1 -\dimen3 + \advance\dimen1 -\dimen4 + \dimen6=\dimen2 \advance\dimen6 -\the\ht2 + \advance\dimen6 \dimen3 + \advance\dimen6 -\dimen4 + \kern\the\nulldelimiterspace + \raise-\the\dimen2 \hbox to\the\dimen9{% + \vbox{\box1\kern\the\dimen1\hrule + \kern\the\dimen6\box2}} + \kern\the\nulldelimiterspace} +\def\Xfracc#1#2#3#4{\ifx#1\displaystyle + \let\@djSt@l@=\textstyle + \G@toResult{#1}{#2}{#3}{#4} + \else + \ifx#1\textstyle \let\@djSt@l@=\scriptstyle + \G@toResult{#1}{#2}{#3}{#4} + \else + \let\@djSt@l@=\scriptscriptstyle + \G@toResult{#1}{#2}{#3}{#4} + \fi + \fi} +\def\G@toResult#1#2#3#4{% + \Xfrac#1{\Cramp\@djSt@l@{#2}}{#3}{#4}} +\def\xfracc#1#2#3{\mathchoice + {\Xfrac\displaystyle{\Cramp\textstyle{#1}}{#2}{#3}}% + {\Xfrac\textstyle{\Cramp\scriptstyle{#1}}{#2}{#3}}% + {\Xfrac\scriptstyle{\Cramp% + \scriptscriptstyle{#1}}{#2}{#3}}% + {\Xfrac\scriptscriptstyle{\Cramp% + \scriptscriptstyle{#1}}{#2}{#3}}} +\catcode`@=12 +\endinput +%% +%% end spreadfraction.sty +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + I would appreciate comments and feedback by email and shall + summarize and post. + + Michael Herschorn + +*********************************************************************** + + Michael Herschorn email:herschor@gauss.math.mcgill.ca + Department of Mathematics and Statistics fax: 514-398-3899 + McGill University phone: 514-398-3825 + 805 Sherbrooke Street West + Montreal QC CANADA H3A 2K6 + +*********************************************************************** + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% +%% End of July 21, 1992 Posting +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +------- +Date: 29 Jan 1993 02:29:26 -0500 (EST) +From: herschor@math.mcgill.ca (Michael Herschorn) + +My understanding is that February is the month in which you present +DEK with a list of possible bugs for his consideration. + +Since February is almost upon us, I would like to draw your +attention to our previous e-mail exchanges [ ... ] + +Perhaps the simplest thing would be to typeset +$${1\over x^2}{1\over\textstyle x^2}$$ +$${1\over X^2}{1\over\textstyle X^2}$$ +and look closely at the positioning of the exponents in the denominators +(and the denominators themselves). + +TIA + +Michael Herschorn + +************************************************************************ + +>>> plain.tex (includes one possible TeX bug) + +Date: Sun, 10 May 92 15:33:59 EDT +From: "Walter D. Neumann" +Subject: plain.tex bugs + +Dear Barbara, + +In creating a style file for a proceedings volume, Larry Siebenmann +and I had collected various plain.tex bugs and written them at various +times to the net, assuming they would find their way to Knuth and be +corrected eventually. Checking the most recent plain.tex I see some +have (missing m@th in some macros) but others havn't. Larry suggested +that you are a good clearing house for this sort of thing, so I am +sending our residue to you. The bugs are in Plain's handling of +inserts. One bug is actually a TeX bug, and I havn't checked if most +recent TeX fixes it, since we don't have the most recent installed +yet. That bug is that \lastskip gets lost by an \insert. For details +[ dek: ^^^ not really a bug in \TeX +] +of this, and also the plain.tex problems, see the following file that +I posted to the net about a year ago. + +In my opinion, items 2 (second part), 3, and 5 of the list of +"problems" deserve the name "bugs" while 2 (first part), 1, and 4 are +merely poor choices. + +It also seems to me that it is not logical that TeX uses \topskip +instead of \baselineskip at top-of-page if there is a top insertion +("remaining problem" quoted below). Bug or poor choice? -- take your +pick. + +%% newinsert.tex 3/17/91, 4/2/91 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% walter neumann (neumann@mps.ohio-state.edu) +% +% Include with "\input newinsert.tex" to fix following problems +% with plain TeX's handling of \midinsert and \topinsert: +% +% 1. An insert that falls at the top of the page is too high: it's +% top is at top-of-page rather than top-of-ink. +% 2. Plain uses \bigskip for space around inserts and assumes \bigskip +% is 12pt plus stretch, so \midinsert misbehaves if \bigskipamount +% is changed. This space should be an independent quantity. +% 3. Consecutive midinserts that did not float are spaced twice +% as far apart as consecutive topinserts or floated midinserts. +% 4. Midinserts can get out of order (see Exercise 15.5 of TeXbook). +% 5. \removelastskip fails after a floated insert. This is relevant for +% an insertion before any construction (such as a proclamation in +% plain TeX) that does an explicit or implicit \removelastskip. +% +% Remaining problem: TeX uses \topskip instead of \baselineskip for the +% first line of a page after any topinserts. With the default values +% of 10pt and 12pt respectively, this gives 2pt less space between a +% topinsert or floated midinsert and following text than between a +% middle insertion and following text. To avoid this use: +% +% \topskip=\baselineskip +% [ dek: the \skip parameter for \insert handles such +% discrepancies; see pp 122-123 especially Step 1 on page 123 +% ] +% +% PARAMETERS: +% Plain.tex puts \bigskipamount of space before and after inserts. +% We provide \insertskipamount for this purpose (default \medskipamount). +% In addition, \inserthardskipamount of glue is added at the top of EVERY +% insert; it remains even at top of page (default 6pt; it should be at +% least \topskipamount-(text height)). +% These defaults give good balance for figure insertions of the form: +% \midinsert +% [Commands to include a graphics file] +% \medskip \centerline{Figure Title} +% \endinsert. +% +\chardef\newinsCatAt\the\catcode `\@ +\catcode `\@=11 +% +%%%%%%%%%%%% Corrected insert macros for plain.tex %%%%%%%%%%%%%%%%% +% +% New skipamounts: +% +\newskip\insertskipamount\newskip\inserthardskipamount +\insertskipamount\medskipamount % Change as desired. +\inserthardskipamount 6pt % Change as desired (see above) +\def\insertskip{\vskip\insertskipamount} +% +% Save and restore \lastskip: +% +\newskip\LastSkip +\def\SaveLastSkip{\LastSkip\lastskip} +\def\RestoreLastSkip{\nobreak\vskip-\LastSkip\vskip\LastSkip} +% +% Larry Siebenmann's test for split topinserts: +% +\newcount\SplitTest% will be set to -1 if a topinsert has split +\def\SetSplitTest{\SplitTest\insertpenalties + \SaveLastSkip\insert\topins{\floatingpenalty1}\RestoreLastSkip + \advance\SplitTest-\insertpenalties} +% +% From here on we modify definitions in plain.tex. +% +% Redefine \midinsert to convert to \topinsert if a topinsert has been +% split, to prevent midinserts getting out of order (cf. TeXbook Exercise +% 15.5). As in plain.tex, a \midinsert still converts to a \topinsert +% (which then splits) if the insert is too big for current page. +% Was: \def\midinsert{\@midtrue\@ins} +\def\midinsert{\par\SetSplitTest\ifnum\SplitTest=-1 +% [ dek: would <0 also work? +% ] + \@midfalse\else\@midtrue\fi\@ins} +% Redefine \@ins to add \inserthardskipamount of glue above. +% Was: \def\@ins{\par\begingroup\setbox\z@\vbox\bgroup} +\def\@ins{\par\begingroup\setbox\z@\vbox\bgroup% + \vglue\inserthardskipamount} +% Changes to \endinsert of plain.tex 3.0: +% - Use \insertskipamount instead of \bigskipamount throughout. +% - Use larger of previous skip and insertskip before middle insert. +% - Add \nointerlineskip to avoid unwanted extra 1pt skip. +% - Save and restore lastskip when an insert floats. +\def\endinsert{\egroup % finish the \vbox + \if@mid \dimen@\ht\z@ \advance\dimen@\dp\z@ + \advance\dimen@\insertskipamount% was 12pt (wn) + \advance\dimen@\pagetotal\advance\dimen@-\pageshrink + \ifdim\dimen@>\pagegoal\@midfalse\p@gefalse\fi\fi +% Next 3 lines replace: \if@mid \bigskip\box\z@\bigbreak (wn) + \if@mid% + \ifdim\lastskip<\insertskipamount\removelastskip\insertskip\fi + \nointerlineskip\box\z@\penalty-200\insertskip + \else% + \SaveLastSkip% added (wn) + \insert\topins{\penalty100 % floating insertion + \splittopskip\z@skip + \splitmaxdepth\maxdimen \floatingpenalty\z@ + \ifp@ge \dimen@\dp\z@ + \vbox to\vsize{\unvbox\z@\kern-\dimen@}% depth is zero + \else \box\z@\nobreak\insertskip\fi}% was \bigskip\fi (wn) + \RestoreLastSkip% added (wn) + \fi\endgroup} +%%%%%%%%%%%%%%%%%% Done correcting insert macros %%%%%%%%%%%%%%%%%%% +% +\catcode `\@=\newinsCatAt +\endinput +%% end newinsert.tex + + -- + Walter Neumann Email: neumann@mps.ohio-state.edu + Department of Mathematics neumann@ohstpy.bitnet + Ohio State University Tel: 614-292-4886 (office) + Columbus, OH 43210 -292-4975(Math. Dept.) -292-1479 (Dept. Fax) +------- +[ dek: These macros look very good but I cannot change plain TeX + any more at this late date. _Ever_._ + (Wish I had thought of them in 1985!) + He should publish them in TUGboat. +] + +************************************************************************ + +Date: 24 Feb 1993 17:35:03 -0500 (EST) +From: bbeeton +Subject: message for don -- trip, volume b glitch + +[ don -- + i don't know why i failed to send this one out with the rest; it's + not as if it would have taken a long time to edit out extraneous + stuff. +] + +>>> Volume B; trip + +Date: Fri, 10 Apr 92 13:21:27 GMT +From: Peter Breitenlohner +Subject: message to DEK + +barbara, can you please forward the following to Knuth. Thanks + +1. deficiency in TRIP test. + while doing some optimization for PubliC TeX I had introduced + a bug in the splittopskip computation in prune_page_top + In mod.969 the line + ....... width(temp_ptr):=width(temp_ptr)-height.... + was changed by mistake to something equivalent to + ....... width(temp_ptr):=width(temp_ptr)+height.... +[ dek: It would be interesting to check the archives to see why + we failed to cover this -- but I haven't time to do so + (nor to update trip). +] + When this bug was finally found by Ulrik Vieth we both + were much surprised that this error was never detected by + the TRIP test! + +2. missing mini-index entry + On page 483 of Vol.B there ought to be an entry for off_save. + In my old book (TeX Version 2.0) there is none. Unfortunately + I had no possibility to check one of the newer editions. +[ dek: the newer books have improved indexing software, so this + should no longer be an issue. In 1994, get a new Vol B! + It will be the permanent, good one. +] + +Sincerely Peter Breitenlohner + +************************************************************************ + +>>> Report on TeX 3.14b + +Date: Wed, 5 FEB 92 21:57:11 GMT +Reply-to: Brian {Hamilton Kelly} +From: TEX@rmcs.cranfield.ac.uk +To: BNB <@nsfnet-relay.ac.uk:BNB@MATH.AMS.com> +Subject: RE: TeX 3.14b, etc + +barbara, + +In message of Wed, 05 Feb 92 +17:32:30 GMT, Chris Thompson wrote: + +> Some rather hasty and incomplete testing done. I have compiled +> TeX 3.14b and confirmed that it fixes the doubled kern problem +> in 3.14a, and also Robert Hunt's \showbox bug. Test documents +> generate unaltered DVI files. + +I can also confirm that it DOES fix my original problem with terminal- +\sigma ligatures with punctuation. I've also run TRIP and match DEK's +output (apart from the fact that he's obviously gone the whole hog and +called his executable 3.141, because that's how his logs read, rather +than 3.14b. + +> MF 2.7a compiled and run through a few tests. Proof mode cmr10 +> shows a diff on character "Q" only: this is presumably the result +> of the "fixed bug in draw" (as there is no new mf84.bug in /alpha, +> I don't know what this bug might be). Actually the pixel deltas +> seem to change the "Q" bitmap back to what it was in some earlier +> version of MF (or maybe this is an accident due to some nearly half +> integral coordinate that flips one way of the other on lots of +> changes). + +I haven't looked at MF at all yet, mainly because I didn't know what it +was supposed to be fixing! + +> Weave 4.4 compiled and tested to the extent of that it generates +> identical output to 4.2 for a few WEB files. + +And I can also confirm that it correctly handles wrapped TeX comments; +great! + +> I note the existence of a number of changed .mf files for cm fonts +> in /alpha, but as there is no cm85.bug either, I wouldn't know what +> to look for. + +Ditto. + +Best regards, + +Brian +------- +Date: Thu, 06 Feb 92 13:59:36 GMT +From: Chris Thompson +To: Brian {Hamilton Kelly} , + Barbara Beeton +Subject: RE: TeX 3.14b, etc + +I have also run the new trip and trap tests (snap!) and they pass +(as Brian points out, in the tr(i|a)p test output the banners appear +as "3.141" and "2.71" rather than "3.14b" and "2.7a"). MF 2.7a passes +the 2.7 trap test; TeX 3.14b doesn't quite pass the 3.14 trip test, but +that is no suprise. + +Chris Thompson +Cambridge University Computing Service +JANET: cet1@uk.ac.cam.phx +Internet: cet1@phx.cam.ac.uk + +************************************************************************ + +>>> tangle.web 4.2 + +Date: Mon, 24 Feb 92 10:42:31 GMT +From: Peter Breitenlohner +To: Barbara Beeton +Subject: tangle.web 4.2 + +barbara, +I retrieved tangle.web 4.2 from labrea. +To my surprise I found that the 'extra "}" bug' I reported some +time ago ist still there, although it was fixed in weave. +Maybe you can clarify this. +peter +%-------------------------------------- +Line numbers refer to TANGLE.WEB 4.2 as of March 26, 1991. + +@x [13] m.145 l.2664 get_next - bug fix +othercases if c>=128 then goto restart {ignore nonstandard characters} +@y +"}": begin err_print('! Extra }'); goto restart; +@.Extra \}@> + end; +othercases if c>=128 then goto restart {ignore nonstandard characters} +@z +%--------------------------------------- +------- +Date: Mon, 24 Feb 92 15:45:56 GMT +From: Peter Breitenlohner +To: Barbara Beeton +Subject: tangle.web 4.2 + +barbara, +I forgot to mention another longstanding bug? in tangle: + +% TANGLE.WEB 4.2 as of March 26, 1991. + +@x [4] m.31 l.642 - activate debug_help +@!debug debug_help;@+gubed +@y +@!debug debug_skipped:=debug_cycle;debug_help;@+gubed +@z +%--------------------------------------- +[ dek: I don't know why version 4.2 was still on labrea; version 4.3 + was released September 1991 and fixed the bug in question ... + Version 4.4 will fix this other (debug cycle) one. +] + +cheers peter +------- +Date: Mon, 24 Feb 1992 10:10:36 -0500 (EST) +From: Barbara Beeton +To: PEB%DM0MPI11.bitnet@CUNYVM.CUNY.EDU +Subject: Re: tangle.web 4.2 + +peter, +i've just checked at labrea. +there's no new version of tangle in /alpha so it seems that either +(1) knuth thought that there were no changes, or +(2) he forgot to install it, or +(3) the notes he accidentally sent from sweden by sea mail contained + some more things to look at and he decided to wait. +i'll follow it up. thanks. +i still haven't finished transcribing knuth's last set of comments, +that i received before going to england for the uktexug and tug board +meetings. i may find something there. maybe today ... + -- bb +------- +Date: Mon, 24 Feb 92 16:12:49 GMT +From: Peter Breitenlohner +To: Barbara Beeton +Subject: Re: tangle.web 4.2 + +OK thanks, +the point is that the 'extra "}" bug' is just a minor nuisence +in weave but can lead to a rather mysterious nonsense in tangle's output. +pb + +************************************************************************ + +>>> Reply from Don + +Date: 27 Feb 1993 23:48:06 -0800 +Subject: note from Don + +Many thanks, Barbara, for the notes you sent. + +As usual, Phyllis made hardcopy for me, and I scribbled comments on +that, and wrote appropriate checks when monetary rewards were due. +The result will be wending its way to you via snail mail. + +TeX version 3.1415 is done and should be available soon by anonymous ftp +from the semi-secret "alpha" [not pub] directory at labrea. A system +guru will probably install it sometime this weekend; I don't have +permission to do that. Look for file ~ftp/alpha/tex3.1415.tar.Z +at labrea.stanford.edu. Uncompressing and untarring will yield +only the crucial files that have changed: tex.web, tripin.log, +trip.log, trip.typ; also new versions of errata.tex and tex82.bug. +I think it's wise to wait awhile before releasing it officially --- +I will be updating METAFONT, some day, if that Sun file name stuff ever +is acted on --- although people are welcome to try it out. Just +a few changes: one which makes it more efficient to have everything +in a nonzero \language, another which affects kerns inserted at +the boundary characters using the smart-ligature mechanism. +(Previously such kerns were not treated consistently or correctly, so +people must not have been using them. Now they act like kerns on +accents, i.e., they do not disappear into line breaks.) + +I plan to look at TeX again about 15 months from now. Thanks again for +your most helpful accumulation of pretty-much-noise-free comments. + +************************************************************************ + +>>> Metafont/MFBook + +Date: 21 Dec 1992 01:03:42 +0000 (GMT) +From: Chris Thompson +To: Barbara Beeton +Cc: Robert Hunt +Subject: plain.mf bug from REH, etc. + +Dear Barbara, + +I should have known that Robert Hunt had been quiet for too long... +He has sent me the follo +wing: + +> I have found a bug in Plain METAFONT; line 371 of the format file (in the +> definition of cutoff) should read +> (cut_ scaled (1+max(-pen_lft,pen_rt,pen_top,-pen_bot)) +> instead of +> (cut_ scaled (1+max(pen_lft,pen_rt,pen_top,pen_bot)) +> +> The METAFONTbook would also need correcting on pages 151 and 272. + +[ dek -- $ 2.56 +] + +I think he is right that the current code is wrong, but his fix is +insufficiently drastic. The absolute values of all four pen_? +quantities needs to be taken, as they can be of any sign (although +the ones that Robert is assuming are no doubt the most likely). +One for Don's list. + +Chris Thompson +------- +Date: 21 Dec 1992 21:25:37 +0000 (GMT) +From: Chris Thompson +Subject: More on Robert's plain.mf bug + +Dear Barbara, + +... Robert Hunt has commented on my remarks: + +> Interestingly enough, my suggested alteration +> (cut_ scaled (1+max(-pen_lft,pen_rt,pen_top,-pen_bot)) +> _is_ sufficient, and there is no need for +> (cut_ scaled (1+max(abs pen_lft,abs pen_rt,abs pen_top,abs pen_bot)). +> This is because (as far as I am aware) the two inequalities pen_lft \le pen_rt +> and pen_bot \le pen_top hold. You'll soon see why my solution is good enough +> if you try coming up with an example where it fails! + +and he is quite right---his fix is sufficient. + +Chris Thompson + +[ dek -- + there is another bug in cutdraw too, re the spurts of ink discussed + on page 112. + Both of these bugs are corrected in base_version 2.71 +] + +<<< end items send 23 Dec 1982 + +************************************************************************ + +>>> items sent 8 Mar 1993 + +Date: Mon, 13 Apr 92 12:26:16 GMT +From: Peter Breitenlohner +To: Barbara Beeton +Subject: message for Knuth and a question + +barbara, +Right know I am working on a modified TeX-XeT change file, +inspired by that by Knuth and MacKay published in TUGboat +but different in two essential points: +1. the text direction primitives are treated differently + in order not to disturbe TeX's linebreaking algorithms for + pure left-to-right text (that is to say the new TeX-XeT + passes the TRIP test in a much better way than the old one) +2. right-to-left text is reversed explicitely and writen to + a normal DVI (not DVI-IVD) file. +All that is still in progress, but will be finished soon. +Can you propose a good way to make the result widely available +and known? + +In doing all that I stumbled on some dubious code in tex.web. +Can you please forward the following (or the whole message) +to Knuth. + +Thanks Peter +%-------------------------------------------------------- + +Misleading code (or a real bug?) in tex.web V 3.141 + +In the hlist/vlist_out routines leader boxes are shifted +by their shift_amount. As far as I can see this shift_amount +is always zero and that code should be removed. +[dek -- ^^^^ yes, since 28 Mar 1983! +] + +Even worse if there were a possibility to have leader boxes with +non-vanishing shift_amount. Then there would be a real bug since +the value of cur_v/cur_h is not reset to base_line/left_edge after +the leader boxes have been shipped out. + +Here is what I think ought to be changed: + +% All line numbers refer to TEX.WEB 3.141 as of March 16, 1992. + +@x [32] m.628 l.12462 - remove redundant (and misleading) code +begin cur_v:=base_line+shift_amount(leader_box); synch_v; save_v:=dvi_v;@/ +@y +begin synch_v; save_v:=dvi_v;@/ +@z +[ dek -- $2.56 +] +%--------------------------------------- +@x [32] m.637 l.12605 - remove redundant (and misleading) code +begin cur_h:=left_edge+shift_amount(leader_box); synch_h; save_h:=dvi_h;@/ +@y +begin synch_h; save_h:=dvi_h;@/ +@z +%--------------------------------------- +[ dek -- + In TeX change 668 (`Errors of TeX'] I decided that these shift + amounts be zero, but I left the redundant code in case of future + extensions.* Now I see your point about the potential "real bug" + if somebody were to actually _use_ the feature. So I prefer to + _leave_ these lines of code but to set + cur_v:= base_line + cur_h:=left_edge + at close of \S628 and \S637 + + * not in TeX itself but in private versions, as in \S1340 +] + +Peter Breitenlohner + +************************************************************************ + +>>> items sent 11 Jun 1993 + +Date: 30 Apr 1993 22:32:17 -0300 (BST) +From: Chris Thompson +Subject: Re: [alpha version, tex 3.1415] + +Dear Barbara, + +Here is a probably forlorn attempt to get a report in before your +30 April deadline: + + . No bugs found. It passed the usual paranoia tests. I have been + using it myself (not very intensively) for routine (La)TeXing. + I have had no adverse reports back from the 2-3 users I tried + to subcontract the testing to (George Russell, Robert Hunt). + + . I have done a series of tests in respect of change #405 (Rainer's + \setlanguage and associated problems): I felt I really ought to as + Don has adopted the scheme I thought up in a particularly inspired + moment last July (keeping the initial language/hyphenmin info for + a paragraph in the pg_field)! It really does seem to work... + + . But a minor quibble: \showlists output now leaves no space between + "language" and "hyphenmin" and the subsequent numbers when displaying + this data. It used to show only the latter, but left a single space, + which looked better. + +[ dek -- + hmm, there's no accounting for taste +] + + . I *haven't* tested changes #404/#407, to do with boundary character + logic, in any serious way. (I am rather hoping Brian has been doing + some tests with his Greek fonts...) + +If you want to contact me while while you are in this country, my work +telephone number is 0223 (Cambridge) - 334715. + +Chris Thompson + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +Date: 02 Apr 1993 14:39:21 +0200 +From: Bernd Raichle +Subject: Small Bug in TeXbook: \downbracefill+\upbracefill + +TeXbook, Appendix B. Basic Control Sequences (page 357) states that + + The |\upbracefill| and |\downbracefill| macros have restricted + usage: they must appear {\sl all by themselves\/} in an hbox or an + alignment entry, except for horizontal spacing. + +otherwise the \vrule "makes a heavy black band, which is too horrible +to demonstrate here" (TeXbook, page 331, answer of exercise 21.6, page +225). + +In the following example \downbracefill and \upbracefill "appear all +by themselves in [..] an aligment entry": + +\halign{#&&\hfil#\hfil\cr + &\kern 5cm &\kern 5cm\cr + &\upbracefill &\downbracefill\cr +\strut &\upbracefill &\downbracefill\crcr} + +The two \..bracefill in the third line of the \halign with the \strut +in column one produce the mentioned "heavy black band". + + +To correct the TeXbook, either + +1) replace "alignment entry" to "complete alignment line" or something + similar + + or + +2) change the definition of \downbracefill and \upbracefill, + specifying the height and the depth of the \vrule, e.g. + + \def\upbracefill{$\setbox\z@\hbox{$\bracelu$}\m@th + \bracelu\leaders\vrule height\ht\z@ depth\dp\z@ \hfill\bracerd + \braceld\leaders\vrule height\ht\z@ depth\dp\z@ \hfill\braceru$} +[ dek -- [delete \dp, on two lines] ^^^ + page E89: depth _is_ _zero_ ^^^ $2.56 +] + + and correct the statement about the restricted usage. + + +I prefer change 2, because it allows the use of \..bracefill in normal +text without a \hbox. + +[ dek -- + agreed -- see plain fmtversion 3.1415 +] + +Yours, + -bernd +__________________________________________________________________________ +Bernd Raichle, ISR, Universit"at Stuttgart | "Le langage est source +home: Stettener Str. 73, D-W-7300 Esslingen, FRG | de malentendus" +email: raichle@informatik.uni-stuttgart.de | (A. de Saint-Exupery) + ------- +Date: 05 Apr 1993 09:17:17 +0200 +From: Bernd Raichle +Subject: Re: Small Bug in TeXbook: \downbracefill+\upbracefill + +on 04 Apr 1993 13:42:57 -0400 (EDT), bbeeton said: +you> however, he has already completed his annual examination and +you> updated of tex and the texbook, and plans to look next at tex +you> "about 15 months from now" (as of feb 27). (i will forward his +you> comments on the bug reports and updates as soon as the "alpha" +you> version of tex 3.1415 has been vetted and pronounced sound by +you> the testers.) so you should certainly do what is necessary +you> in the meantime to avoid this problem, if you encounter it +you> again. + +This is ok for me. + +Btw, I'll checked the alpha 3.1415 version of TeX on labrea and IMHO +there are two missing changes w.r.t. the change of \lefthyphenmin and +\righthyphenmin: +The fields |lhm_field| and |rhm_field| in |list_state_record| are +[ dek -- + ? they're gone ... + change 405 in tex82.bug says to undo change 373 ... + errata.tex correction to page B89 dated 27 Feb 93 removes them ... + so I guess labrea is not up to date +] +unnecessary, because 3.1415 uses the |pg_field| for this purpose. The +same applies for the definitions of the WEB macros |lhmin| and |rhmin| +in the next section. (tex.web 3.1415 alpha, \S 212 & 213) + + +you> do you think this is a problem that might be encountered by +you> others? it does remind me of a warning published in tugboat +you> a while ago (9 #2, p.183) about the depth of a rule that was +you> incompletely specified, and took on the depth of an element +you> in another cell of an \halign. in that piece, one recommended +you> solution was to use \leaders -- but since the \*bracefill +you> macros already use \leaders, it looks like that isn't a valid +you> solution. + +The TeXbook contains this warning and an explanation of this +behaviour. (The behaviour of the \..bracefill macros with their +current definition are correct.) But the restriction statement in +appendix B, page 357 is not complete (as I have shown with the example +in my bug report). Additionally the answer of exercise 21.6 (page 331) +says: + + [..] This usually makes a heavy black band, which is too horrible to + demonstrate here. However, it does work in the ^|\downbracefill| + ^^^^^^^^^^^^ +[ dek -- $2.56 +] + macro of Appendix~B [..] + + +The problem with this (mis)behaviour of \..bracefill: LaTeX's +tabular/array environments puts automatically a \strut in column one +of each alignment line making sure that the baseline distances are +equal. Thus \..bracefill, which may be useful in a LaTeX `array', can +not be used without modifications. + + +you> i'll have to look over that again, and perhaps a +you> new warning should be published. if so, i'll give you credit +you> for the report; would you be willing to review such a piece +you> before publication? + +Yes. + +Sincerely, + -bernd + + +######################################################################## + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Character code reference +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Upper case letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ +% Lower case letters: abcdefghijklmnopqrstuvwxyz +% Digits: 0123456789 +% Square, curly, angle braces, parentheses: [] {} <> () +% Backslash, slash, vertical bar: \ / | +% Punctuation: . ? ! , : ; +% Underscore, hyphen, equals sign: _ - = +% Quotes--right left double: ' ` " +%"at", "number" "dollar", "percent", "and": @ # $ % & +% "hat", "star", "plus", "tilde": ^ * + ~ +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +[ end of message 042 ] diff --git a/info/digests/tex-implementors/cm85.bug b/info/digests/tex-implementors/cm85.bug new file mode 100644 index 0000000000..995d1501e6 --- /dev/null +++ b/info/digests/tex-implementors/cm85.bug @@ -0,0 +1,1116 @@ +This file is a log of changes made to the "new generation" of Computer Modern +fonts, after the first output proofs were ready. I had a great deal of +advice from Neenie Billawala, Matthew Carter, and Richard Southall while +I was making these revisions. + +Entries are in chronological order; thus the most recent news appears +at the bottom of the file. + +------------------------------------------------------------------------------- + Changes based on the proofsheets of April 26, 1985 +ACCENT.MF: + lower the idots, umlauts, and tilde (MC) + Polish ell cross: longer stroke in bold +CMBASE.MF: +COMLIG.MF: + double quotes too close together in bold (MC) +CSCSPU.MF: + SS made from two S's +GREEKU.MF: + Gamma: .25u longer arm + Lambda: too narrow (MC,NB) + Xi: 1u wider; shorten middle serifs (MC) + top and bottom strokes to be arms (NB) + Psi: more super; thin the lower curve (MC) + add points 3' and 7' for crisp sans + Omega: redo the bottom, curl 0 becomes vertical (MC) + thin from hair to vair at points 3 and 5 +PUNCT.MF: + Monospace period, comma, colon, semicolon made heavier (MC) +ROMAN.MF: + ligs=2 gets ff, fi, etc.; ligs=1 gets only --, '', etc. + II kerning introduced + kern between a and ' in csc +ROMAND.MF: + 0: med_curve decreased to curve; y2l and y4l raised + 1: cap_bar changed to bar in the top stroke + sans-serif serifs also use bar as the slab height + 2: lighten cap_curve and cap_stem slightly (RS) + move point 3 down by .5vair (MC) + 4: thin the diagonal still more (NB) + bar line moves up one pixel when there's a serif below it + 6: move bulb to the right (MC) + make the lower left curve more_super (RS,NB) + 9: make the upper right curve more_super (RS,NB) +ROMANL.MF: + a: bulb positioned by its center rather than the left (MC) + c: right terminals moved closer to the edge (MC,NB) + more pull on the inside left (RS) + e: less left sidebar in monospace (MC) + bold versions to be wider (MC) + more pull on inside left (MC,RS) + g: lower edge of loop goes one pixel lower + varg: point 6 raised above baseline (MC) + y0 calculated so that it works when x7l=stem_edge + lower arc goes one pixel lower + i: monospace version gets more left sidebar (MC) + dot moves slightly right (NB) + stem'' increased to stem' (MC,RS,NB) + slab replaces tiny in correction for dot-too-close + j: diminish monospace sidebars (MC) + shift slightly to right (MC) + k: serif right_jut decreased .8 to .6 + bug fixed in alpha2 (had y1 not y11)(MC,RS,NB) + decreased diagonal weights + "if abs(angle(z3-z4)-45)<2:y4:=y3-(x3-x4);fi" rejected; moves y4 down too much + n: omit pull inside the arch (MC,RS) + introduce stem_shift, shifts this character and others slightly right (MC) + o: raise y2l and y4l (RS) + s: reduced sidebearing in sans (MC) + increased thickness at edges (.35 to .5) (RS) + changed to super_arc, and made it more_super (RS) + raised the top of upper barb to equal top of the character (RS) + removed typo (`tiny' for `fine') + reduced flare in upper terminal of sans, and rounded it properly + t: width to grow in bold case + height made independent of bar_height + slightly longer bar (MC) + v: decreased left stem (RS) + w: decreased stems (MC,RS) + monospace version drops middle from 2/3 to .6 and lengthens inner serifs + x: decreased left stem + y: decreased left stem + z: lighter diagonal, longer upper arm (MC,RS,NB) +ROMANP.MF: + $: tau eliminated +ROMANU.MF: + A: decrease right stem (MC) + make the bar thinner (MC,NB) + bar position based on y0 rather than bar_height + C: use cap_band instead of vair' at top and bottom (RS) + correct typo: x2l to be reset, not y2l + E: middle arm .35u longer, but beak reduced from .7 to .6 (MC) + F: top arm .25u longer; middle arm as E (MC) + G: same as C; also the bar is raised one pixel + J: slightly longer upper left serif + K: lower diagonal thinned and moved outward + M: monospace version raised still more in middle + N: diagonal thinned (MC,RS) + O: y2l and y4l raised + R: tail should move to the right (MC,RS,NB) + bold case gets wider (RS,NB) + S: changed as s (RS) + V: took stem_corr off the left stem (MC) + W: monospace version takes center down from 2/3 to .6, lengthens inner jut + X: took stem_corr off the left stem (MC) + Y: took stem_corr off the left stem (MC) + Z: diagonal made lighter in sans (MC) + upper arm made longer (MC,RS) +ROMLIG.MF: + equalize stem weights (RS,NB) +ROMSPL.MF: + ae, oe: incorporate changes of a and e and o + ss: more stem weight, less curve weight, less bulb (MC,NB) + dotless i,j: see i,j +ROMSPU.MF: + AE: middle arm changes as E (MC) + if hefty and monospace, avoid the serif on middle arm + bars not aligned if hefty + if monospace, middle stem moves to right + OE: middle arm changes as in AE (MC) + middle stem lightened +ROMSUB.MF: + blankspace: not so close to sides +SYM.MF: +CMR10.MF etc: + bar_height raised in the quote and bold fonts (MC,NB) + comma_depth in cmtt10 increased from 40 to 50 (MC) + cap_notch_cut decreased in cmsc10, cmsx10 + apex_o decreased in cmr10, cmb10, cmbx10, cmbx5, cmcsc10, cmtt10 + o decreased in cmb10 + cap_jut decreased from 39 to 34 in cmb10; cap_serif_fit increased 5 to 6 + cmbx5 gets smaller beak, fudge, cap_ess; more apex_corr +GENERAL: + "robustness" added when points like x8r of "a" are calculated + (this affects a,b,d,varg,j,p,q,t,u,dj,ae,6,9,f_stroke) + "robustness" also added to avoid curl at end of paths + (this affects c,e,s,C,G,S,1,5,ae,oe,breve,parens) + "term" subroutine adds robustness for sans-serif terminals + (this affects C,G,J,S,f_stroke,j,ss,ae,oe,2,3,5,6,9,$,&,?,@) + code revised to use "pos" instead of "penpos" when possible + Changes based on the proofsheets of May and June, 1985 +ROMAND.MF: + 1: use o instead of apex_o + 4: bar line height shouldn't depend on bar_height + 5: sans-serif lower terminal position raised; depends on upper left edge + bug in arm at top (0 for 90) made all hefty arms too small + 9: disappears at link +ROMANU.MF: + B: middle bar positioned by its middle, not its bottom (RS) + serifed lobes thickened slightly at bottom (RS) + C: lower terminal is tilted the other way + C,G: upper terminal in sans-serif is tilted slightly + upper barb is darkened + J: tilt the lower terminal + K: lighten the main diagonal (serif case) (RS) + lighten the upper diagonal (sans-serif case) (RS) + M: remove apex_corr (RS) + N: lighten the diagonal + P: too light below counter (RS) + Q: sharpen upper right corner of sans-serif tail (RS) + top of tail thickened and moved slightly left + S: less super at upper left and lower right (MC) + barb to go below baseline + barbs darkened + add weight at top, bottom in sans_serif version (RS) + tilt the lower terminal like the upper one + top weight needs to be maxed with fine.breadth + W: top middle stems allowed to overlap in serifed case + second inner serif made no longer than left outer serif (MC) + ceiling must become floor, to ensure that x5r>=x4r-mid_corr + Z: diagonal still too heavy, because previous change was ineffective + beaks made darker + better positioning of y2 and y3 when tiny is zero +CSCSPU.MF: + J,SS: changes from J and S +ROMANL.MF: + a: inappropriate uses of "fine" are removed + bh introduced to guard against "wild" bar heights + thin_join introduced at point 9 + robustness logic changed so that x8l-x8r<=u + c: too much weight constrast between strokes in sans_serif (RS) + top terminal lowered to match a + bottom terminal tilted the other way + d: fine.breadth should have been thin_join as in b, p, q + e: 1+xpart changed to xpart + bottom terminal tilted the other way + g: sans-serif ear to use z0l and z0r + h,m,n: left inner serifs stay at jut length + i,l: mod_width for better fit at lowres + j: reposition stem for better fit (use .5w+2.5u, not w-2.5u) + remove bug in "pos" change + k: upper diagonal serif lengthened from 1.2jut to 1.4jut (RS) + diagonals made still lighter + r: thin_join introduced + s: barb to go below baseline + barbs darkened + add weight at top, bottom in sans_serif version (RS) + tilt the lower terminal like the upper one (RS) + top weight needs to be maxed with fine.breadth + t: bar extended still more at right (RS) + v: decreased the width by .25width_adj# + w: overlap allowed as in W + second inner serif made no longer than left outer serif (MC) + ceiling must become floor, to ensure that x5r>=x4r-mid_corr + x: decreased the width by .5width_adj# (RS) + y: sans-serif tail curls up too far (RS) + z: beaks too light; decrease the diagonal to compensate (RS) + better positioning of y2 and y3 when tiny is zero +ROMSPL.MF: + dotless i and j: as i and j + ae and oe: bottom terminal tilted the other way + ae: corrected as a +ROMSPU.MF: + AE: x12 based on x1l rather than x1, works better in bold cases (RS) + OE: left curve not to be pulled +GREEKU.MF: + Phi and Psi: middle parts must keep away from the serifs +ROMANP.MF: + $: strengthened the terminals in sans-serif case, and tilted them + &: opened the eye by moving point 8 left .5u (RS) + ?: tilted the sans-serif terminal and moved it down a little more +PUNCT.MF: + %: move the diagonal a bit left at the top + ( and ): 3.5( changed to 3(. + [ and ]: round changed to ceiling and floor, avoids disappearing brackets + @: inner a placed by its edges instead of its stem centers (RS) +ITALL.MF: + f: lower bulb moved left; .5 changed to .6 between bulb and stem + k: bug in lower right stroke (missing e's) + l: bug in italic correction for math fitting (u not u#) + m: avoid hooks in monospace version + p: lengthed left serif at bottom from .5jut to .75jut + x: bulbs moved .25u further out; .5 used between bulb and stem + w: avoid hook in monospace version +ITALIG.MF: + all five: changed like f + fi: made 1u less wide + fl,ffl: made .5u less wide, bulb now touches the l stem + ffi: made .75u less wide +GREEKL.MF: + beta, gamma, zeta, xi, omega, varepsilon: +eps at the tight turns + gamma: final diagonal should be more slanted (MC) + zeta: as tall as xi, shallower diagonal slant (MC) + kappa: bug in lower right stroke (missing e's) + xi: raise the bottom diagonal and distort arc slightly (MC) + chi: introduce slight curve in main diagonal stroke + varphi: too wide at right half bowl (MC) +ITALMS.MF: + wp: bulb smaller, bottom a little more open +ITALD.MF: + 5: changed like 5 in ROMAND +OLDDIG.MF: + 2: top a bit narrower, bottom a bit wider (MC) + 5: changed like 5 in ROMAND +SYM.MF: + plus-minus: shift depends on u not asc_height +SYMBOL.MF: + minus-plus: shift depends on u not asc_height + up-and-down arrows (characters '154 and '155): taller and deeper + clubsuit: wider + spadesuit: y1+1 changed to y1+.75 (also in clubsuit) +ROMAN.MF: + eliminated kerning between L and O,C,G,Q,U (also in TEXTIT and CSC) +MATHEX.MF: + font_x_height needed to be set, for positioning of accents +CMB10.MF: + dishing is too much (on all bold fonts) +CMR5.MF: + letter_fit decreased 10 to 5 +CMBX5.MF: + fudge should be 1 (cap_stem 8=:7 in aps mode was too much) + decrease letter_fit drastically; this means f-ligatures must come back + lowercase parameters increased by 2/36 +CMBI10.MF: + lowercase serifs too short. (same change to all the italic fonts) +CMSX10.MF: + decrease `ess' (RS) +CMTC10.MF: + fudge is too much in lowercase +CMCC10.MF: + lowercase more extended + much less letterspace in caps + increase lower.cap_curve, decrease lower.o +CMSQI8.MF: + slope shouldn't be so much (RS) + increase `ess' (RS) + +GENERAL: + serif-abutment corrections changed to +1 instead of +2 + vround used for vertical rounding + +CMBASE.MF: + new way to set shrink_fit (0,1,2) for monotonicity with letter_fit + letter_fit not included in mono_charwd + fine must be positive (else we lose barbs) + thin_join must be positive (else h_stroke gives a bad pos) + Changes based on the `version 0' test fonts of July 12 +[not showing hundreds of changes to the `typography' of the programs] + +Driver files in general: +Frequency info (from MANUAL.TEX[tex,dek]) was used to order the ligtables +font_xheight changed to font_x_height (a change to PLAIN.MF) + +Program files in general: + use `hround' instead of `round' wherever granularity might be wanted + less_rounded was taken out; autorounded occasionally put in + arm($,$$,...), the value of y$$ was adjusted by eps (lower) or -eps (upper) + +Parameter files in general: + new 12pt and 17+pt fonts; more sans serif fonts + new comment at bottom of all parameter files: `switch to the driver file' + +ACCENT.MF: + ^: eps subtracted from y1 (helps avoid degenerate equations in ultralowres) + '`: eps added to y1 + +ROMAN.MF: + kern entry for gj had the wrong sign + kerns for v removed in sans serif + new kern for aj in serif case + new kern for ar in sans serif + +ROMAND.MF: + 3: pos3 needed to be maxed with fine.breadth + y1r,y9r needed to be adjusted by eps + 6,9: keep x1 on the correct side of x2 at lowlowres + (this change also affects OLDDIG, ITALD, and ITALMS partial sign) + +ROMANP.MF: + $: less_tense bulbs + +ROMSPL.MF: + ss: ensure x5 not > x4l at low resolutions + +ROMLIG.MF: + itc shouldn't include the slant... + +COMLIG.MF: + em dash should be one em wide (add letter_fit# to the adjustments) + +BIGOP.MF: + \displaystyle coproduct sign had 1.2bracket instead of 1.8bracket + charlist syntax changed from commas to colons + +BIGDEL.MF: + extensible double arrow: position wasn't computed as in top and bottom + charlist syntax changed from commas to colons + +BIGACC.MF: + charlist syntax changed from commas to colons + +ITALL.MF: + c: point 1 made definitely greater than point 2, for lowlowres + q: x4 increased by eps, for lowlowres path intersection + r: x4 based on w, not 5u + s: max(ess,fine.breadth) + add eps and 2eps for lowlowres case (cmmi6 at 100/in) + +ITALMS.MF: + wp: x6r must not be less than x1r at lowlowres + +TSETSL.MF: + gamma: last time's bugfix from GREEKL needs to be here too + +GREEKL.MF: + omega: add 2eps to x4-x6 + lambda: make sure that y3>y4 at lowlowres + zeta: make sure that x2>x0 at lowlowres + varsigma: make sure that x1>x2 at lowlowres + +CMFIB8.MF: + decreased serif_fit, cap_serif_fit; increased curve, cap_curve + +CMBASE.MF: + l,r made newinternals + serif darkness and skew switches now done with boolean variables + comma and ammoc: 2eps addedto/subtractedfrom position of x@2 + mod_width now called change_width + ess and cap_ess initialized to preserve ratios with stem and cap_stem + mode="string" had to be handled properly + ^ and ! changed to t_ and o_, as per new PLAIN conventions + make cmchar "outer" + t_ is now `relaxed' if it is useless + soft is now softjoin in PLAIN (we must set join_radius:=u) + eps is now in PLAIN + vair is vrounded but at least 1; also slab, etc. + cal nibs, yscaled by cap_hair not vair + autorounding and smoothing turned off + +ROMANL.MF: + a: `footed' version is .25u tighter at the right + b,d,varg,p,q: x4l position relative to .5(w-serif_fit) not 5u + e: testpath uses .r not .l (because of cmss10) + f: added 1 at right for monospace lowres versions + varg: robust sans-serif terminal at tail + m: missing `round' in r adjustment caused noninteger chardx + r: x4 based on w, not 5.25u + s: watch out that ess isn't so small that badpos error occurs (also ROMANU) + barbs made longer; based on middle stroke not just h + t: sans-serif terminal made more robust in extreme cases + w: in non-monospace hefty serif case, the middle point comes to .8h not h + y: robust sans-serif terminal at tail + +ROMANU.MF: + E: good.y used in y9 + +PUNCT.MF: + []: side_thickness needed to be maxed with crisp.breadth + +1 or -1 makes lowres versions more distinctive + #: tricky part lost at low resolution + +SYMBOL.MF: + angle brackets: +1 and -1 to make lowres versions more distinctive + aleph: eps added so that y5 will be well defined at lowlowres + +SYM.MF: + integral sign: bulbs need to be in right direction at lowlowres + +CALU.MF: + A: apex moved slightly down + D: less flat at top, slightly lower lobe + F: u less right sidebar + H: soft corner at upper left + I: middle stroke more like J, upper bar a little further right + K: introduce t_ in case of aspect_ratio + L: darker + M: lighter first diagonal; clean the joins + N: lighter diagonal; clean bottom right; .5u less right sidebar + O: shortened the inner stroke + P: stem comes lower + Q: tail not so long at left + R: not so flat at top; diagonal less tense; tail less high + T: narrower, also changed like I, .5u less right sidebar, + heavier, not so high at right + U: less extreme curve at lower left + V: cleaned up at bottom; lighter first diagonal; slightly wider + W: changed like V, but double + X: new design, less rigid + Y: new design based more on V than U + Z: tighter at right, heavier at top and bottom + +CMSS10.MF: + decreased notch_cut and bar_height + +%Note: The following can presumably be deleted; I removed it from CMBASE because +% I don't think it is used any more: +vardef parallel_pos(expr d,u,v,w) = % point at distance $d$ from $u$, + % on the line through $w$ that's parallel to |u..v| + pair p_; p_=w+whatever*(u-v)=u+whatever*(u-v) rotated 90; + numeric d_; d_=length(u-p_); % distance from $w$ to |u..v| + if d_>=d: p_ else: p_+(d+-+d_)*unitvector(v-u) fi enddef; + Changes subsequent to `Version 1' as released on October 7, 1985. + +1. thin_join should be subject to blacker: +@x in CMBASE.MF, the font_setup routine + define_whole_pixels(letter_fit,thin_join,fine,crisp,tiny); + define_whole_vertical_pixels(body_height,asc_height, + cap_height,fig_height,x_height,comma_depth,desc_depth,serif_drop); + define_whole_blacker_pixels(hair,stem,curve,flare, +@y + define_whole_pixels(letter_fit,fine,crisp,tiny); + define_whole_vertical_pixels(body_height,asc_height, + cap_height,fig_height,x_height,comma_depth,desc_depth,serif_drop); + define_whole_blacker_pixels(thin_join,hair,stem,curve,flare, +@z +@x + if thin_join=0: thin_join:=1; fi +@y +@z +[Note, December 11: My first correction also introduced the statement + if fine1): +vardef Vround primary y = y_:=vround y; + if y_75: + p.e:=z4e{right}..tension atleast.9 and 1..{dir 75}z5e; fi endfor + filldraw stroke pulled_super_arc.e(2,3)(.7superpull) + & pulled_super_arc.e(3,4)(.5superpull) & p.e; fi % arc and lower terminal +@z +@x in ROMSPL, page 5 +lft x8r=hround(stem_edge+.5u+1); x7=max(x8l+eps,.4[lft x8r,x6]); +@y +lft x8r=min(hround(stem_edge+.5u+1),lft x8r+x6r-2eps-x8l); +x7=max(x8l+eps,.4[lft x8r,x6]); +@z +@x in ROMAND and OLDDIG, "2" + lft x1r=hround .75u; bot y1l=vround .7h; y1r:=good.y y1r; x1l:=good.x x1l; +@y + lft x1r=hround .75u; bot y1l=vround .7h; y1r:=good.y y1r+eps; x1l:=good.x x1l; +@z +@x in SYMBOL, page 42 (Fraktur R) +z=(z20{up}...{right}z21)intersectionpoint(z22l--z22l+(h,0) rotated theta); +@y +path p; p=z20{up}...(z21--(w,y21)); +z=p intersectionpoint(z22l--z22l+(h,0) rotated theta); +@z + +23. Another consequence of change 2: +"vround" should be "Vround" in the BIGDEL programs for extensible arrows +(five times). +Also five times in the BIGOP programs for summation, product, coproduct. + +24. Cosmetic change to bring CMBASE in line with PLAIN. +@x in CMBASE.MF +def pickup secondary q = + if numeric q: currentpen:=pen_[q]; + pen_top:=pen_top_[q]; pen_bot:=pen_bot_[q]; + pen_lft:=pen_lft_[q]; pen_rt:=pen_rt_[q]; + currentpen_path:=pen_path_[q]; + if known breadth_[q]: currentbreadth:=breadth_[q]; fi + else: currentpen:=q yscaled aspect_ratio; + pen_top:=(ypart penoffset left of currentpen)_o_; + pen_bot:=(ypart penoffset right of currentpen)_o_; + pen_lft:=xpart penoffset down of currentpen; + pen_rt:=xpart penoffset up of currentpen; + path currentpen_path; + fi enddef; +@y +def numeric_pickup_ primary q = + currentpen:=pen_[q]; + pen_lft:=pen_lft_[q]; pen_rt:=pen_rt_[q]; + pen_top:=pen_top_[q]; pen_bot:=pen_bot_[q]; + currentpen_path:=pen_path_[q]; + if known breadth_[q]: currentbreadth:=breadth_[q]; fi enddef; +@z + +25. false italic correction in lambda of texset fonts (Feb 25, 1986) +@x in TEXSET +mode_setup; font_setup; +@y +mode_setup; font_setup; mono_charic#:=0; +@z +@x ibid +slant:=mono_charic#:=0; % the remaining characters will not be slanted +@y +slant:=0; % the remaining characters will not be slanted +@z +[now remove the occurrences of `charic:=0;' in TSETSL, as they are unnecessary] + +*** The above changes are incorporated into the published book, +*** Computer Modern Typefaces; this is "Version 2" (released March 5, 1986). + Changes subsequent to `Version 2' as published in C&T, Volume E: + +@x in GREEKU +numeric shaved_stem; shaved_stem=hround .9[vair,.85cap_stem]; +@y +numeric shaved_stem; shaved_stem=hround .9[vair,.85cap_stem]; +if shaved_stem1.2upper_side: upper_side:=lower_side; fi +@z +% Note: the SAME change should also be made in files ITALD and OLDDIG + +@x in ITALL [this fixes italic ell especially at low resolutions] +top y1=h; x1=x2; filldraw stroke z1e--z2e; % stem +@y +top y1=h; x1=x2; filldraw stroke z1e--z2'e; % stem +@z + +@x in SYM, the plus-or-minus character +x1=x2=.5w; lft x3=lft=x5=hround u-eps; x4=x6=w-x3; +@y +x1=x2=.5w; lft x3=lft x5=hround u-eps; x4=x6=w-x3; +@z actually the code worked but it was "infelicitous" + +@x in SYMBOL, the minus-or-plus character +x1=x2=.5w; lft x3=lft=x5=hround u-eps; x4=x6=w-x3; +@y +x1=x2=.5w; lft x3=lft x5=hround u-eps; x4=x6=w-x3; +@z actually the code worked but it was "infelicitous" + +@x in ROMANU, letter J [fixes a bug if dish=0 and crisp. +Corrected 21 Apr 87.) + +113. \bibitem doesn't work when there's a \nofiles declaration. +(Discovered by Arthur Ogawa. Corrected 29 Apr 87.) + +114. Spaces produced by a \verb command (e.g., `verb| x |') are +deleted if they appear at the beginning of a line. I don't know +if this is a bug or a feature. (Discovered by R. J. Smith.) + +115. A figure or table environment appearing between paragraphs (in +vertical mode) can produce extra vertical space in the document between +those paragraphs. (Discovered by Arthur Ogawa. Corrected 26 May 87.) + +116. An obscure bug in the \caption command can cause it to leave +extra vertical space above the caption if the command is not +preceded by a blank line. This extra space does not appear +when a \nofiles command is used. (Discovered by Peter Schilling. +Corrected 12 Jun 87.) + +117. A \put or \multiput with an argument beginning "plus" or "minus" +causes an error. (Discovered by Don Knuth. Corrected 20 Jul 87.) + +118. \dotfill and \hrulefill don't work right in `tabular' and +`array' environments. (Discovered by Rainer Schoepf. Corrected +[in LPLAIN.TEX] 24 Jul 87.) + +119. The `p' option in an array or tabular environment puts a normal +depth strut at the bottom of the parbox, which results in too much +space if the last line of the box has a descender. I don't see +any reasonable way to fix this. (Discovered by John Lavagnino.) + +120. The default \cite command was changed to put a space between +multiple citations--for example, to produce `[1, 5, 17]' instead +of `[1,5,17]'. (Suggested by John Ellis. Changed 21 Nov 87.) + +121. The \newcommand and \renewcommand commands left the LaTeX +internal control sequence \@tempb \let to `#'. While not causing +any problem in LaTeX, it caused bugs in other people's document +styles. Fixed by replacing \@tempb in those commands with +something more untypeable. (Change made 23 Nov 87.) + +122. Figures were typeset with \boxmaxdepth = 0pt, which could screw +up some macros--in particular, plain TeX's \overrightarrow. +(Bug found by Thomas H. Cormen. Corrected 15 Dec 87.) + +123. The fix for 122 broke \marginpar, so it did not work at all. +(Corrected 3 Jan 88.) + +124. The \frame command put an extra space after the box. +(Discovered by John Hershberger, corrected 14 Jan 88.) + +125. \parskip wasn't restored in parboxes and footnotes, so it would +have the wrong value when a parbox or footnote appeared in a list +environment. (Discovered by Dominik Wujastyk, corrected 20 Jan 88.) + +126. The leaders were not properly aligned in multiple-line +table-of-contents entries. (Discovered by Gunther Hartmann, corrected +25 Jan 88.) + +127. Strange things can happen if a command like \footnotemark that +doesn't generate in-line text appears between a \paragraph or +\subparagraph command (or any sectioning command that produces a +heading that's part of the following paragraph) and the following text. +What happens is that TeX sees the \footnotemark command before it sees +the argument to the \{sub}paragraph command, which can lead to +incorrect numbering and who knows what else. Any attempted fix is +likely to break other things, so I will not try to fix this. +(Discovered by Ed Zalta and Emma Pease.) + +128. A marginal note is misplaced if there is a footnote preceding +it on the same page. (Found by Chris Rowley. Corrected 26 Feb 88.) + +129. In SLiTeX, Two adjacent \frac's run into one another. (Found by +Stephen Pohlig.) + +130. In SLiTeX, in an array or tabular environment, the rules formed +by a `|' argument and by an \hline and \cline command appear in all +color layers. (Corrected 8 Jun 88.) + +131. If, for a counter foo, \thefoo is defined to contain mention of a +non-preloaded font, then a \label{bar} command that involves counter +foo will write some garbage on the .aux file causing an error on a +\ref{foo} command. (Reported by Peter K. Schilling. Corrected 20 Jul 88.) + +132. If a \contentsline or \addtocontents command immediately precedes +an \include, then the table of contents line it produces may appear +later than the contents lines added by the included file. There does +not appear to be an easy fix for this. +(First reported by Rainer Schoepf and Frank Mittelbach) + +133. If the output routine is called while in a tabbing environment, +strange things can happen because \-, \', etc. have unusual +definitions. (Reported by Detlev Droege and Friedrich Haubensak. +Corrected 4 Aug 88.) + +134. Redefining something like \thefigure to include a size-changing +command like \small causes an error when a \ref referes to a label that +labels a figure environment. This problem can be solved by using +\protect\noexpand\protect\small instead of \small. I'm not sure +if this is a bug, and I doubt if I'll fix it. (Reported by Peter +Schilling.) + +135. The \pagebreak and \nopagebreak commands have no effect +inside a tabbing or eqnarray environment. (Reported by Mik Bickis.) + +136. Typing "\hspace*{...} plus ..." causes an error. (Reported by +Emma Pease. Corrected 13 Oct 1988.) + +137. The size of the circle printed by \circle{L} not a monotonic +function of L. (Reported by Nick North, diagnosed by Ian Young. +Corrected 1 Nov 1988.) + +138. A command like \index or \label could incorrectly suppress a +space after the next \end command. (Reported by Johannes Braams. +Partially fixed on 30 Nov 88. Problem can still occur if \index or +\label command comes inside the \end's environment.) + +139. Extra vertical space appears below a `p' entry in a tabular or +array environment if the last line has nonzero depth. (Reported by +Michael DeCorte. Corrected 14 Jan 1989.) + +149. A \multicolumn command did not work right immediately +before a \\[D] command when D was a positive length. +(Reported by John Lee. Corrected 8 Feb 89.) + +150. In the minipage environment, spacing between footnotes is too small +(Found by Don Hosek. Corrected 27 Mar 89.) + +151. \pounds didn't work in math mode. (Discovered by Don Hosek. +Corrected 10 Apr 89.) + +152. \indexentry commands instead of \glossaryentry commands are +written on the .glo file. (Discovered by William D. Partain. +Corrected 14 Apr 89.) + +153. Following minor changes made + \include: prevent space in \include{foo } from wiping out input file. + \begin-\end: detects unmatched \begin ended with \end{document} + \verb: the leading spaces in \verb+ foo+ will not be dropped at the + beginning of a line. +Also, minor changes to \newline (\\ in paragraph mode), minipage +environment, \tableofcontents, \listoffigures, and \listoftables +that should produce no noticable effects. (Changes made 24 May 89, +mostly based on suggestions by by Frank Mittelbach and Rainer Sch\"opf. + +154. A bug in the picture environment caused an extra space to appear +in a picture if an offset is specified and the environment begins with +a declaration that generates a \special or some such TeX "other". +(Corrected 13 Jun 89.) + +155. Change 137 introduced a problem with the \oval command. +(Reported by David Long and several other users, corrected 7 Dec 89.) + + + CHANGES TO .DOC AND .STY FILES AND OTHERS + ----------------------------------------- + +[Changes needed to conform with changes to LaTeX are not noted.] + +1. \caption doesn't work properly with optional argument. (Corrected 28 Dec 83) + +2. The change to the thebibliography environment described in item 2 +below requres a change to the .STY files. (Change made 28 Dec 83) + +3. The description environment was changed to allow a larger value +of \leftmargin than the default. The parameter \descriptionlabelwidth +gives the maximum value of \labelwidth for a description environment. +It should be \def'd to something like .2\linewidth. (Change made 31 Dec 83) + +4. A minor bug in a \mark command made it possible for a page heading +to come on an earlier page than it should. (Change made 13 Jan 84) + +5. Version 2.06 eliminated the .PLO files and completely changed the +organization of the .STY files. See LERRATA.TEX. + +6. The style files were changed to accomodate the new convention that +assumes printing starts one inch from the top and left edges of the paper. + +7. LABLST.TEX did not work with Version 2.06. (Corrected 18 July 84.) + +8. The default margins for the list environment weren't being set +properly in SLIDES.DOC/STY. (Corrected 26 July 84.) + +9. The table* environment was producing single-column rather than +double-column tables. (Corrected 16 September 84.) + +10. In the letter style, commands like \it didn't work right when +the appeared in mailing labels. (Corrected 21 September 84) + +11. \begin{displaymath} ... \end{displaymath} doesn't work right +in the fleqn style option. (Corrected by a change in Version 2.07.) + +12. In the letter style, a null argument of a \begin{letter} +produced an error. (Corrected 21 October 1984.) + +13. Multiple paragraph footnotes don't work properly. (Corrected +8 November 1984) + +14. In normal article style, the \maketitle command did not prevent a +figure from going above it at the top of the page. (Corrected 9 +November) + +15. The thebibliography environment messed up when there were more +that 26 items. (Corrected 9 November) + +16. The letter document style for Version 2.07 had incorrect +enumerate and itemize environments. (Corrected 9 November) + +17. The article style was changed so the thebibliography command +produces the title "References" instead of "Bibliography". (Note that +report style still produces "Bibliography".) (Changed 17 November +1984) + +18. LABLST.TEX may die if there's an un\protect'ed font-changing +command in a table of contents entry. (Corrected 24 November 1984) + +19. A list inside a trivlist environment, like a theorem environment, +doesn't work right. (Corrected 27 November 1984) + +20. The report style messed up page headings in single-sided output with +the headings option. (Corrected 5 December 1984) + +21. The quotation environment puts extra space between paragraphs. +(Corrected 3 January 1985). + +22. The \[ ... \] environment had a minor bug in the fleqn style option. +(Corrected 6 February 1985) + +23. A change was made to the letter style that should fix the +anomalous page breaking. (Thanks to Mike Fischer for tracking it +down.) (Change made 9 February 1985) + +24. A sectioning command (like \paragraph) that produces an in-line +heading (not on a separate line) doesn't work properly when it is +immediately followed by a list or trivlist environment, or one that +uses those environments (like verbatim or quote). (Corrected in Version +2.09.) + +25. The leqno style option doesn't work. (Corrected 20 May 1985) + +26. The `slides' document style ignored all style options. (Corrected +20 November 1985) + +27. \tableofcontents, \listoffigures, \bibliography, etc. affect the +page headings when the myheadings style is used. (Reported by +Tim Morgan.) (Corrected 17 December 85) + +28. The old version of the description environment was inadvertantly +left in the `letter' and `slides' style. (Reported by Rusty Wright.) +(Corrected 17 January 86) + +29. In all styles: no hyphenation is done in multi-line figure and +table captions. + +30. Labels in the letter style did not work right if the user changed +\parindent. (Reported by Mike Fischer, corrected 5 Mar 86.) + +31. The `ifthen' style option was modified to make \protect work +in the `test' argument of \ifthenelse and \while. +(Problem reported by Tor Lillqvist, corrected 28 Oct 1986) + +32. A bug in the `ifthen' style made \equal not work after a +\newcommand, \newenvironment, \renewcommand, or \renewenvironment +command. (Problem reported by Tor Lillqvist, corrected 16 December 1986) + +33. With the `fleqn' style option, the text following a displayed +equation always began a new paragraph, even if it was not preceded +by a blank line. (Reported by Joe Weening, corrected 9 March 1987) + +34. If a size-changing command is given at the outermost brace and +\begin-\end level, and is followed by a \normalsize command, then +the parameters used for controlling first-level lists are messed up. +(Reported by Tom Hofmann, corrected 9 Jun 1987.) + +35. The letter style was changed to make the \date command have +the expected effect. (Suggested by John Pavel. Change made +20 Jul 87.) + +36. In the definition of \newblock inside \thebibliography, there +was a "minus -.07ex" that should have been "minus .07ex". +(Found by Oren Patashnik, corrected 12 October 1987.) + +37. In the `openbib' style option, a couple of "\markboth"s should +have been "\@mkboth"s. (Found by Oren Patashnik, corrected 12 October +1987.) + +38. A first-level list environment inside a trivlist environment +messes up the left margin. (Reported and correction suggested +by Martha Wershofen, corrected 22 December 1987.) + +39. The \label command did not work for cross-referencing parts. +(Reported by Paul Karger, corrected 19 January 1988.) + +40. Changes made to \l@section command (article style) and \l@chapter +command (book, report styles) for making table of contents entries to +conform to 25 Jan 88 change to \numberline. (Reported by +Gunther Hartmann, corrected 5 February 88.) + +41. \protect did not work in the argumment to an \index command +when the showidx style option is used. (Reported by Nelson Beebe. +Corrected 22 Feb 88.) + +42. The definitions in the standard style did not allow the labels +in an `enumerate' environment to be changed in the usual way be +redefining `\theenum...'. (Corrected 16 Mar 88.) + +43. With \pagestyle{empty}, a \chapter command still produces a page +number on the first page of a chapter. (Reported by Peter Schilling 3 +June 88. Deemed not worth correcting.) + +44. A bug in the `letter' style caused a number to disappear from +the output if it occurred at the beginning of a paragraph after +a \ps. (Corrected 20 Sep 88.) + +45. Report and book styles: Changed macros that produced "part" and +"chapter" table-of-contents entries to improve page breaking. +(Changed 24 May 89, as suggested by Jerry Leichter.) + +46. In the fleqn style, \@beginparpenalty and \@endparpenalty were +used instead of \predisplaypenalty and \postdisplaypenalty before and +after a displayed equation made with \[ ... \] or the "equation" +environment. (Reported by Rainer Sch\"opf and Frank Mittelbach. +Corrected 24 May 89.) + +47. The fix to the fleqn style reported in number 46 (24 May 89) +re-introduced bug fixed in number 33 (9 Mar 87). +(Corrected 26 Sep 89.) + +48. Certain keywords like "height" caused an error in an \index +command with the showidx style option. (Reported by Joachim Schrod, +corrected 11 Oct 89.) + +49. A bug in the definition of \part in the book and report styles +made them use the optional argument instead of the regular argument +for the heading printed in the text. (Reported by Richard Roy, +corrected 13 Nov 89.) + + + + CHANGES TO THE MANUAL + --------------------- + +See ADDENDUM.TEX diff --git a/info/digests/tex-implementors/message.00 b/info/digests/tex-implementors/message.00 new file mode 100644 index 0000000000..0d88797353 --- /dev/null +++ b/info/digests/tex-implementors/message.00 @@ -0,0 +1,61 @@ +Date: 25 Nov 87 + +To: TeX implementors and distributors with unknown net addresses + +From: Barbara Beeton + +Subject: An early-warning system for TeX system bugs, etc. + + +The message below has been sent out in electronic mail to everyone I know +who is actively engaged in maintaining a distinct implementation of the TeX +system or is a distributor from whom the TeX user population expects to be +able to obtain an up-to-date, reliable version of the software. I know no +way of reaching some implementors/distributors through electronic mail, +hence this paper communication. + +Also enclosed is the first "real" message sent to the electronic list. + +If you feel that you should receive the kind of information that will be +distributed to this list, please let me know as soon as possible. I would +prefer to communicate via electronic mail, but if that is impossible, I +have enlisted the TUG office manager to help with the paper distribution; +that route will not be as speedy, however. So, if you have an electronic +address, please provide it in a form that can be reached from the Arpanet. +(I'm a real amateur when it comes to dealing with network gateways.) + + ------------------------------ + +Date: Fri 20 Nov 87 03:51:48-EST +From: b beeton +Subject: test message + +greetings. i've taken it upon myself to try to build a distribution list +of tex implementors and others working in the tex front lines. i include +here anyone who is in charge of maintaining a "master" version of tex or +metafont that is intended for further distribution, primary maintainers of +tex bulletin boards or information distribution centers, and the like. +for the first real message, i intend to send out the details of recent +tex bugs (version 2.7 was posted by don knuth on nov 18). however, before +sending out a large message, i'd like to verify the address list, since i've +had quite a bit of trouble getting some addresses to work. + please check the address to which this message was sent to you. +if you know a better, shorter, or more reliable address, please let me know +right away. in fact, if the message reaches you, let me know that too. +(the mailer daemon will let me know soon enough which addresses are true +disasters.) if you know anyone else who deserves to be on this list, +send me the name, address, and a reason why that person should be added. +i'm interested in keeping the list as short as possible, but i also don't +want to leave out anyone who might be spreading out-of-date implementations +about the countryside. + i also intend to limit the content of mailings to this list to +information absolutely relevant to maintaining a tex system distribution +at a current level. suggestions are indeed welcome. + note that the math society has now joined the arpanet world. if +you have trouble using the address @seed.ams.com (there are still some +bugs causing problems from some gateways and individual sites, particularly +usenet sites), reply to beeton@score.stanford.edu and it will be forwarded +automatically. + -- bb +------- +------- diff --git a/info/digests/tex-implementors/message.01 b/info/digests/tex-implementors/message.01 new file mode 100644 index 0000000000..3a8ae258df --- /dev/null +++ b/info/digests/tex-implementors/message.01 @@ -0,0 +1,201 @@ +Date: 25 Nov 87 Message No: 001 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: First informational message from the early-warning system + + +Below is an extract from Knuth's TeX82.BUG file dated 17 Nov 87, 15:03. +This includes changes from version 2.2 - 2.7 inclusive. + +Note that this file contains only essential changes to program code. +Some trivial code changes and most changes to documentation are not +included in this list. Most appear in the ERRATA.TeX file, but that is +not the easiest source of information to use when updating a .WEB file. + +I have used the TOPS-20 program SRCCOM to generate a differences list +between Knuth's version 2.7 file and a version 2.0 file received on a +distribution tape. If you would like a copy, let me know; it is about +31Kbytes -- too big to want to include in a general message, but well +able to be sent out on request. + +I understand that corrected pages of volumes B, C and D of C&T have been +sent to Addison-Wesley, so revised editions should be appearing in a few +months. The latest version of Knuth's errata list is dated 18 Nov 87; it +contains only changes since 15 Jun 87, and is about 9Kbytes. This too +will be sent to anyone requesting it. + +Future messages will assume that TeX version 2.7 is the baseline version. + +Here is the summary from TeX.WEB describing the nature of the changes. + +% Version 2.1 corrects anomalies in discretionary breaks (January 1987). +% Version 2.2 corrects "(Please type...)" with null \endlinechar (April 1987). +% Version 2.3 avoids incomplete page in premature termination (August 1987). +% Version 2.4 fixes \noaligned rules in indented displays (August 1987). +% Version 2.5 saves cur_order when expanding tokens (September 1987). +% Version 2.6 adds 10sp slop when shipping leaders (November 1987). +% Version 2.7 improves rounding of negative-width characters (November 1987). +% A reward of $40.96 will be paid to the first finder of any remaining bug. +% (This amount will double again in 1988.) + +************************************************************************ + +*** Version 2.1 was released on January 26, 1987. + +326. Removal of redundant code (found by Pat Monardo, 5 Feb 87) +@x module 1224 [this change need not be made, since it has no effect] + char_def_code: define(p,char_given,cur_val); + math_char_def_code: define(p,math_given,cur_val); +@y the cases cannot occur, so we simply don't list them +@z + +327. More robustness is needed when debugging (Ronaldo Am\'a, 14 Apr 87) +@x module 174 +begin while p>null do +@y maybe mem_min>null (but nodes shouldn't be put in location mem_min exactly) +begin while p>mem_min do +@z +@x module 182 +@p procedure show_node_list(@!p:pointer); {prints a node list symbolically} +@y +@p procedure show_node_list(@!p:integer); {prints a node list symbolically} +@z +@x module 182, continued +while p>null do +@y +while p>mem_min do +@z + +328. Storage allocation can be more elegant and efficient (4/21/87) +@x module 127 +if r=p then if ((rlink(p)<>rover) or (llink(p)<>rover)) then +@y +if r=p then if rlink(p)<>p then +@z + +329. Miscalculation of empty-line condition (April 22, 1987) +@x module 360 + begin if limit=start then {previous line was empty} +@y + begin if (end_line_char<0)or(end_line_char>127) then incr(limit); + if limit=start then {previous line was empty} +@z + +330. A case where we don't have to assume system bookkeeping (April 28, 1987) +@x module 560 +done: b_close(tfm_file); read_font_info:=g; +@y [suggested by Jim Sterken] +done: if file_opened then b_close(tfm_file); +read_font_info:=g; +@z [this was not a bug, according to the comment in module 28] + +331. jump_out must fix unfinished output (Found by Klaus Gunterman, 3 Aug 87) +@x module 593 +doing_leaders:=false; dead_cycles:=0; +@y +doing_leaders:=false; dead_cycles:=0; cur_s:=-1; +@z +@x module 617 +cur_s:=-1; ensure_dvi_open; +@y +ensure_dvi_open; +@z +@x module 640 +dvi_out(eop); incr(total_pages); +@y +dvi_out(eop); incr(total_pages); cur_s:=-1; +@z +@x module 642 +if total_pages=0 then print_nl("No pages of output.") +@y +while cur_s>-1 do + begin if cur_s>0 then dvi_out(pop) + else begin dvi_out(eop); incr(total_pages); + end; + decr(cur_s); + end; +if total_pages=0 then print_nl("No pages of output.") +@z + +332. \hangindent=1pt$$\halign{...\cr\noalign{\hrule}}$$ problem (19 Aug 87) +@x module 805 +q:=link(head); +@y +q:=link(head); s:=head; +@z +@x module 805, continued + q:=link(q); +@y + s:=q; q:=link(q); +@z +@x module 806 +if is_running(depth(q)) then depth(q):=depth(p); +@y +if is_running(depth(q)) then depth(q):=depth(p); +if o<>0 then + begin r:=link(q); link(q):=null; q:=hpack(q,natural); + shift_amount(q):=o; link(q):=r; link(s):=q; + end; +@z + +333. \hskip 0pt plus 1fil\ifdim problem (found by Alan Guth, 20 Aug 87) +@x module 366 +@!cvl_backup,@!radix_backup:small_number; {to save |cur_val_level| and |radix|} +@y +@!cvl_backup,@!radix_backup,@!co_backup:small_number; + {to save |cur_val_level|, etc.} +@z +@x +backup_backup:=link(backup_head); +@y +co_backup:=cur_order; backup_backup:=link(backup_head); +@z +@x +link(backup_head):=backup_backup; +@y +cur_order:=co_backup; link(backup_head):=backup_backup; +@z + +334. leaders too sensitive near exact multiples (M. F. Bridgland, 9 Nov 87) +@x module 626 + begin edge:=cur_h+rule_wd; lx:=0; +@y + begin rule_wd:=rule_wd+10; {compensate for floating-point rounding} + edge:=cur_h+rule_wd; lx:=0; +@z +@x ibid + cur_h:=edge; goto next_p; +@y + cur_h:=edge-10; goto next_p; +@z +@x module 635 + begin edge:=cur_v+rule_ht; lx:=0; +@y + begin rule_ht:=rule_ht+10; {compensate for floating-point rounding} + edge:=cur_v+rule_ht; lx:=0; +@z +@x ibid + cur_v:=edge; goto next_p; +@y + cur_v:=edge-10; goto next_p; +@z + +335. Glitch in fixed-point multiplication of negatives (W.G. Sullivan, 17Nov87) +@x module 572 +begin alpha:=16*z; beta:=16; +while z>=@'40000000 do + begin z:=z div 2; beta:=beta div 2; + end; +@y +begin alpha:=16; +while z>=@'40000000 do + begin z:=z div 2; alpha:=alpha+alpha; + end; +beta:=256 div alpha; alpha:=alpha*z; +@z + +336. (I sincerely hope that there won't be any more) +------- diff --git a/info/digests/tex-implementors/message.02 b/info/digests/tex-implementors/message.02 new file mode 100644 index 0000000000..df89221ea3 --- /dev/null +++ b/info/digests/tex-implementors/message.02 @@ -0,0 +1,156 @@ +Date: 17 Dec 87 Message No: 002 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: Announcing TeX 2.8 and other matters + + +Yet another bug, albeit of limited effect, has been detected and fixed +in TeX; the two messages below from Don Knuth describe the bug and another +problem that has also been called to his attention. The details from the +bug file and a source file .diff list (2.8 to 2.7) follow after that. + +I'd like to thank everyone for suggestions on useful topics for future +communications. I have the following on the list: + + Metafont -- details of changes after version 1.0 + Trip and Trap tests -- changes to the tests and test results, + since TeX 2.0 and Metafont 1.0 + LaTeX -- cumulative changes since the earliest version 2.09, with + context to permit their installation + AMSTeX -- a new version, fully documented, will appear early + next year + Fonts originating at the AMS -- a full set of 300dpi versions will + be made available to all distributors, and I will try to + arrange for installation at Score. This includes Euler + (Fraktur, script and cursive, in both lightface and bold + versions), cyrillic, and 2 math symbol fonts. Projected + timeframe, May-June 1988. + +Of course, any new messages from Don Knuth will be forwarded post-haste. +And all additional suggestions are welcome. + + -------------------- + +Date: 12 Dec 87 1639 PST +From: Don Knuth +Subject: a truly insignificant TeX bug +To: BB@SAIL.Stanford.EDU, DRF@SAIL.Stanford.EDU + +Peter Breitenlohner in Munich just reported a glitch that would cause +trouble only if all of the following were true: + 1) The user is running INITEX with no hyphenation \patterns; + 2) INITEX tries to hyphenate a word containing a character + whose \lccode is equal to 1 (the minimum value); + 3) The implementation has min_quarterword unequal to its + normal value 0. +I should have set trie_op to min_quarterword in module 952, but I set +it to zero by mistake. If no \patterns are given, the circumstances +above will get past the test "hc[l]=trie_char(z)" in module 923, +and it looks like module 924 will loop endlessly. + +I made version 2.8 just for this, but people with version 2.7 need not +feel behind the times. +------- +Date: 12 Dec 87 1712 PST +From: Don Knuth +Subject: a non-bug +To: BB@SAIL.Stanford.EDU, DRF@SAIL.Stanford.EDU + +I received a note from Joachim Schrod at Darmstadt, who observes that +\dump does save the value of mag_set. Therefore TeX does not +complain if you try to reset the magnification after dumping a program +that already "froze" it. + +My reply to him was that I don't think it wise to change TeX at this +late date just to disallow magnification. If a user really wants to +dump a format for which magnification is to be disallowed, he can +do so with \everyjob. + + -------------------- + +Extract from TeX82.BUG + +336. If there are no \patterns and some \lccode is 1 (Breitenlohner, 12Dec87) +@x module 952 +trie:=link(0)_0; trie:=char(0)_0; trie:=op(0)_0; +@y +trie:=link(0)_0; trie:=char(0)_0; trie:=op(0)_min:=quarterword; +@z + +337. (I sincerely hope that there won't be any more) + + -------------------- + +Extracts from ERRATA.TeX (differences as compared with previous version) + +**** FILE PS:ERRATA.NEW.2, 2-2 (1508) +\bugonpage A326, line 12 (12/12/87) + +\ninepoint\noindent +its natural width. The |\hbox| version also invokes |\everymath|. + +**** FILE PS:ERRATA.TEX.72, 2-2 (1508) +\bugonpage A326, line 12 (9/20/87) + +\ninepoint\noindent +its natural width. The |\hbox| version also invokes |\everypar|. + +*************** + +**** FILE PS:ERRATA.NEW.2, 2-34 (2772) +\bugonpage A465, entry for {\tt\char`\\everymath} (12/12/87) + +\eightpoint\indent[Include also a reference to page 326.] + +**** FILE PS:ERRATA.TEX.72, 2-34 (2770) +*************** + +**** FILE PS:ERRATA.NEW.2, 3-10 (3410) +{\tt This\]is\]TeX,\]Version\]2.8\char'23}\quad +$\{\,$printed when \TeX\ starts$\,\}$ +**** FILE PS:ERRATA.TEX.72, 3-10 (3283) +{\tt This\]is\]TeX,\]Version\]2.7\char'23}\quad +$\{\,$printed when \TeX\ starts$\,\}$ +*************** + +**** FILE PS:ERRATA.NEW.2, 3-143 (7866) +\bugonpage B396, bottom line (12/12/87) + +\ninepoint\noindent\hskip10pt +$\\{trie\_link}(0)\gets0$; $\\{trie\_char}(0)\gets0$; + $\\{trie\_op}(0)\gets\\{min\_quarterword}$; + +**** FILE PS:ERRATA.TEX.72, 3-143 (7739) +*************** + + -------------------- + +Differences between TeX.WEB versions 2.8 and 2.7 + +**** FILE TX:TEX-2-8.WEB.1, 1-26 (1735) +% Version 2.8 fixes weird bug if no \patterns are used (December 1987). +% A reward of $40.96 will be paid to the first finder of any remaining bug. +**** FILE TX:TEX-2-7.WEB.1, 1-27 (1737) +% A reward of $40.96 will be paid to the first finder of any remaining bug. +*************** + +**** FILE TX:TEX-2-8.WEB.1, 1-167 (8995) +@d banner=='This is TeX, Version 2.8' {printed when \TeX\ starts} +@ Different \PASCAL s have slightly different conventions, and the present +**** FILE TX:TEX-2-7.WEB.1, 1-166 (8922) +@d banner=='This is TeX, Version 2.7' {printed when \TeX\ starts} +@ Different \PASCAL s have slightly different conventions, and the present +*************** + +**** FILE TX:TEX-2-8.WEB.1, 1-17868 (772952) +trie_link(0):=0; trie_char(0):=0; trie_op(0):=min_quarterword; +for k:=1 to 127 do trie[k]:=trie[0]; +**** FILE TX:TEX-2-7.WEB.1, 1-17868 (772881) +trie_link(0):=0; trie_char(0):=0; trie_op(0):=0; +for k:=1 to 127 do trie[k]:=trie[0]; +*************** + +------- diff --git a/info/digests/tex-implementors/message.03 b/info/digests/tex-implementors/message.03 new file mode 100644 index 0000000000..b6212d6d1b --- /dev/null +++ b/info/digests/tex-implementors/message.03 @@ -0,0 +1,224 @@ +Date: 24 Dec 87 Message No: 003 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: TeX 2.9, DVItype 2.9 + + +I've just received a message from Don Knuth regarding two messages I +forwarded to him from TeXhax; both appeared in issue 103. + +Oliver Schoett, Negative column widths in \halign -- bug or feature? + +Chris Thompson, re the expansion of \csname...\endcsname to be \relax + +The reply: + + Naturally I'm hoping to get the last bug out of TeX before the + bonus amount doubles next week! + + The "bug or feature" discussed by Oliver Schoett is a feature. + I don't want to forbid negative widths, even though they + can be confusing in certain cases. Negative numbers have + proved to be useful even in accounting, so I hesitate to + say that they will never be desired. + + On the other hand, Chris Thompson has found a bug; I can't argue + that the assignment should be global. Ergo, he wins the prize + and TeX moves to Version 2.9. + +Updates from TeX82.BUG, ERRATA.TeX and a list of differences between +TeX.WEB 2.8 and 2.9 are given below. + +A point to ponder: What's the next number after 2.9? + + -------------------- + +A couple of items need to be cleaned up from earlier messages. + +In message 2, the underline _ and assignment := characters were reversed +in item 336 of the extract from TeX82.BUG. This is an unfortunate result +of my having erred in translating the idiosyncratic SAIL character set by +hand instead of by a nice tested canned procedure. 336 is included in +its correct form in the expanded extract below. Apologies, and thanks to +Chris Thompson for pointing it out. + +The TeX bug fixed in version 2.7 (bug 335) has also been fixed in DVItype +version 2.9. A difference list between DVItype 2.8 and 2.9 appears below. + + -------------------- + +Extract from TeX82.BUG + +336. If there are no \patterns and some \lccode is 1 (Breitenlohner, 12Dec87) +@x module 952 +trie_link(0):=0; trie_char(0):=0; trie_op(0):=0; +@y +trie_link(0):=0; trie_char(0):=0; trie_op(0):=min_quarterword; +@z + +337. \csname might encounter undefined_cs in a group (Chris Thompson, 23Dec87) +@x module 372 + begin eqtb[cur_cs]:=eqtb[frozen_relax]; +@y + begin eq_define(cur_cs,relax,256); +@z + +338. (I sincerely hope that there won't be any more) + + -------------------- + +Extracts from ERRATA.TeX (differences as compared with previous version) + +**** FILE PS:ERRATA.NEW.2, 2-3 (1510) +\bugonpage A213, lines 34--35 (12/23/87) + +\ninepoint\noindent +text will be a single control sequence token, defined to be like |\relax| if +its meaning is currently undefined. + +**** FILE PS:ERRATA.TEX.73, 2-2 (1508) +*************** + +**** FILE PS:ERRATA.NEW.2, 3-6 (3474) +\bugonpage B2, line 32 (12/23/87) + +\ninepoint\noindent\hskip10pt +{\bf define} $\\{banner}\equiv\hbox{\tt\char'23}$% +{\tt This\]is\]TeX,\]Version\]2.9\char'23}\quad +**** FILE PS:ERRATA.TEX.73, 3-6 (3290) +\bugonpage B2, line 32 (11/17/87) + +\ninepoint\noindent\hskip10pt +{\bf define} $\\{banner}\equiv\hbox{\tt\char'23}$% +{\tt This\]is\]TeX,\]Version\]2.8\char'23}\quad +*************** + +**** FILE PS:ERRATA.NEW.2, 3-34 (4391) +\bugonpage B156, line 28 (12/23/87) + +\ninepoint\noindent\hskip20pt +{\bf begin }$\\{eq\_define}(\\{cur\_cs},\\{relax},256)$; + +\bugonpage B157, mini-index (12/23/87) + +\eightpoint\noindent +Delete the entries for `\\{eqtb}' and `\\{frozen\_relax}'; replace them +by the following: +\\{eq\_define}: {\bf procedure}, \S227.\par +$\\{relax}=0$, \S207.\par + +**** FILE PS:ERRATA.TEX.73, 3-34 (4207) +*************** + +**** FILE PS:ERRATA.NEW.2, 3-178 (8959) +\bugonpage B551, both columns (12/23/87) + +\eightpoint[Remove `372' from \\{eqtb} and put it into \\{eq\_define}.] + +\bugonpage B554, left column (12/23/87) + +\eightpoint[Remove `372' from \\{frozen\_relax}.] + +**** FILE PS:ERRATA.TEX.73, 3-164 (8413) +*************** + +**** FILE PS:ERRATA.NEW.2, 3-195 (9393) +\bugonpage B567, left column (12/23/87) + +\eightpoint[Insert `372' into \\{relax}.] + +**** FILE PS:ERRATA.TEX.73, 4-1 (8633) +*************** + + -------------------- + +Differences between TeX.WEB versions 2.9 and 2.8 + +**** FILE PS:<1SCRATCH>TEX.WEB.3, 1-26 (1735) +% Version 2.9 makes \csname\endcsname's "relax" local (December 1987). +% A reward of $40.96 will be paid to the first finder of any remaining bug. +**** FILE PS:TEX.WEB.3, 1-27 (1737) +% A reward of $40.96 will be paid to the first finder of any remaining bug. +*************** + +**** FILE PS:<1SCRATCH>TEX.WEB.3, 2-93 (9066) +@d banner=='This is TeX, Version 2.9' {printed when \TeX\ starts} +@ Different \PASCAL s have slightly different conventions, and the present +**** FILE PS:TEX.WEB.3, 1-166 (8922) +@d banner=='This is TeX, Version 2.8' {printed when \TeX\ starts} +@ Different \PASCAL s have slightly different conventions, and the present +*************** + +**** FILE PS:<1SCRATCH>TEX.WEB.3, 26-119 (332316) + begin eq_define(cur_cs,relax,256); + end; {the control sequence will now match `\.{\\relax}'} +**** FILE PS:TEX.WEB.3, 1-7543 (332196) + begin eqtb[cur_cs]:=eqtb[frozen_relax]; + end; {the control sequence will now match `\.{\\relax}'} +*************** + + -------------------- + +Differences between DVItype.WEB versions 2.9 and 2.8 + +**** FILE TX:DVITYPE.WEB.1, 1-14 (823) +% Version 2.9 changes negative scaling as in TeX version 2.7 (November, 1987). +% Here is TeX material that gets inserted after \input webmac +**** FILE TX:DVITYPE.WEB.7, 1-15 (825) +% Here is TeX material that gets inserted after \input webmac +*************** + +**** FILE TX:DVITYPE.WEB.1, 1-33 (1532) + \centerline{(Version 2.9, November 1987)} + \vfill} +**** FILE TX:DVITYPE.WEB.7, 1-32 (1452) + \centerline{(Version 2.8, August 1984)} + \vfill} +*************** + +**** FILE TX:DVITYPE.WEB.1, 1-81 (4122) +@d banner=='This is DVItype, Version 2.9' {printed when the program starts} +@ This program is written in standard \PASCAL, except where it is necessary +**** FILE TX:DVITYPE.WEB.7, 1-80 (4040) +@d banner=='This is DVItype, Version 2.8' {printed when the program starts} +@ This program is written in standard \PASCAL, except where it is necessary +*************** + +**** FILE TX:DVITYPE.WEB.1, 1-1143 (52850) +integer~|z|, which is known to be less than $2^{27}$. +If $|z|<2^{23}$, the individual multiplications $b\cdot z$, $c\cdot z$, +**** FILE TX:DVITYPE.WEB.7, 1-1142 (52768) +integer~|z|, which is known to be less than $2^{27}$. Let $\alpha=16z$. +If $|z|<2^{23}$, the individual multiplications $b\cdot z$, $c\cdot z$, +*************** + +**** FILE TX:DVITYPE.WEB.1, 1-1150 (53311) +or the same quantity minus $\alpha=2^{4+e}z^\prime$ if $a=255$. +This calculation must be +done exactly, for the reasons stated above; the following program does the +**** FILE TX:DVITYPE.WEB.7, 1-1149 (53247) +or the same quantity minus $\alpha$ if $a=255$. This calculation must be +done exactly, for the reasons stated above; the following program does the +*************** + +**** FILE TX:DVITYPE.WEB.1, 1-1166 (53927) +begin alpha:=16; +while z>=@'40000000 do + begin z:=z div 2; alpha:=alpha+alpha; + end; +beta:=256 div alpha; alpha:=alpha*z; +end +**** FILE TX:DVITYPE.WEB.7, 1-1164 (53847) +begin alpha:=16*z; beta:=16; +while z>=@'40000000 do + begin z:=z div 2; beta:=beta div 2; + end; +end +*************** + + +[ end of message 003 ] +------- diff --git a/info/digests/tex-implementors/message.04 b/info/digests/tex-implementors/message.04 new file mode 100644 index 0000000000..0b67142a3a --- /dev/null +++ b/info/digests/tex-implementors/message.04 @@ -0,0 +1,507 @@ +Date: 29 May 88 Message No: 004 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: TeX early-warning system: status report and TeX 2.92 + + +Owing to a number of problems and general lack of time, this mailing list +has been moribund since the end of last year; the last message sent out +was number 3, dated 24 Dec 87. There have now been some developments +that should be communicated, so we'll try to get things started again. +As it's been so long since the last message, there are some new names on +the list, and I've also changed some addresses to try to keep up with +changes to gateways and other mailer idosyncrasies, I'd appreciate it +if you'd acknowledge your receipt of the message; the mailer doesn't +always say that an address is unreachable, especially if it's going +across network gateways. + +Last week I received the following message from Don Knuth: + + Date: 25 May 88 1911 PDT + From: Don Knuth + Subject: Tex, aka Humpty Dumpty + + (are you ready for this?) + Today I repaired five (5) bugs in TeX and two (2) in METAFONT, + thereby making TeX version 2.92 and MF version 1.4. + + Five. Yes, five. Plus two is seven. + Quite a blow to any feelings of confidence I once had... + + Two TeX bugs were reported, one by Robert Messer and one by Peter + Breitenlohner. The Messer bug appeared last month in TeXhax, where it was + analyzed by Chris Thompson: When I'm scanning a file name, I use the string + pool as a buffer, and this conflicts with use of the string to define a + new control sequence (if the file name contains a macro call that has + parameters that are undefined control sequences). + + Following DRF's dictum, I tried to think if any other bugs of a similar + nature could occur; and indeed I noticed that another case arises if + \string or \meaning or \the or suchlike occur as part of the file name + being scanned. (In previous versions of TeX, constructions like "\input + X\jobname" worked, but only by sheer luck... the `X' was lost and combined + with the \jobname and that whole thing was rescanned... very kludgy and + certainly not what I intended nor would it work with \expandafter.) + + While testing that, I noticed another strange thing you could do with + TeX version 2.91: Try typing \input\romannumeral6 to the ** prompt, + then say \end on the next line; TeX tries to open file ".tex", then it + tells you it has written a transcript file called "viTEXPUT". + + I needed to patch the make_name_string routine when fixing the latter bug. + This is one of the routines that's often in a change file, so people may + have to make a small update to their change file when they install 2.92. + + In summary, I found three bugs because of what Messer reported; luckily + I had to pay for only one of them. What about the others? Well, + Breitenlohner noticed that \patterns would fail if a pattern starts with a + character whose \lccode is 1. While fixing that, I noticed a weird + circumstance that would arise only if an extremely nasty user tried very + hard to cause a range error; thus, five bugs total. + + Both METAFONT bugs were found by Chris Thompson. One was a typo, + easily fixed; the other was craftily contrived in the TRIP/TRAP mold + (I mean, it was not the sort of thing any reasonable person would ever + run into, yet it produced a bug natheless). No bugs had been found in + METAFONT for almost two years, so I had pretty much forgotten how + to install a new version! + + Breitenlohner also pointed out an infelicity in PLAIN.TEX; I've updated + that too. To top it all off, another typo in the MFbook was reported. + + The new sources at SAIL have new versions of TEX.WEB, MF.WEB, PLAIN.TEX, + and all the TRIP and TRAP files. ... + + I've kept ERRATA.TEX[tex,dek] up to date, except that I didn't bother + to show all the changes to indexes and mini-indexes. + + The files TEX82.BUG[tex,dek] and MF84.BUG[mf,dek] are also up to date. + As far as I know, everything at SAIL is now bugfree and self-consistent. + + No amount of apologies can suffice for my stupidities reflected in + all these booboos. + + ...mumble seven new errors my my mumble seven SEVEN seven SEVEN my my + mumble seven... + + +A note seems in order on the reference to SAIL. SAIL (SAIL.Stanford.Edu) +is a DEC-10 running under the WAITS operating system; this is the system +on which Knuth works, and the files here are always the most up-to-date. +When Knuth sends out notice of a new version, the affected files are +transported to SCORE (SCORE.Stanford.Edu), a DEC-20 running under TOPS-20; +the generic distribution tape is generated here, as well as the TOPS-20 +distribution. The TeX system files at SCORE are maintained and updated +by volunteers, who are not always able to react immediately to changes at +SAIL. Both SAIL and SCORE support anonymous FTP, and a later message will +provide more information on that. + +Today's information will consist of the new entries in the TeX82.BUG file, +a comparison of the TeX.WEB files for version 2.92 and 2.9, and the changes +in PLAIN.TeX. + + +######################################################################## + +Additions to TeX82.BUG + +338. \outer\def\a0{}\a\a shows temp_head list garbage (Silvio Levy, 20Apr88) +@x module 391 +repeat if (info(r)>match_token+127)or(info(r)match_token+127)or(info(r)str_start[str_ptr] do + begin decr(pool_ptr); str_pool[pool_ptr+l]:=str_pool[pool_ptr]; + end; {move current string up to make room for another} +for k:=j to j+l-1 do append_char(buffer[k]); +text(p):=make_string; pool_ptr:=pool_ptr+d; +@z + +340. Make patterns work when trie_min=0 (Peter Breitenlohner, 10May88) +@x module 951 +trie_max:=128; trie_min:=128; trie_link(0):=1; trie_taken[0]:=false; +@y +trie_max:=128; trie_min:=128; trie_link(0):=1; trie_taken[0]:=false; +trie_link(trie_size):=0; trie_back(0):=trie_size; {wrap around} +@z +@x module 953 +begin c:=trie_c[p]; {we have |c>0|} +if c=ident_val then @ +else begin old_setting:=selector; selector:=new_string; +@y +@!b:pool_pointer; {base of temporary string} +begin get_x_token; scan_something_internal(tok_val,false); +if cur_val_level>=ident_val then @ +else begin old_setting:=selector; selector:=new_string; b:=pool_ptr; +@z +@x module 465, continued + selector:=old_setting; the_toks:=str_toks; +@y + selector:=old_setting; the_toks:=str_toks(b); +@z +@x module 470 +begin c:=cur_chr; @; +old_setting:=selector; selector:=new_string; +@; +selector:=old_setting; link(garbage):=str_toks; ins_list(link(temp_head)); +@y +@!b:pool_pointer; {base of temporary string} +begin c:=cur_chr; @; +old_setting:=selector; selector:=new_string; b:=pool_ptr; +@; +selector:=old_setting; link(garbage):=str_toks(b); ins_list(link(temp_head)); +@z + +343. **\input\romannumeral6 confusion bypassed (25May88) +@x module 525 +begin if (pool_ptr+name_length>pool_size)or(str_ptr=max_strings) then +@y +begin if (pool_ptr+name_length>pool_size)or(str_ptr=max_strings)or + (cur_length>0) then +@z + +344. (I sincerely hope that there won't be any more) + + +######################################################################## + +Differences between TeX.WEB for 2.92 and for 2.9 + +;COMPARISON OF TX:TEX-2-92.WEB.1 AND TX:TEX-2-9.WEB.1 +;OPTIONS ARE /E /3 + +**** FILE TX:TEX-2-92.WEB.1, 1-28 (1880) +% Version 2.91 fixes \outer\def\a0{}\a\a bug (April 1988). +% Version 2.92 fixes \patterns, also file names with complex macros (May 1988). + +% A reward of $81.92 will be paid to the first finder of any remaining bug. +% (This amount will double again in 1989.) + +% Although considerable effort has been expended to make the TeX program +**** FILE TX:TEX-2-9.WEB.1, 1-29 (1882) + +% A reward of $40.96 will be paid to the first finder of any remaining bug. +% (This amount will double again in 1988.) + +% Although considerable effort has been expended to make the TeX program +*************** + +**** FILE TX:TEX-2-92.WEB.1, 2-93 (9207) +@d banner=='This is TeX, Version 2.92' {printed when \TeX\ starts} + +@ Different \PASCAL s have slightly different conventions, and the present +**** FILE TX:TEX-2-9.WEB.1, 2-93 (9066) +@d banner=='This is TeX, Version 2.9' {printed when \TeX\ starts} + +@ Different \PASCAL s have slightly different conventions, and the present +*************** + +**** FILE TX:TEX-2-92.WEB.1, 19-61 (240552) +@!d:integer; {number of characters already in current string} +@!p:pointer; {index in |hash| array} +**** FILE TX:TEX-2-9.WEB.1, 19-61 (240410) +@!p:pointer; {index in |hash| array} +*************** + +**** FILE TX:TEX-2-92.WEB.1, 19-88 (241492) +str_room(l); d:=cur_length; +while pool_ptr>str_start[str_ptr] do + begin decr(pool_ptr); str_pool[pool_ptr+l]:=str_pool[pool_ptr]; + end; {move current string up to make room for another} +for k:=j to j+l-1 do append_char(buffer[k]); +text(p):=make_string; pool_ptr:=pool_ptr+d; +@!stat incr(cs_count);@+tats@;@/ +**** FILE TX:TEX-2-9.WEB.1, 19-87 (241287) +str_room(l); +for k:=j to j+l-1 do append_char(buffer[k]); +text(p):=make_string; +@!stat incr(cs_count);@+tats@;@/ +*************** + +**** FILE TX:TEX-2-92.WEB.1, 20-77 (255280) +@!group_code=0..max_group_code; {|save_level| for a level boundary} + +@ The global variable |cur_group| keeps track of what sort of group we are +**** FILE TX:TEX-2-9.WEB.1, 20-77 (254875) +@!group_code=0..max_group_code; {|save_index| for a level boundary} + +@ The global variable |cur_group| keeps track of what sort of group we are +*************** + +**** FILE TX:TEX-2-92.WEB.1, 25-31 (308968) +@!par_token:halfword; {token representing `\.{\\par}'} + +@ @= +**** FILE TX:TEX-2-9.WEB.1, 25-31 (308563) +@!par_token:halfword; {token representing '\.{\\par}'} + +@ @= +*************** + +**** FILE TX:TEX-2-92.WEB.1, 25-372 (322487) +@ The present point in the program is reached only when the |expand| +routine has inserted a special marker into the input. In this special +**** FILE TX:TEX-2-9.WEB.1, 25-372 (322082) +@ The present point in the program is reached only when the |no_expand| +routine has inserted a special marker into the input. In this special +*************** + +**** FILE TX:TEX-2-92.WEB.1, 26-375 (343630) +repeat link(temp_head):=null; +if (info(r)>match_token+127)or(info(r)TEX-2-9.WEB.1, 26-375 (343228) +repeat if (info(r)>match_token+127)or(info(r)TEX-2-92.WEB.1, 27-675 (378115) + are |x| sp per unit; |goto attach_sign| if the units are internal@>; +@; +**** FILE TX:TEX-2-9.WEB.1, 27-675 (377704) + are |x| units per sp; |goto attach_sign| if the units are internal@>; +@; +*************** + +**** FILE TX:TEX-2-92.WEB.1, 28-13 (388583) +@p function str_toks(@!b:pool_pointer):pointer; + {changes the string |str_pool[b..pool_ptr]| to a token list} +var p:pointer; {tail of the token list} +**** FILE TX:TEX-2-9.WEB.1, 28-13 (388173) +@p function str_toks:pointer; {changes the current string to a token list} +var p:pointer; {tail of the token list} +*************** + +**** FILE TX:TEX-2-92.WEB.1, 28-20 (388915) +p:=temp_head; link(p):=null; k:=b; +while kTEX-2-9.WEB.1, 28-19 (388468) +p:=temp_head; link(p):=null; k:=str_start[str_ptr]; +while kTEX-2-92.WEB.1, 28-28 (389103) +pool_ptr:=b; str_toks:=p; +end; +**** FILE TX:TEX-2-9.WEB.1, 28-27 (388673) +pool_ptr:=str_start[str_ptr]; str_toks:=p; +end; +*************** + +**** FILE TX:TEX-2-92.WEB.1, 28-40 (389611) +@!b:pool_pointer; {base of temporary string} +begin get_x_token; scan_something_internal(tok_val,false); +if cur_val_level>=ident_val then @ +else begin old_setting:=selector; selector:=new_string; b:=pool_ptr; + case cur_val_level of +**** FILE TX:TEX-2-9.WEB.1, 28-39 (389198) +begin get_x_token; scan_something_internal(tok_val,false); +if cur_val_level>=ident_val then @ +else begin old_setting:=selector; selector:=new_string; + case cur_val_level of +*************** + +**** FILE TX:TEX-2-92.WEB.1, 28-53 (390161) + selector:=old_setting; the_toks:=str_toks(b); + end; +**** FILE TX:TEX-2-9.WEB.1, 28-51 (389689) + selector:=old_setting; the_toks:=str_toks; + end; +*************** + +**** FILE TX:TEX-2-92.WEB.1, 28-117 (392508) +@!b:pool_pointer; {base of temporary string} +begin c:=cur_chr; @; +old_setting:=selector; selector:=new_string; b:=pool_ptr; +@; +selector:=old_setting; link(garbage):=str_toks(b); ins_list(link(temp_head)); +end; +**** FILE TX:TEX-2-9.WEB.1, 28-115 (392033) +begin c:=cur_chr; @; +old_setting:=selector; selector:=new_string; +@; +selector:=old_setting; link(garbage):=str_toks; ins_list(link(temp_head)); +end; +*************** + +**** FILE TX:TEX-2-92.WEB.1, 30-262 (427879) +begin if (pool_ptr+name_length>pool_size)or(str_ptr=max_strings)or + (cur_length>0) then + make_name_string:="?" +**** FILE TX:TEX-2-9.WEB.1, 30-262 (427342) +begin if (pool_ptr+name_length>pool_size)or(str_ptr=max_strings) then + make_name_string:="?" +*************** + +**** FILE TX:TEX-2-92.WEB.1, 31-621 (464580) +@d check_byte_range(#)==begin if (#ec) then abort@+end +@d current_character_being_worked_on==k+bc-fmem_ptr +**** FILE TX:TEX-2-9.WEB.1, 31-621 (464024) +@d check_byte_range(#)==begin if (#ec) then abort@+end +@d current_character_being_worked_on==k+bc-fmem_ptr +*************** + +**** FILE TX:TEX-2-92.WEB.1, 35-281 (573403) +`\.\_' or `\.\^' or `\./' or `\.\\' if |p| is descended from the |subscr| +or |supscr| or |denominator| or |numerator| fields of noads. For example, +**** FILE TX:TEX-2-9.WEB.1, 35-281 (572846) +`\.[' or `\.(' or `\./' or `\.\\' if |p| is descended from the |subscr| +or |supscr| or |denominator| or |numerator| fields of noads. For example, +*************** + +**** FILE TX:TEX-2-92.WEB.1, 43-68 (756339) +to the impossible value 128, in order to guarantee that |hc[hn+3]| will +never be fetched. +**** FILE TX:TEX-2-9.WEB.1, 43-68 (755780) +to the impossible value 256, in order to guarantee that |hc[hn+3]| will +never be fetched. +*************** + +**** FILE TX:TEX-2-92.WEB.1, 43-75 (756649) +hc[0]:=127; hc[hn+1]:=127; hc[hn+2]:=128; {insert delimiters} +for j:=0 to hn-2 do +**** FILE TX:TEX-2-9.WEB.1, 43-75 (756090) +hc[0]:=127; hc[hn+1]:=127; hc[hn+2]:=256; {insert delimiters} +for j:=0 to hn-2 do +*************** + +**** FILE TX:TEX-2-92.WEB.1, 43-196 (761319) +until coming to a right brace; then |return|@>; +exit:end; +**** FILE TX:TEX-2-9.WEB.1, 43-196 (760760) +until coming to a right brace; then skip an optional space and |return|@>; +exit:end; +*************** + +**** FILE TX:TEX-2-92.WEB.1, 44-201 (773038) +trie_link(trie_size):=0; trie_back(0):=trie_size; {wrap around} +for p:=1 to 128 do +**** FILE TX:TEX-2-9.WEB.1, 44-201 (772506) +for p:=1 to 128 do +*************** + +**** FILE TX:TEX-2-92.WEB.1, 44-233 (774482) +begin c:=trie_c[p]; +if cTEX-2-9.WEB.1, 44-232 (773885) +begin c:=trie_c[p]; {we have |c>0|} +if cTEX-2-92.WEB.1, 44-345 (779179) + brace@>; +trie_root:=compress_trie(trie_root); {compress the trie} +**** FILE TX:TEX-2-9.WEB.1, 44-343 (778549) + brace; then skip an optional space@>; +trie_root:=compress_trie(trie_root); {compress the trie} +*************** + +**** FILE TX:TEX-2-92.WEB.1, 44-443 (782387) +r:=trie_size; {finally, we will zero out the holes} +h.rh:=0; h.b0:=min_quarterword; h.b1:=0; {|trie_link:=0|, +**** FILE TX:TEX-2-9.WEB.1, 44-441 (781786) +r:=0; {finally, we will zero out the holes} +h.rh:=0; h.b0:=min_quarterword; h.b1:=0; {|trie_link:=0|, +*************** + + +######################################################################## + +Differences between new and previous Plain.TeX + +;COMPARISON OF PS:PLAIN.TEX.2 AND PS:PLAIN.TEX.1 +;OPTIONS ARE /3 + +**** FILE PS:PLAIN.TEX.2, 6-244 (33253) +\def\arrowvert{\delimiter"33C000 } % arrow without arrowheads +\def\Arrowvert{\delimiter"33D000 } % double arrow without arrowheads +\def\bracevert{\delimiter"33E000 } % the vertical bar that extends braces +**** FILE PS:PLAIN.TEX.1, 1-951 (33258) +\def\arrowvert{\delimiter"33C } % arrow without arrowheads +\def\Arrowvert{\delimiter"33D } % double arrow without arrowheads +\def\bracevert{\delimiter"33E } % the vertical bar that extends braces +*************** + +**** FILE PS:PLAIN.TEX.2, 8-22 (44482) +\def\fmtname{plain}\def\fmtversion{2.92} % identifies the current format +**** FILE PS:PLAIN.TEX.1, 1-1220 (44480) +\def\fmtname{plain}\def\fmtversion{2.3} % identifies the current format +*************** + +######################################################################## + +[ end of message 004 ] +------- + diff --git a/info/digests/tex-implementors/message.05 b/info/digests/tex-implementors/message.05 new file mode 100644 index 0000000000..cd0acb0f40 --- /dev/null +++ b/info/digests/tex-implementors/message.05 @@ -0,0 +1,441 @@ + +Subject: correction to TeX 2.92; Metafont 1.4 + +Date: 30 May 88 Message No: 005 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: small error in TeX 2.92; Metafont 1.4 + + +An error was present in the listing of differences between TeX.WEB 2.92 +and 2.9 as reported in message 4. The same error was present in the +TeX.WEB file at SCORE, but has now been fixed. + +If you are working from the difference list provided in message 4, the +following lines should be ignored: + +**** FILE TX:TEX-2-92.WEB.1, 31-621 (464580) +@d check_byte_range(#)==begin if (#ec) then abort@+end +@d current_character_being_worked_on==k+bc-fmem_ptr +**** FILE TX:TEX-2-9.WEB.1, 31-621 (464024) +@d check_byte_range(#)==begin if (#ec) then abort@+end +@d current_character_being_worked_on==k+bc-fmem_ptr +*************** + +Thanks to Nelson Beebe and Ken Yap for spotting this. + + +The rest of this message will consist of the additions to MF84.BUG, a +comparison of the MF.WEB files for version 1.4 and 1.3, and changes to +the errata list since 23 Dec 87. + +######################################################################## + +Additions to MF84.BUG + +540. Typo suppresses an error detection (Chris Thompson, 2May88) +@x module 963 + if txy mod unity=0 then if tyy mod unity=0 then +@y + if txx mod unity=0 then if tyy mod unity=0 then +@z + +541. get_x_token can lose a scanned declared variable (Chris Thompson, 4May88) +@x module 1011 +if equiv(x)=null then new_root(x); +@y +@z +@x module 1011 +done:scan_declared_variable:=h; +@y +done: if eq_type(x)<>tag_token then clear_symbol(x,false); +if equiv(x)=null then new_root(x); +scan_declared_variable:=h; +@z + +542. (I sincerely hope that there won't be any more) + + +######################################################################## + +Differences between MF.WEB for 1.4 and for 1.3 + +;COMPARISON OF PS:<1SCRATCH>MF.WEB.1 AND PS:MF.WEB.1 +;OPTIONS ARE /E /3 + +**** FILE PS:<1SCRATCH>MF.WEB.1, 1-15 (870) +% Version 1.4 corrected scan_declared_variable timing (May 1988). +% A few "harmless" optimizations have been made since then. + +% A reward of $20.48 will be paid to the first finder of any remaining bug. +% (This amount will double again in 1989.) + +% Although considerable effort has been expended to make the METAFONT program +**** FILE PS:MF.WEB.1, 1-15 (870) +% A few "harmless" optimizations have been made since then. + +% A reward of $10.24 will be paid to the first finder of any remaining bug. +% (This amount will double again in 1988.) + +% Although considerable effort has been expended to make the METAFONT program +*************** + +**** FILE PS:<1SCRATCH>MF.WEB.1, 2-81 (7574) +@d banner=='This is METAFONT, Version 1.4' {printed when \MF\ starts} + +@ Different \PASCAL s have slightly different conventions, and the present +**** FILE PS:MF.WEB.1, 1-146 (7508) +@d banner=='This is METAFONT, Version 1.3' {printed when \MF\ starts} + +@ Different \PASCAL s have slightly different conventions, and the present +*************** + +**** FILE PS:<1SCRATCH>MF.WEB.1, 43-1162 (768090) + if txx mod unity=0 then if tyy mod unity=0 then + @; +**** FILE PS:MF.WEB.1, 1-18695 (768065) + if txy mod unity=0 then if tyy mod unity=0 then + @; +*************** + +**** FILE PS:<1SCRATCH>MF.WEB.1, 44-399 (798211) +h:=get_avail; info(h):=x; t:=h;@/ +**** FILE PS:MF.WEB.1, 1-19495 (798187) +if equiv(x)=null then new_root(x); +h:=get_avail; info(h):=x; t:=h;@/ +*************** + +**** FILE PS:<1SCRATCH>MF.WEB.1, 44-407 (798526) +done: if eq_type(x)<>tag_token then clear_symbol(x,false); +if equiv(x)=null then new_root(x); +scan_declared_variable:=h; +end; +**** FILE PS:MF.WEB.1, 1-19504 (798538) +done:scan_declared_variable:=h; +end; +*************** + + +######################################################################## + +Extracts from ERRATA.TeX (differences as compared with previous version) + +;COMPARISON OF TX:ERRATA.TEX.2 AND TX:ERRATA.TEX.3 +;OPTIONS ARE /3 + +**** FILE TX:ERRATA.TEX.2, 2-3 (1510) +\bugonpage A159, line 22 (2/15/88) + +\ninepoint\noindent +`|\nolimits|' if the normal |\displaylimits| +convention has been overridden; a Rad\cutpar + +**** FILE TX:ERRATA.TEX.3, 2-2 (1508) +*************** + +**** FILE TX:ERRATA.TEX.2, 2-15 (1845) +\bugonpage A326, line 12 (12/12/87) + +\ninepoint\noindent +its natural width. The |\hbox| version also invokes |\everymath|. + +\bugonpage A359, lines 35--38 (5/24/88) + +\ninepoint\noindent +|\def\updownarrow{\delimiter"326C33F } \def\arrowvert{\delimiter"033C000 }|% + \par\noindent +|\def\Updownarrow{\delimiter"326D377 } \def\Arrowvert{\delimiter"033D000 } |% + \par\noindent +|\def\vert{\delimiter"026A30C } \def\Vert{\delimiter"026B30D } |% + \par\noindent +|\def\backslash{\delimiter"026E30F } \def\bracevert{\delimiter"033E000 }| + +\bugonpage A364, line 35 (5/24/88) + +\ninepoint\noindent +|\def\fmtname{plain}\def\fmtversion{2.92} % identifies the current format| + +**** FILE TX:ERRATA.TEX.3, 2-8 (1690) +\bugonpage A326, line 12 (9/20/87) + +\ninepoint\noindent +its natural width. The |\hbox| version also invokes |\everymath|. + +*************** + +**** FILE TX:ERRATA.TEX.2, 2-59 (3566) +\bugonpage A458, left column, line 19 (2/15/88) + +\eightpoint\indent +|\|\| ( $\Vert$ ), {\it146--147}, {\it171}, $\underline{361}$, 435, 438. + +\bugonpage A462, left column, line 7 (10/9/87) +\eightpoint\indent\qquad 152, 178, $\underline{360}$. + +\bugonpage A463, left column (4/17/88) + +\eightpoint\indent +\hbox to0pt{\hss\lower1pt\hbox{*}}|\day|, 273, 349, {\it406}. + +**** FILE TX:ERRATA.TEX.3, 2-36 (2846) +\bugonpage A462, left column, line 7 (10/9/87) + +\eightpoint\indent\qquad 152, 178, $\underline{360}$. + +*************** + +**** FILE TX:ERRATA.TEX.2, 2-81 (4195) +\bugonpage A480, right column (2/15/88) + +\eightpoint\indent|\vdots| ( $\vdots$ ), {\it177}, $\underline{359}$. + +\bugonpage A481, right column (7/3/87) + +\eightpoint|\z@|, $\underline{347}$, 348.\par + +**** FILE TX:ERRATA.TEX.3, 2-48 (3201) +\bugonpage A481, right column (7/3/87) + +|\z@|, $\underline{347}$, 348.\par + +*************** + +**** FILE TX:ERRATA.TEX.2, 3-6 (4592) +\bugonpage B2, line 32 (4/30/88) + +\ninepoint\noindent\hskip10pt +{\bf define} $\\{banner}\equiv\hbox{\tt\char'23}$% +{\tt This\]is\]TeX,\]Version\]2.92\char'23}\quad + +**** FILE TX:ERRATA.TEX.3, 3-6 (3471) +\bugonpage B2, line 32 (12/23/87) + +\ninepoint\noindent\hskip10pt +{\bf define} $\\{banner}\equiv\hbox{\tt\char'23}$% +{\tt This\]is\]TeX,\]Version\]2.9\char'23}\quad + +*************** + +**** FILE TX:ERRATA.TEX.2, 3-19 (4943) +\bugonpage B108, new line after line 8 (5/24/88) + +\ninepoint\noindent\kern20pt +$d$: \\{integer};\quad +$\{\,$number of characters in incomplete current string$\,\}$ + +\bugonage B108, lines 31--33 (5/24/88) + +\ninepoint\noindent\kern10pt +$\\{str\_room}(l)$; $d\gets\\{cur\_length};\par\noindent\kern10pt +{\bf while} $\\{pool\_ptr}>\\{str\_start}[\\{str\_ptr}]$ {\bf do} + \par\noindent\kern20pt +{\bf begin} \\{decr}(\\{pool\_ptr}); + $\\{str\_pool}[\\{pool\_ptr}+l]\gets\\{str\_pool}[\\{pool\_ptr}]$; + \par\noindent\kern20pt +{\bf end};\quad$\{\,$move current string up to make room for another$\,\}$ +\par\noindent\kern10pt +{\bf for} $k\gets j$ {\bf to} $j+l-1$ {\bf do} $\\{append\_char}(\\{buffer}[k])$; +\par\noindent\kern10pt +$\\{text}(p)\gets\\{make\_string}$; $\\{pool\_ptr}\gets\\{pool\_ptr}+d$; + +\bugonpage B115, line 12 (4/28/88) + +\ninepoint\noindent\hskip10pt +$\\{group\_code}=0\to\\{max\_group\_code}$;\quad + $\{\,$\\{save\_level} for a level boundary$\,\}$ + +\bugonpage B141, line 19 (4/28/88) + +\ninepoint\noindent +\\{par\_token}: \\{halfword};\quad + $\{\,$token representing `|\par|'$\,\}$ + +\bugonpage B150, line 24 (4/28/88) + +\tenpoint\noindent{\bf 358.\quad}% +The present point in the program is reached only when the \\{expand} +routine has inserted\cutpar + +\bugonpage B151, mini-index (4/28/88) + +\eightpoint\noindent +Delete the entry for `\\{no\_expand}'; replace it by: +\indent\\{expand}: {\bf procedure}, \S366. + +**** FILE TX:ERRATA.TEX.3, 3-19 (3822) +*************** + +**** FILE TX:ERRATA.TEX.2, 3-91 (7266) +\indent\\{eq\_define}: {\bf procedure}, \S227.\par +$\\{relax}=0$, \S207.\par + +\bugonpage B162, lines 12--14 (4/30/88) + +\ninepoint\noindent\hskip10pt +{\bf repeat} $\\{link}(\\{temp\_head})\gets\\{null}$;\par\noindent\hskip20pt +{\bf if\/} $(\\{info}(r)>\\{match\_token}+127)\lor + (\\{info}(r)<\\{match\_token})$ {\bf then} + $s\gets\\{null}$\par\noindent\hskip20pt +{\bf else begin} $\\{match\_chr}\gets\\{info}(r)-\\{match\_token}$; \ + $s\gets\\{link}(r)$; \ $r\gets s$; \ $p\gets\\{temp\_head}$; \ + $m\gets 0$; + +\bugonpage B181, line 31 (4/28/88) + +\ninepoint\noindent +[Change `$x$ units per sp' to `$x$ sp per unit'! This change also +should be made on line~1 of page B183 and line $-8$ of page B590.] + +\bugonpage B224, second-last line (4/28/87) + +\ninepoint\noindent +\\{done}: {\bf if} \\{file\_opened} {\bf then} \\{b\_close}(\\{tfm\_file});\par +\noindent\hskip10pt $\\{read\_font\_info}\gets g$; + +**** FILE TX:ERRATA.TEX.3, 3-44 (4674) +\\{eq\_define}: {\bf procedure}, \S227.\par +$\\{relax}=0$, \S207.\par +*************** + +**** FILE TX:ERRATA.TEX.2, 3-204 (11136) +\bugonpage B285, line 21 (4/28/88) + +\noindent\tenpoint +is subsidiary to the \\{nucleus} field of some noad; the dot is replaced by +`|_|' or `|^|' or `|/|' or `|\|' if $p$ is\cutpar + +**** FILE TX:ERRATA.TEX.3, 3-134 (7695) +*************** + +**** FILE TX:ERRATA.TEX.2, 3-232 (12036) +\bugonpage B387, line 2 (5/24/88) + +\tenpoint\noindent +is quite short. In the following code we set \\{hc}$[\\{hn}+2]$ to the +impossible value 128, in order to\cutpar + +\bugonpage B387, line 8 (5/24/88) + +\ninepoint\noindent\kern10pt +$\\{hc}[0]\gets127$; $\\{hc}[\\{hn}+1]\gets127$; + $\\{hc}[\\{hn}+2]\gets128$;\quad$\{\,$insert delimiters$\,\}$ + +\bugonpage B390, lines 17--18 (5/24/88) + +\ninepoint\noindent\kern10pt +$\langle\,$Enter as many hyphenation exceptions as are listed, until coming + to a right brace; then {\bf return\eightrm\kern.5em961}$\,\rangle$; +\smallskip[The same change applies to lines 20--21, and +to page~582.] + +\bugonpage B396, new line after line 34 (5/24/88) + +\ninepoint\noindent\kern10pt +$\\{trie\_link}(\\{trie\_size})\gets0$; +$\\{trie\_back}(0)\gets\\{trie\_size}$;\quad +$\{\,$wrap around$\,\}$ + +**** FILE TX:ERRATA.TEX.3, 3-156 (8407) +*************** + +**** FILE TX:ERRATA.TEX.2, 3-266 (13062) +\bugonpage B397, lines 15--17 (5/24/88) + +\ninepoint\noindent\kern10pt +{\bf begin} $c\gets\\{trie\_c}[p]$;\par\noindent\kern10pt +{\bf if} $c<\\{trie\_min}$ {\bf then} $\\{trie\_min}\gets c$;\par\noindent\kern10pt +{\bf if} $\\{trie\_min}=0$ {\bf then} $z\gets\\{trie\_link}(\\{trie\_size})$\par +\noindent\kern10pt +{\bf else} $z\gets\\{trie\_link}(\\{trie\_min}-1)$;\quad +$\{\,$get the first conceivably good hole$\,\}$ + +\bugonpage B400, lines 3--4 (5/24/88) + +\ninepoint\noindent +$\langle\,$Enter all of the patterns into a linked trie, until coming + to a right brace{\eightrm\kern.5em961}$\,\rangle\equiv$ +\smallskip[The same change applies to page B399, lines 29--30, and +to page~582.] + +\bugonpage B402, line 10 (5/24/88) + +\ninepoint\noindent\kern10pt +$r\gets\\{trie\_size}$;\quad +$\{\,$finally, we will zero out the holes$\,\}$ + +**** FILE TX:ERRATA.TEX.3, 3-162 (8584) +*************** + +**** FILE TX:ERRATA.TEX.2, 3-310 (14406) +\bugonpage B552, left column (4/28/88) + +\eightpoint[Insert `358' into \\{expand}.] + +**** FILE TX:ERRATA.TEX.3, 3-181 (9073) +*************** + +**** FILE TX:ERRATA.TEX.2, 3-320 (14633) +\eightpoint[Delete the entry for \\{low\_mem\_max}.] + +\bugonpage B562, left column (4/28/88) + +\eightpoint[Remove `358' from \\{no\_expand}.] + +**** FILE TX:ERRATA.TEX.3, 3-187 (9212) +[Delete the entry for \\{low\_mem\_max}.] + +*************** + +**** FILE TX:ERRATA.TEX.2, 3-335 (15000) +\bugonpage B568, left column (4/28/88) + +\eightpoint[Move `269' from \\{save\_index} to \\{save\_level}.] + +**** FILE TX:ERRATA.TEX.3, 4-1 (9477) +*************** + +**** FILE TX:ERRATA.TEX.2, 4-15 (15448) +\bugonpage C164, line 10 (4/27/88) + +\ninepoint\indent +\quad $y_{\$c}=\\{top}\,y_{\$l}$; \ $y_{\$d}=y_{\$r}$; \ + $x_{\$c}=x_{\$l}-\\{left\_jut}$; \ $x_{\$d}=x_{\$r}+\\{right\_jut}$; + +\bugonpage C175, line 23 (1/11/88) + +\ninepoint\noindent +expand into a sequence of tokens. \ +(The language {\eightrm{SIMULA67}} demonstrated that it is\cutpar + +**** FILE TX:ERRATA.TEX.3, 4-15 (9816) +*************** + +**** FILE TX:ERRATA.TEX.2, 4-33 (15982) +\bugonpage C337, line 11 (4/28/88) + +\ninepoint +An online ``menu'' of the available test routines will be typed at your +terminal\cutpar + +\bugonpage C356, left column (1/11/88) + +\eightpoint +SIMULA67 language, 175. + +\bugonpage C358, right column (2/15/88) + +\eightpoint\indent\hbox to0pt{\hss\lower1pt\hbox{*}}% +|yoffset|, 212, $\underline{220}$, 315, 324. + +**** FILE TX:ERRATA.TEX.3, 5-1 (9998) +*************** + + +######################################################################## + +[ end of message 005 ] +------- + diff --git a/info/digests/tex-implementors/message.06 b/info/digests/tex-implementors/message.06 new file mode 100644 index 0000000000..6ea45b1f5c --- /dev/null +++ b/info/digests/tex-implementors/message.06 @@ -0,0 +1,230 @@ +Date: 9 Jul 88 Message No: 006 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: TeX 2.93 and MF 1.5 + + +I received the following message from Don Knuth on 20 Jun 88: + + Chris Thompson did it again (in TeXHax 47.88). The bug he found + occurs just before TeX runs out of memory, on machines where mem_min + has been made negative. (The bug does not occur on the vast majority + of implementations, where mem_min=0.) It's the same bug in both TeX + and MF, and it's easily fixed. I put the corrections into ERRATA.TEX + and into the sources at SAIL. + +This message will contain the additions to TeX82.BUG and MF84.BUG, +comparisons between the TeX.WEB files for versions 2.92 and 2.93, and +MF.WEB for versions 1.4 and 1.5, and additions to ERRATA.TeX. + +In response to a suggestion from Craig Platt, I have reversed the order +of the files being compared. Now they will be in logical order -- older +first, then newer. + +All relevant files, including TRIP.* and TRAP.* are now up to date at +SCORE. Chris Thompson (the same one who's causing all the changes) +requested a clarification of when the files are converted from SAIL code +to ASCII. The conversion is done at the same time they are moved from +SAIL to SCORE, so that by the time one of these messages comes around, +everything is (should be -- mistakes are not impossible) in standard +form and the files can be FTP'ed without worry. + + +Message #004 promised information on using anonymous FTP. Here is that +information. + +Most systems on the Internet (this includes the Arpanet, NSFnet and some +others, but not Bitnet, and I don't know about uucp) support a File +Transfer Protocol (FTP) program that enables a user to make a connection +to another node on the network and copy or send files between the two +connected nodes. If the remote node supports anonymous FTP, it is not +necessary for the user to have an account at that node. An FTP session +(run on a TOPS-20 system) looks something like this. + + @ftp score.stanford.edu + ... + FTP> cd + < Please log in first, with USER, PASS and ACCT. + LOGIN (user) anonymous + Password: anonymous + ... + FTP> get -chrono-.dir web-chrono.dir + [source file] [target file] + PS:-CHRONO-.DIR.14 => WEB-CHRONO.DIR.1;P777700 !! [OK] + FTP> exit + +In this session, I was retrieving the chrono listing of the contents of the + directory, in which are located TeX.WEB and its change files, +TANGLE and WEAVE, and so forth. Most of the subdirectories contain +chrono files, and these chrono files are regenerated automatically every +weekend. The subdirectories listed below are the ones that become part of +the standard TeX distribution (with the possible exception of ). + + .TFM and raster files of 300 dpi AMS fonts + AMSTeX.TeX and related macros and documentation + the BiBTeX system, for use with LaTeX + .MF sources of the CM* fonts + manuals, bug and errata lists and other documentation + .GF font files + various macro files and similar + the LaTeX macros and style files + fonts for the LN03 printer + (not sure; probably things local to Stanford) + MF.WEB and change files, ``fontware'' + TRIP, TRAP and other test-related files + the TeXhax archives + items that have appeared in TUGboat + TANGLE and WEB; TeX.WEB and change files + + +TRIP and TRAP details will be sent in later messages. + + +######################################################################## + +Additions to TeX82.BUG + +344. Avoid negative divisor rounding upward (Chris Thompson, fixed 19Jun88) +@x module 126 +else t:=(lo_mem_max+hi_mem_min+2) div 2; {|lo_mem_max+2<=tTEX-2-92.WEB.1 AND TX:TEX-2-93.WEB.1 +;OPTIONS ARE /E /3 + +**** FILE TX:TEX-2-92.WEB.1, 1-31 (2023) +% A reward of $81.92 will be paid to the first finder of any remaining bug. +**** FILE TX:TEX-2-93.WEB.1, 1-30 (2021) +% Version 2.93 fixes negative halving in allocator when mem_min<0 (June 1988). +% A reward of $81.92 will be paid to the first finder of any remaining bug. +*************** + +**** FILE TX:TEX-2-92.WEB.1, 2-93 (9207) +@d banner=='This is TeX, Version 2.92' {printed when \TeX\ starts} +@ Different \PASCAL s have slightly different conventions, and the present +**** FILE TX:TEX-2-93.WEB.1, 2-93 (9287) +@d banner=='This is TeX, Version 2.93' {printed when \TeX\ starts} +@ Different \PASCAL s have slightly different conventions, and the present +*************** + +**** FILE TX:TEX-2-92.WEB.1, 10-221 (115748) +else t:=(lo_mem_max+hi_mem_min+2) div 2; {|lo_mem_max+2<=tTEX-2-93.WEB.1, 10-221 (115828) +else t:=lo_mem_max+1+(hi_mem_min-lo_mem_max)div 2; {|lo_mem_max+2<=tMF-1-4.WEB.1 AND TX:MF-1-5.WEB.1 +;OPTIONS ARE /E /3 + +**** FILE TX:MF-1-4.WEB.1, 1-16 (937) +% A few "harmless" optimizations have been made since then. +% A reward of $20.48 will be paid to the first finder of any remaining bug. +**** FILE TX:MF-1-5.WEB.1, 1-16 (937) +% Version 1.5 fixes negative halving in allocator when mem_min<0 (June 1988). +% A few "harmless" optimizations have been made without changing versions. +% A reward of $20.48 will be paid to the first finder of any remaining bug. +*************** + +**** FILE TX:MF-1-4.WEB.1, 2-81 (7574) +@d banner=='This is METAFONT, Version 1.4' {printed when \MF\ starts} +@ Different \PASCAL s have slightly different conventions, and the present +**** FILE TX:MF-1-5.WEB.1, 2-81 (7668) +@d banner=='This is METAFONT, Version 1.5' {printed when \MF\ starts} +@ Different \PASCAL s have slightly different conventions, and the present +*************** + +**** FILE TX:MF-1-4.WEB.1, 11-190 (138945) +else t:=(lo_mem_max+hi_mem_min+2) div 2; {|lo_mem_max+2<=tmem_min+max_halfword then t:=mem_min+max_halfword; +**** FILE TX:MF-1-5.WEB.1, 11-190 (139039) +else t:=lo_mem_max+1+(hi_mem_min-lo_mem_max)div 2; {|lo_mem_max+2<=tmem_min+max_halfword then t:=mem_min+max_halfword; +*************** + + +######################################################################## + +Extracts from ERRATA.TeX (differences as compared with previous version) + +;COMPARISON OF TX:ERRATA.TEX.59 AND TX:ERRATA.TEX.1 +;OPTIONS ARE /E /3 + +**** FILE TX:ERRATA.TEX.59, 3-10 (4711) +{\tt This\]is\]TeX,\]Version\]2.92\char'23}\quad +$\{\,$printed when \TeX\ starts$\,\}$ +**** FILE TX:ERRATA.TEX.1, 3-10 (4711) +{\tt This\]is\]TeX,\]Version\]2.93\char'23}\quad +$\{\,$printed when \TeX\ starts$\,\}$ +*************** + +**** FILE TX:ERRATA.TEX.59, 3-19 (4943) +\bugonpage B108, new line after line 8 (5/24/88) +**** FILE TX:ERRATA.TEX.1, 3-19 (4943) +\bugonpage B54, line 35 (6/19/88) + +\ninepoint\noindent\kern10pt +{\bf else} $t\gets\\{lo\_mem\_max}+1+(\\{hi\_mem\_min}-\\{lo\_mem\_max}) +\mathbin{\bf div}2$;\quad +$\{\,\\{lo\_mem\_max}+2\le t<\\{hi\_mem\_min}\,\}$ + +\bugonpage B108, new line after line 8 (5/24/88) +*************** + +**** FILE TX:ERRATA.TEX.59, 5-10 (18625) +{\tt This\]is\]METAFONT,\]Version\]1.4\char'23}\quad +$\{\,$printed when \MF\ starts$\,\}$ + +\bugonpage D420, bottom line (5/25/88) +**** FILE TX:ERRATA.TEX.1, 5-10 (18847) +{\tt This\]is\]METAFONT,\]Version\]1.5\char'23}\quad +$\{\,$printed when \MF\ starts$\,\}$ + +\bugonpage D66, line 35 (6/19/88) + +\ninepoint\noindent\kern10pt +{\bf else} $t\gets\\{lo\_mem\_max}+1+(\\{hi\_mem\_min}-\\{lo\_mem\_max}) +\mathbin{\bf div}2$;\quad +$\{\,\\{lo\_mem\_max}+2\le t<\\{hi\_mem\_min}\,\}$ + +\bugonpage D420, bottom line (5/25/88) +*************** + + +######################################################################## + +[ end of message 006 ] +------- + diff --git a/info/digests/tex-implementors/message.07 b/info/digests/tex-implementors/message.07 new file mode 100644 index 0000000000..73bf6fc80f --- /dev/null +++ b/info/digests/tex-implementors/message.07 @@ -0,0 +1,201 @@ +Subject: tex 2.93 and mf 1.5 have been updated + + +Received: from seed.ams.com by NSS.Cs.Ucl.AC.UK via Satnet with SMTP + id aa04299; 10 Jul 88 21:34 BST +Date: Sun 10 Jul 88 16:43:25-EDT +From: b beeton +Subject: tex 2.93 and mf 1.5 have been updated +To: TeX-implementors: ; +Message-ID: <12413269045.20.BNB@SEED.AMS.COM> + +Date: 10 Jul 88 Message No: 007 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: TeX 2.93 and MF 1.5 -- update + + +Just a few hours after I sent out message 6, I received the following +from Don Knuth: + + I have ... just made a small change to TeX and MF, suggested by Chris + Thompson. When TeX is almost out of memory, this change will allow it + to run slightly longer in certain cases (and TeX's actions before dying + will be somewhat more logical). The new change doesn't fix a bug, so + I needn't have made it; but the dynamic allocation routines are of + general interest, so I do want them to reflect my true intentions. + Chris noticed that they didn't behave "continuously", as they stood. + + Thus, the SAIL sources of TEX.WEB[tex,sys] and MF.WEB[mf,sys] and + all the TRIP and TRAP test stuff on [tex,sys] has changed again today + ... The version numbers haven't changed (it's still TeX 2.93 and MF + 1.5), because I decided that this change is just an optimization not a + correction. It comes just adjacent to the previous change so it's best + considered part of the previous change. + +Below you will find the new additions to TeX82.BUG and MF84.BUG, +comparisons between the TeX.WEB files for versions 2.93 and "2.93a", and +MF.WEB for versions 1.5 and "1.5a", and additions to ERRATA.TeX. + +All relevant files, including TRIP.* and TRAP.* are now up to date at +SCORE. + +Regarding the list of subdirectories at Score that was included +in the last message, I have been informed that is not part +of the standard distribution. It was created to support TeX and LaTeX +header files that are idiosyncratic to Stanford. + +The TRIP.TEX and TRAP.MF files will be sent in (unnumbered) messages +following this one. The .LOG and other derivative files will be sent +later, probably in pieces on account of the large size of some of them. + + +######################################################################## + +Additions to TeX82.BUG + +345. Better strategy when near memory overflow (Chris Thompson) +@x module 126 +begin if lo_mem_max+1000=1998 then t:=lo_mem_max+1000 +@z + +346. (I sincerely hope that there won't be any more) + + +######################################################################## + +Differences between TeX.WEB for 2.93 and for "2.93a" + +;COMPARISON OF TX:TEX-2-93.WEB.1 AND TX:TEX-2-93A.WEB.1 +;OPTIONS ARE /E /3 + +**** FILE TX:TEX-2-93.WEB.1, 10-220 (115767) +begin if lo_mem_max+1000TEX-2-93A.WEB.1, 10-220 (115767) +begin if hi_mem_min-lo_mem_max>=1998 then t:=lo_mem_max+1000 +else t:=lo_mem_max+1+(hi_mem_min-lo_mem_max)div 2; {|lo_mem_max+2<=t=1998 then t:=lo_mem_max+1000 +@z + +544. (I sincerely hope that there won't be any more) + + +######################################################################## + +Differences between MF.WEB for 1.5 and for 1.5a + +;COMPARISON OF TX:MF-1-5.WEB.1 AND TX:MF-1-5A.WEB.1 +;OPTIONS ARE /E /3 + +**** FILE TX:MF-1-5.WEB.1, 11-189 (138978) +begin if lo_mem_max+1000MF-1-5A.WEB.1, 11-189 (138978) +begin if hi_mem_min-lo_mem_max>=1998 then t:=lo_mem_max+1000 +else t:=lo_mem_max+1+(hi_mem_min-lo_mem_max)div 2; {|lo_mem_max+2<=tERRATA.TEX.6 AND TX:ERRATA.TEX.1 +;OPTIONS ARE /E /3 + +**** FILE TX:ERRATA.TEX.6, 2-15 (1845) +\bugonpage A326, line 12 (12/12/87) +**** FILE TX:ERRATA.TEX.1, 2-15 (1845) +\bugonpage A299, line 30 (7/6/88) + +\ninepoint\indent\tt +Fatal format file error; I'm stymied. + +\bugonpage A326, line 12 (12/12/87) +*************** + +**** FILE TX:ERRATA.TEX.6, 2-77 (4072) +\bugonpage A473, entry for `page builder' (8/13/87) +**** FILE TX:ERRATA.TEX.1, 2-82 (4172) +\bugonpage A465, right column (7/6/88) + +\eightpoint\indent{\tt Fatal format file error}, 299. + +\bugonpage A473, entry for `page builder' (8/13/87) +*************** + +**** FILE TX:ERRATA.TEX.6, 3-19 (4943) +\bugonpage B54, line 35 (6/19/88) + +\ninepoint\noindent\kern10pt +{\bf else} $t\gets\\{lo\_mem\_max}+1+(\\{hi\_mem\_min}-\\{lo\_mem\_max}) +**** FILE TX:ERRATA.TEX.1, 3-19 (5142) +\bugonpage B54, lines 34--35 (7/9/88) + +\ninepoint\noindent\kern10pt +{\bf begin if\/} $\\{hi\_mem\_min}-\\{lo\_mem\_max}\ge1998$ + {\bf then} $t\gets\\{lo\_mem\_max}+1000$\par\noindent\kern10pt +{\bf else} $t\gets\\{lo\_mem\_max}+1+(\\{hi\_mem\_min}-\\{lo\_mem\_max}) +*************** + +**** FILE TX:ERRATA.TEX.6, 4-46 (18346) +\bugonpage C356, left column (1/11/88) +**** FILE TX:ERRATA.TEX.1, 4-46 (18675) +\bugonpage C350, left column (7/6/88) + +\eightpoint\indent +|Fatal| |base| |file| |error|, 226. + +\bugonpage C356, left column (1/11/88) +*************** + +**** FILE TX:ERRATA.TEX.6, 5-13 (18941) +\bugonpage D66, line 35 (6/19/88) + +\ninepoint\noindent\kern10pt +{\bf else} $t\gets\\{lo\_mem\_max}+1+(\\{hi\_mem\_min}-\\{lo\_mem\_max}) +**** FILE TX:ERRATA.TEX.1, 5-13 (19370) +\bugonpage D66, lines 34--35 (7/9/88) + +\ninepoint\noindent\kern10pt +{\bf begin if\/} $\\{hi\_mem\_min}-\\{lo\_mem\_max}\ge1998$ + {\bf then} $t\gets\\{lo\_mem\_max}+1000$\par\noindent\kern10pt +{\bf else} $t\gets\\{lo\_mem\_max}+1+(\\{hi\_mem\_min}-\\{lo\_mem\_max}) +*************** + +**** FILE TX:ERRATA.TEX.6, 7-1 (21378) +\bye +**** FILE TX:ERRATA.TEX.1, 6-52 (21936) +\bugonpage E550, line 29 (7/9/88) + +\ninepoint\noindent\hskip10pt +{\bf \def\_{\kern.04em\vbox{\hrule width.3em height .6pt}\kern.08em} +define\_whole\_vertical\_blacker\_pixels}$(\\{vair},\\{bar},\\{slab}, + \\{cap\_bar},\\{cap\_band}$; + +\bye +*************** + + +######################################################################## + +[ end of message 007 ] +------- + diff --git a/info/digests/tex-implementors/message.08 b/info/digests/tex-implementors/message.08 new file mode 100644 index 0000000000..c9be4c66fa --- /dev/null +++ b/info/digests/tex-implementors/message.08 @@ -0,0 +1,280 @@ +Date: 14 Aug 88 Message No: 008 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: TeX 2.93, again; LaTeX and AMS-TeX + + +I received the following message from Don Knuth on July 13, as I was +preparing to go to TeX88 in Exeter: + + Subject: minor problem with TeX version 2.5 + + The variable cur_order should be initialized to something, because + there are Pascal compilers that don't allow you to say "a:=b" when + b hasn't been given a value (even if that value is never used). + + I'll put that fix into version 2.93 so that the changes are confined + to TEX.WEB alone. The bug really won't hurt anybody except a brand + new implementor. + +So this change should be incorporated into TeX 2.93; there will be no +change in the version number. + +Below you will find the new additions to TeX82.BUG, a comparison between +the TeX.WEB files for versions "2.93a" and "2.93b", and additions to +ERRATA.TeX. There were no changes to TRIP.*. + +All relevant files are now up to date at SCORE. + +TRIP.TeX and TRAP.MF were sent several weeks ago. I will be breaking +the .LOG files into pieces and sending them soon, also the "auxiliary" +files -- .TYP, .PL, etc. + +There have been some recent changes to LaTeX. The following items are +included below: differences between the addenda file from 12 May 88 +through the latest, and differences in SliTeX.TeX from 10 November 86 +through 8 June 88. I have no earlier version of the addenda file to +compare; if you would like the complete file sent, please let me know, +and I will be happy to mail it. A file of differences between LaTeX.TeX +of December 85 through the latest is being mailed separately; it is very +large ( >52K bytes), and may have to be mailed in more than one section. +I am sorry that I could not use a more convenient version of LaTeX, but +the only ones I have available are from December 85 and April 88, and +it seemed that using the older one would be helpful to more of you, +since I have not previously distributed any LaTeX updates. There are +some notes at the beginning of the LaTeX differences file that you +should read before doing anything with the file. + +A small change has been made to the distribution version of AMSTeX.TeX, +to fix a bug in \dots that shows up in some rather obscure circumstances. +The details are described in the file AMSTeX.CHG. Both files are at +Score in . AMSTeX is now at version 1.1d. If you are +distributing AMSTeX and cannot retrieve the files from Score, please +let me know, and I will mail you the up-to-date files; please include +a list of all the AMSTeX-related files you now have, and their dates. +Other files in the group have been changed within the past year, but +the changes were not too well advertised. + +Finally, please acknowledge your receipt of this message. Several new +names have been added to the list, and some addresses have changed. I'd +like to make sure that they're all working. + + +######################################################################## + +Additions to TeX82.BUG + +346. An omission from change 333 (Tsunetoshi Hayashi, reported 20June88) +@x module 439 +cur_val:=0; cur_val_level:=int_val; radix:=0; +@y +cur_val:=0; cur_val_level:=int_val; radix:=0; cur_order:=0; +@z + +347. (I sincerely hope that there won't be any more) + + +######################################################################## + +Differences between TeX.WEB for "2.93a" and for "2.93b" + +;COMPARISON OF TX:TEX-2-93A.WEB.2 AND TX:TEX-2-93B.WEB.1 +;OPTIONS ARE /E /3 + +**** FILE TX:TEX-2-93A.WEB.2, 10-221 (115829) +else t:=lo_mem_max+1+(hi_mem_min-lo_mem_max)div 2; {|lo_mem_max+2<=tTEX-2-93B.WEB.1, 1-2656 (115838) +else t:=lo_mem_max+1+(hi_mem_min-lo_mem_max) div 2; + {|lo_mem_max+2<=tTEX-2-93A.WEB.2, 19-61 (240643) +@!d:integer; {number of characters already in current string} +@!p:pointer; {index in |hash| array} +**** FILE TX:TEX-2-93B.WEB.1, 1-5388 (240665) +@!d:integer; {number of characters in incomplete current string} +@!p:pointer; {index in |hash| array} +*************** + +**** FILE TX:TEX-2-93A.WEB.2, 27-506 (371247) +cur_val:=0; cur_val_level:=int_val; radix:=0; +@ The |scan_int| routine is used also to scan the integer part of a +**** FILE TX:TEX-2-93B.WEB.1, 1-8483 (371280) +cur_val:=0; cur_val_level:=int_val; radix:=0; cur_order:=0; +@ The |scan_int| routine is used also to scan the integer part of a +*************** + + +######################################################################## + +Extracts from ERRATA.TeX (differences as compared with previous version) + +;COMPARISON OF TX:ERRATA.TEX.7 AND TX:ERRATA.TEX.1 +;OPTIONS ARE /E /3 + +**** FILE TX:ERRATA.TEX.7, 3-6 (4791) +\bugonpage B2, line 32 (5/24/88) + +\ninepoint\noindent\hskip10pt +**** FILE TX:ERRATA.TEX.1, 3-6 (4791) +\bugonpage B2, line 32 (6/19/88) + +\ninepoint\noindent\hskip10pt +*************** + +**** FILE TX:ERRATA.TEX.7, 3-114 (8343) +\bugonpage B181, line 31 (4/28/88) +**** FILE TX:ERRATA.TEX.1, 3-114 (8343) +\bugonpage B177, bottom line before mini-index (7/13/88) + +\ninepoint\noindent\hskip10pt +$\\{cur\_val}\gets0$; \ + $\\{cur\_val\_level{\gets\\{int\_val}; \ + $\\{radix}\gets0$; \ + $\\{cur\_order}\gets0$; + +\bugonpage B181, line 31 (4/28/88) +*************** + +**** FILE TX:ERRATA.TEX.7, 5-6 (19157) +\bugonpage D2, line 27 (5/25/88) + +\ninepoint\noindent\hskip10pt +**** FILE TX:ERRATA.TEX.1, 5-6 (19368) +\bugonpage D2, line 27 (6/20/88) + +\ninepoint\noindent\hskip10pt +*************** + + +######################################################################## + +Differences between the LaTeX ADDENDUM.TeX file from 12 May through 20 July 88 + +;COMPARISON OF TX:ADDENDUM.TEX-AUG88.1 AND + TX:ADDENDUM.TEX-MAY88.30 +;OPTIONS ARE /E /3 + +**** FILE TX:ADDENDUM.TEX-AUG88.1, 1-3 (98) +% 20 July 1988 + +These are all the errors and omissions to the manual, \LaTeX: {\em A +Document Preparation System} reported by 20 July 1988. + +\subsection{First Four Printings} +**** FILE TX:ADDENDUM.TEX-MAY88.30, 1-3 (98) +% 12 May 1988 + +These are all the errors and omissions to the manual, \LaTeX: {\em A +Document Preparation System} reported by 13 April 1988. + +\subsection{First Four Printings} +*************** + +**** FILE TX:ADDENDUM.TEX-AUG88.1, 1-348 (10049) +\subsubsection*{page 71, last line} +Change ``comand'' to ``command''. +% William LeFebvre, 2 Jun 88 + +\subsubsection*{page 84} +**** FILE TX:ADDENDUM.TEX-MAY88.30, 1-348 (10049) +\subsubsection*{page 84} +*************** + +**** FILE TX:ADDENDUM.TEX-AUG88.1, 1-408 (11960) +\subsubsection*{Page 162, line 6} +Replace ``{\tt heading}'' by ``{\tt headings}''. +% Mathieu Federspiel 18 Jul 88 + +\subsubsection*{Page 177, line 1} +**** FILE TX:ADDENDUM.TEX-MAY88.30, 1-404 (11856) +\subsubsection*{Page 177, line 1} +*************** + +**** FILE TX:ADDENDUM.TEX-AUG88.1, 1-441 (12964) +\subsubsection*{page 217} +Add an index entry ``diacritical marks, see accents''. +% Suggested by Hank Lewis 22 May 88 + +\subsubsection*{page 219, index entry for ``figures''} +Remove the ``and'' from the subentry for ``output by +**** FILE TX:ADDENDUM.TEX-MAY88.30, 1-434 (12743) +\subsubsection*{Page 219, index entry for ``figures''} +Remove the ``and'' from the subentry for ``output by +*************** + +**** FILE TX:ADDENDUM.TEX-AUG88.1, 1-450 (13247) +\subsubsection*{page 219, column 1, line 3} +Replace ``anomolous'' by ``anomalous''. +% Martin Abadi 20 Jul 88 + +\subsubsection*{page 223, left column, line 2} +**** FILE TX:ADDENDUM.TEX-MAY88.30, 1-439 (12904) +\subsubsection*{page 223, left column, line 2} +*************** + + +######################################################################## + +Differences in SliTeX.TeX from 10 November 86 through 8 June 88 + + +;COMPARISON OF TX:SLITEX.TEX.4 AND TX:SLITEX.TEX-NEW.1 +;OPTIONS ARE /E /3 + +**** FILE TX:SLITEX.TEX.4, 1-1 (0) +% SLITEX VERSION 2.09 - RELEASE OF 10 November 86 +% Copyright (C) 1986 by Leslie Lamport + +\everyjob{\typeout{SliTeX Version 2.09 - Release 10 November 86}} +\immediate\write10{SliTeX Version 2.09 - Release 10 November 86} + +% NOTES FOR DEFINING FONTS AND STYLES FOR SLIDES +**** FILE TX:SLITEX.TEX-NEW.1, 1-1 (0) +% SLITEX VERSION 2.09 <8 Jun 1988> +% Copyright (C) 1986 by Leslie Lamport + +\everyjob{\typeout{SliTeX Version 2.09 <8 Jun 1988>}} +\immediate\write10{SliTeX Version 2.09 <8 Jun 1988>} + +% NOTES FOR DEFINING FONTS AND STYLES FOR SLIDES +*************** + +**** FILE TX:SLITEX.TEX.4, 6-1 (22440) + \message{output,} +**** FILE TX:SLITEX.TEX-NEW.1, 5-112 (22396) +% array and tabular environments: changes to `|', \hline, \cline, and \vline +% added 8 Jun 88 + +\def\@arrayrule{\if@visible\@addtopreamble{\hskip -.5\arrayrulewidth + \vrule \@width \arrayrulewidth\hskip -.5\arrayrulewidth}\fi} + +\def\cline#1{\if@visible\@cline[#1]\fi} + + +\def\hline{\noalign{\ifnum0=`}\fi + \if@visible \hrule \@height \arrayrulewidth + \else \hrule \@width \z@ + \fi + \futurelet \@tempa\@xhline} + + +\def\vline{\if@visible \vrule \@width \arrayrulewidth + \else \vrule \@width \arrayrulewidth \@height \z@ + \@depth \z@ \fi} + + + \message{output,} +*************** + + +######################################################################## + +[ end of message 008 ] +------- + diff --git a/info/digests/tex-implementors/message.09 b/info/digests/tex-implementors/message.09 new file mode 100644 index 0000000000..77c2a3402c --- /dev/null +++ b/info/digests/tex-implementors/message.09 @@ -0,0 +1,561 @@ +Date: 14 Nov 88 Message No: 009 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: TeX 2.94, Metafont 1.6, Plain 2.94 + + +Earlier this month I received a message from Don Knuth announcing a +new bug. This bug affects both TeX and Metafont: + + Tim Morgan (UC Irvine) found a scenario in which open_log_file can + call fatal_error, contrary to what I believed when I wrote the code. + (This happens only if TeX cannot open the log file AND the user + then types control-Z instead of giving a new name, on some systems!) + + This is NOT a bug for anybody to worry about, so it's not important + for implementors to get into version 2.94 with any hurry; .... + +Another bug in Metafont, and a font problem that resulted in a change +to PLAIN.TeX: + + Chris Thompson found a bug in good.top and good.bot, which I'm now + fixing. Also, Lyle Ramshaw noticed something strange about + commas and periods in CM fonts, .... + +The details: + + (There are two small and identical changes to [both TeX and MF], affecting + only cases of fatal errors; some errors are not now so disastrous.) + + Most users of previous versions have nothing to fear. + + Here's what happened: If TeX couldn't open a log file, there were three + cases: + 1) **\batchmode\read-1 to\next for example, when a fatal_error + (in this case trying to read from the terminal during batchmode) occurs + in batchmode or nonstopmode; TeX gave a message on the terminal and died. + That was working as I intended. + 2) **\batchmode % for example, when TeX tries to open the log file + at the end of the first line and can't but is in batchmode. I had + intended for this to give a message on the terminal, but TeX just died. + In version 2.94, TeX explains its dilemma before dying. + 3) **\relax % for example, when TeX tries to open the log file at the + end of the first line and can't, but is in scrollmode or errorstopmode. + Then it prompts for an alternative log file name. In version 2.93, if you + now typed EOF (control Z I guess?), TeX got confused and tried to + write on an unopened log file. (There's no way to get EOF on the terminal + in the Pascal I use at SAIL, so I never was able to test this case.) + In version 2.94, any EOF typed in response to a prompt is now ignored, + while previously it was a fatal error. + + [In all of these you have to do something else that makes it impossible + for TeX to open the file texput.log. For example, I had another job + editing texput.log when I did these tests.] + + The change to plain.tex was in the definition of \ldotp: That control + sequence used to take the dot (i.e. period) from family 0, but now it uses + family 1. Reason: There's no difference at all except in sub/superscripts; + but in the latter the periods are slightly wider in family 1 + (fonts cmmi7 and cmmi5) than in family 0 (fonts cmr7 and cmr5). + [The letter_fit parameter causes this, somewhat to my surprise.] + Commas always come from family 1. Thus in a subscript like + $a_{1,\ldots,n}$, the commas used to be slightly wider than the dots, + because they came from the family with the bigger letter_fit. + With the new plain (\fmtversion=2.94) the commas and dots are + equally wide. It was a difference of about 1/7 of a point, but + that was enough to confuse some drivers at low resolution; Lyle Ramshaw + tells me he's been using such subscripts a lot, and getting better results + with the new definition. In sub-subscripts the effect would be + even more noticeable than in subscripts. + + +Below you will find the new additions to TeX82.BUG, a comparison between +the TeX.WEB files for versions "2.93b" and 2.94, additions to MF84.BUG, +a comparison between MF.WEB files for versions 1.5 and 1.6, additions to +ERRATA.TeX, and differences in PLAIN.TeX. There are also changes to TRIP.* +and TRAP.*, which will be dealt with in later messages. (I still haven't +figured out any reliable method of sending the TR*P.LOG files in mail, but +I continue to think very hard about the problem.) + +All relevant files are now up to date at SCORE. + +As usual, please acknowledge your receipt of this message. We're migrating +from a DECsystem-20 to a VAX, and this is the first time I've tried mailing +to a list from the VAX. It will be reassuring to hear from you that the +system is working. + + +######################################################################## + +Additions to TeX82.BUG (and some changes) + +;COMPARISON OF PS:TEX82.BUG.12 AND PS:TEX82.BUG.3 +;OPTIONS ARE /E /3 + +**** FILE PS:TEX82.BUG.12, 2-16 (2676) +10. Module 857 line -5 (bug discovered 10/8/92 by HWT) +change it to: if h>0 then decr(h) else h:=trie_op_hash_size; +**** FILE PS:TEX82.BUG.3, 2-16 (2676) +10. Module 857 line -5 (bug discovered 10/8/82 by HWT) +change it to: if h>0 then decr(h) else h:=trie_op_hash_size; +*************** + +**** FILE PS:TEX82.BUG.12, 16-115 (78620) +255. Bug in \xleader computations (found by FY, August 18) +@x in module 592 +@!lq,@!lr,@!lx:integer; {quantities used in calculations for leaders} +@y +@!lq,@!lr:integer; {quantities used in calculations for leaders} +@z +**** FILE PS:TEX82.BUG.3, 16-115 (78620) +255. Bug in \xleader computations (found by FY, August 18) +@x in module 592 +@!lq,@!lr:integer; {quantities used in calculations for leaders} +@y +@!lq,@!lr,@!lx:integer; {quantities used in calculations for leaders} +@z +*************** + +**** FILE PS:TEX82.BUG.12, 21-417 (170719) +344. Avoid negative divisor rounding upward (Chris Thompson, fixed 19Jun88) +@x module 126 +**** FILE PS:TEX82.BUG.3, 21-417 (170719) +344. Avoid negative dividend rounding upward (Chris Thompson, fixed 19Jun88) +@x module 126 +*************** + +**** FILE PS:TEX82.BUG.12, 21-438 (171397) +347. (I sincerely hope that there won't be any more) +* Possibly nice ideas that will not be implemented +**** FILE PS:TEX82.BUG.3, 21-438 (171398) +347. Avoid fatal_error after terminal eof (Tim Morgan, reported 25Oct88) +@x module 71 [serious problem occurred if this was called in open_log_file] +if not input_ln(term_in,true) then fatal_error("End of file on the terminal!"); +@y +if not input_ln(term_in,true) then t_open_in; +@z + +348. Force terminal output when open_log_file aborts (6Nov88) +@x module 535 + begin print_err("I can't write on file `"); +@y + begin selector:=term_only; print_err("I can't write on file `"); +@z + +349. (I sincerely hope that there won't be any more) +* Possibly nice ideas that will not be implemented +*************** + + +######################################################################## + +Differences between TeX.WEB for "2.93b" and for 2.94 + +;COMPARISON OF PS:TEX.WEB.9 AND PS:TEX.WEB.10 +;OPTIONS ARE /E /3 + +**** FILE PS:TEX.WEB.9, 1-32 (2103) + +% A reward of $81.92 will be paid to the first finder of any remaining bug. +**** FILE PS:TEX.WEB.10, 1-31 (2101) +% Version 2.94 keeps open_log_file from calling fatal_error (November 1988). + +% A reward of $81.92 will be paid to the first finder of any remaining bug. +*************** + +**** FILE PS:TEX.WEB.9, 1-171 (9288) +@d banner=='This is TeX, Version 2.93' {printed when \TeX\ starts} + +@ Different \PASCAL s have slightly different conventions, and the present +**** FILE PS:TEX.WEB.10, 2-93 (9365) +@d banner=='This is TeX, Version 2.94' {printed when \TeX\ starts} + +@ Different \PASCAL s have slightly different conventions, and the present +*************** + +**** FILE PS:TEX.WEB.9, 1-1639 (72545) +if not input_ln(term_in,true) then fatal_error("End of file on the terminal!"); +@.End of file on the terminal@> +**** FILE PS:TEX.WEB.10, 6-329 (72618) +if not input_ln(term_in,true) then t_open_in; +@.End of file on the terminal@> +*************** + +**** FILE PS:TEX.WEB.9, 1-1964 (85573) +The normal idea of |batch_mode| is that nothing at all should be written +on the terminal. However, in the unusual case that a fatal error has +occurred but no log file could be opened, we make an exception and allow +an explanatory message to be seen. + +@p procedure normalize_selector; +**** FILE PS:TEX.WEB.10, 7-318 (85611) +@p procedure normalize_selector; +*************** + +**** FILE PS:TEX.WEB.9, 1-10092 (434017) +Incidentally, the program always refers to the log file as a `\.{transcript +**** FILE PS:TEX.WEB.10, 30-416 (433776) +The normal idea of |batch_mode| is that nothing at all should be written +on the terminal. However, in the unusual case that +no log file could be opened, we make an exception and allow +an explanatory message to be seen. + +Incidentally, the program always refers to the log file as a `\.{transcript +*************** + +**** FILE PS:TEX.WEB.9, 1-10098 (434283) + begin print_err("I can't write on file `"); +@.I can't write on file x@> +**** FILE PS:TEX.WEB.10, 30-427 (434267) + begin selector:=term_only; print_err("I can't write on file `"); +@.I can't write on file x@> +*************** + + +######################################################################## + +Additions to MF84.BUG + +544. Avoid fatal_error after terminal eof (Tim Morgan, reported 25Oct88) +@x module 66 [serious problem occurred if this was called in open_log_file] +if not input_ln(term_in,true) then fatal_error("End of file on the terminal!"); +@y +if not input_ln(term_in,true) then t_open_in; +@z + +545. Force terminal output when open_log_file aborts (6Nov88) +@x module 789 + begin print_err("I can't write on file `"); +@y + begin selector:=term_only; print_err("I can't write on file `"); +@z + +546. (I sincerely hope that there won't be any more) + + +######################################################################## + +Differences between MF.WEB for 1.5 and for 1.6 + +;COMPARISON OF PS:MF.WEB.4 AND PS:MF.WEB.1 +;OPTIONS ARE /E /3 + +**** FILE PS:MF.WEB.4, 1-8 (453) +% METAFONT is a tradement of Addison-Wesley Publishing Company. + +% Version 0 was completed on July 28, 1984. +**** FILE PS:MF.WEB.1, 1-8 (453) +% METAFONT is a trademark of Addison-Wesley Publishing Company. + +% Version 0 was completed on July 28, 1984. +*************** + +**** FILE PS:MF.WEB.4, 1-17 (1016) +% A few "harmless" optimizations have been made without changing versions. +**** FILE PS:MF.WEB.1, 1-17 (1016) +% Version 1.6 keeps open_log_file from calling fatal_error (November 1988). +% A few "harmless" optimizations have been made without changing versions. +*************** + +**** FILE PS:MF.WEB.4, 2-81 (7668) +@d banner=='This is METAFONT, Version 1.5' {printed when \MF\ starts} + +@ Different \PASCAL s have slightly different conventions, and the present +**** FILE PS:MF.WEB.1, 2-81 (7745) +@d banner=='This is METAFONT, Version 1.6' {printed when \MF\ starts} + +@ Different \PASCAL s have slightly different conventions, and the present +*************** + +**** FILE PS:MF.WEB.4, 6-235 (67459) +if not input_ln(term_in,true) then fatal_error("End of file on the terminal!"); +@.End of file on the terminal@> +**** FILE PS:MF.WEB.1, 6-235 (67536) +if not input_ln(term_in,true) then t_open_in; +@.End of file on the terminal@> +*************** + +**** FILE PS:MF.WEB.4, 7-323 (80684) +The normal idea of |batch_mode| is that nothing at all should be written +on the terminal. However, in the unusual case that a fatal error has +occurred but no log file could be opened, we make an exception and allow +an explanatory message to be seen. + +@p procedure normalize_selector; +**** FILE PS:MF.WEB.1, 7-323 (80727) +@p procedure normalize_selector; +*************** + +**** FILE PS:MF.WEB.4, 11-190 (139040) +else t:=lo_mem_max+1+(hi_mem_min-lo_mem_max)div 2; {|lo_mem_max+2<=tmem_min+max_halfword then t:=mem_min+max_halfword; +**** FILE PS:MF.WEB.1, 11-190 (138827) +else t:=lo_mem_max+1+(hi_mem_min-lo_mem_max) div 2; + {|lo_mem_max+2<=tmem_min+max_halfword then t:=mem_min+max_halfword; +*************** + +**** FILE PS:MF.WEB.4, 39-402 (654836) +Incidentally, the program always refers to the log file as a `\.{transcript +**** FILE PS:MF.WEB.1, 39-402 (654627) +The normal idea of |batch_mode| is that nothing at all should be written +on the terminal. However, in the unusual case that +no log file could be opened, we make an exception and allow +an explanatory message to be seen. + +Incidentally, the program always refers to the log file as a `\.{transcript +*************** + +**** FILE PS:MF.WEB.4, 39-408 (655102) + begin print_err("I can't write on file `"); +@.I can't write on file x@> +**** FILE PS:MF.WEB.1, 39-413 (655118) + begin selector:=term_only; print_err("I can't write on file `"); +@.I can't write on file x@> +*************** + + +######################################################################## + +Extracts from ERRATA.TeX (differences as compared with previous version) + +;COMPARISON OF PS:ERRATA.TEX.14 AND PS:ERRATA.NEW.1 +;OPTIONS ARE /E /3 + +**** FILE PS:ERRATA.TEX.14, 1-40 (1480) +of the books. + +% volume A +**** FILE PS:ERRATA.NEW.1, 1-40 (1480) +of the books. Some of these corrections affect the indexes and +mini-indexes of Volumes B~and~D in ways not shown here. + +% volume A +*************** + +**** FILE PS:ERRATA.TEX.14, 2-25 (2074) +\bugonpage A359, lines 35--38 (5/24/88) +**** FILE PS:ERRATA.NEW.1, 2-25 (2180) +\bugonpage A359, line 2 (11/6/88) + +\ninepoint\noindent +|\mathchardef\ldotp="613A\mathchardef\cdotp="6201\mathchardef\colon="603A| + +\bugonpage A359, lines 35--38 (5/24/88) +*************** + +**** FILE PS:ERRATA.TEX.14, 2-36 (2501) +\bugonpage A364, line 35 (5/24/88) + +\ninepoint\noindent +|\def\fmtname{plain}\def\fmtversion{2.92} % identifies the current format| + +\bugonpage A379, line 15 (10/12/87) +**** FILE PS:ERRATA.NEW.1, 2-41 (2743) +\bugonpage A364, line 35 (11/6/88) + +\ninepoint\noindent +|\def\fmtname{plain}\def\fmtversion{2.94} % identifies the current format| + +\bugonpage A379, line 15 (10/12/87) +*************** + +**** FILE PS:ERRATA.TEX.14, 3-6 (4791) +\bugonpage B2, line 32 (6/19/88) + +\ninepoint\noindent\hskip10pt +{\bf define} $\\{banner}\equiv\hbox{\tt\char'23}$% +{\tt This\]is\]TeX,\]Version\]2.93\char'23}\quad +$\{\,$printed when \TeX\ starts$\,\}$ + +\bugonpage B52, line 5 (8/13/87) +**** FILE PS:ERRATA.NEW.1, 3-6 (5033) +\bugonpage B2, line 32 (11/6/88) + +\ninepoint\noindent\hskip10pt +{\bf define} $\\{banner}\equiv\hbox{\tt\char'23}$% +{\tt This\]is\]TeX,\]Version\]2.94\char'23}\quad +$\{\,$printed when \TeX\ starts$\,\}$ + +\bugonpage B30, line 3 from the bottom (11/6/88) + +\ninepoint\noindent\hskip10pt +{\bf if} $\lnot\\{input\_ln}(\\{term\_in},\\{true})$ + {\bf then} \\{t\_open\_in}; + +\bugonpage B38, lines 7--9 from the bottom (11/6/88) + +\tenpoint\noindent[Delete this paragraph; it is being moved to page B214.] + +\bugonpage B52, line 5 (8/13/87) +*************** + +**** FILE PS:ERRATA.TEX.14, 3-25 (5413) +\mathbin{\bf div}2$;\quad +$\{\,\\{lo\_mem\_max}+2\le t<\\{hi\_mem\_min}\,\}$ +**** FILE PS:ERRATA.NEW.1, 3-35 (5958) +\,\mathbin{\bf div}\,2$;\quad\kern-4pt +$\{\,\\{lo\_mem\_max}+2\le t<\\{hi\_mem\_min}\,\}$ +*************** + +**** FILE PS:ERRATA.TEX.14, 3-118 (8460) + $\\{cur\_val\_level{\gets\\{int\_val}; \ + $\\{radix}\gets0$; \ +**** FILE PS:ERRATA.NEW.1, 3-128 (9018) + $\\{cur\_val\_level}\gets\\{int\_val}$; \ + $\\{radix}\gets0$; \ +*************** + +**** FILE PS:ERRATA.TEX.14, 3-183 (10577) +\bugonpage B224, second-last line (4/28/87) +**** FILE PS:ERRATA.NEW.1, 3-193 (11136) +\bugonpage B214, new paragraph after line 3 (11/6/88) + +\tenpoint\noindent\hskip10pt +The normal idea of \\{batch\_mode} is that nothing at all should be written +on the terminal. However, in the unusual case that +no log file could be opened, we make an exception and allow +an explanatory message to be seen. + +\bugonpage B214, lines 8--9 (11/6/88) + +\ninepoint\noindent\hskip20pt +{\bf begin} $\\{selector}\gets\\{term\_only}$; \ + \\{print\_err}({\tt\char`\"I\]can't\]write\]on\]file\]`\char`\"});\par +\noindent\hskip20pt + \\{print\_file\_name}$(\\{cur\_name},\\{cur\_area},\\{cur\_ext})$; \ + \\{print}({\tt\char`\"'.\char`\"}); + +\bugonpage B224, second-last line (4/28/87) +*************** + +**** FILE PS:ERRATA.TEX.14, 4-34 (18563) +\bugonpage C331, just below the illustration (7/18/87) +**** FILE PS:ERRATA.NEW.1, 4-34 (19764) +\bugonpage C262, line 15 (11/6/88) + +\ninepoint\noindent +|string base_name, base_version; base_name="plain"; base_version="1.6";| + +\bugonpage C273, lines 20 and 22 (9/26/88) + +\ninepoint\noindent +| (z_+(0,pen_top))t_=round((z+(0,pen_top))t_); z_ enddef;|\par\noindent +| (z_+(0,pen_bot))t_=round((z+(0,pen_bot))t_); z_ enddef;| + +\bugonpage C331, just below the illustration (7/18/87) +*************** + +**** FILE PS:ERRATA.TEX.14, 5-6 (19368) +\bugonpage D2, line 27 (6/20/88) + +\ninepoint\noindent\hskip10pt +{\bf define} $\\{banner}\equiv\hbox{\tt\char'23}$% +{\tt This\]is\]METAFONT,\]Version\]1.5\char'23}\quad +$\{\,$printed when \MF\ starts$\,\}$ + +\bugonpage D66, lines 34--35 (7/9/88) +**** FILE PS:ERRATA.NEW.1, 5-6 (20908) +\bugonpage D2, line 27 (11/6/88) + +\ninepoint\noindent\hskip10pt +{\bf define} $\\{banner}\equiv\hbox{\tt\char'23}$% +{\tt This\]is\]METAFONT,\]Version\]1.6\char'23}\quad +$\{\,$printed when \MF\ starts$\,\}$ + +\bugonpage D28, line 7 from the bottom (11/6/88) + +\ninepoint\noindent\hskip10pt +{\bf if} $\lnot\\{input\_ln}(\\{term\_in},\\{true})$ + {\bf then} \\{t\_open\_in}; + +\bugonpage D36, lines 3--5 (11/6/88) + +\tenpoint\noindent[Delete this paragraph; it is being moved to page D349.] + +\bugonpage D66, lines 34--35 (7/9/88) +*************** + +**** FILE PS:ERRATA.TEX.14, 5-19 (19852) +\mathbin{\bf div}2$;\quad +$\{\,\\{lo\_mem\_max}+2\le t<\\{hi\_mem\_min}\,\}$ + +\bugonpage D420, bottom line (5/25/88) +**** FILE PS:ERRATA.NEW.1, 5-29 (21679) +\,\mathbin{\bf div}\,2$;\quad\kern-4pt +$\{\,\\{lo\_mem\_max}+2\le t<\\{hi\_mem\_min}\,\}$ + +\bugonpage D349, new paragraph after line 7 (11/6/88) + +\tenpoint\noindent\hskip10pt +The normal idea of \\{batch\_mode} is that nothing at all should be written +on the terminal. However, in the unusual case that +no log file could be opened, we make an exception and allow +an explanatory message to be seen. + +\bugonpage D349, lines 12--13 (11/6/88) + +\ninepoint\noindent\hskip20pt +{\bf begin} $\\{selector}\gets\\{term\_only}$; \ + \\{print\_err}({\tt\char`\"I\]can't\]write\]on\]file\]`\char`\"});\par +\noindent\hskip20pt + \\{print\_file\_name}$(\\{cur\_name},\\{cur\_area},\\{cur\_ext})$; \ + \\{print}({\tt\char`\"'.\char`\"}); + +\bugonpage D420, bottom line (5/25/88) +*************** + +**** FILE PS:ERRATA.TEX.14, 6-11 (20853) +\bugonpage E285, bottom line (12/1/87) +**** FILE PS:ERRATA.NEW.1, 6-11 (23337) +\bugonpage E111, line 29 (10/16/88) + +\ninepoint\noindent +$\\{lft}\,x_{11}={\rm hround}\,u$; \ + $x_{1l}-x_{11}=x_{2l}-x_{12}=x_{22}-x_{2r}={\rm hround}\,1.6\\{cap\_jut}$; + +\bugonpage E285, bottom line (12/1/87) +*************** + +**** FILE PS:ERRATA.TEX.14, 6-44 (21846) +\bugonpage E550, new line after line 23 (8/15/87) +**** FILE PS:ERRATA.NEW.1, 6-50 (24507) +\bugonpage E487, line 17 (8/4/88) + +\ninepoint\line{% +{\bf fill} \\{fullcircle} scaled$\,(\\{bold}+3.8\\{dw}+\\{eps})\,$% + shifted$\,(.5[z_4,z_8])$;\hfill\% dot} +\smallskip\noindent[Also remove page 487 from the index entry for +\\{dot\_size}, and add it to the entries for \\{bold} and \\{dw}.] + +\bugonpage E550, new line after line 23 (8/15/87) +*************** + + +######################################################################## + +Differences between PLAIN.TeX 2.92 and 2.94 + +;COMPARISON OF PS:PLAIN.TEX.2 AND PS:PLAIN.TEX.1 +;OPTIONS ARE /3 + +**** FILE PS:PLAIN.TEX.2, 6-204 (31411) +\mathchardef\ldotp="602E % ldot as a punctuation mark +**** FILE PS:PLAIN.TEX.1, 6-204 (31411) +\mathchardef\ldotp="613A % ldot as a punctuation mark +*************** + +**** FILE PS:PLAIN.TEX.2, 8-22 (44482) +\def\fmtname{plain}\def\fmtversion{2.92} % identifies the current format +**** FILE PS:PLAIN.TEX.1, 8-22 (44482) +\def\fmtname{plain}\def\fmtversion{2.94} % identifies the current format +*************** + + +######################################################################## + +[ end of message 009 ] +------- diff --git a/info/digests/tex-implementors/message.10 b/info/digests/tex-implementors/message.10 new file mode 100644 index 0000000000..f1a6bdf8f8 --- /dev/null +++ b/info/digests/tex-implementors/message.10 @@ -0,0 +1,74 @@ +Date: 15 Dec 88 Message No: 010 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: retraction of TeX version 2.94 + + +Don Knuth has just sent me several messages dealing with the problems +that arose from the change that led to TeX 2.94 and Metafont 1.6. He has +actually made the additional changes he alludes to in the message below, +but since making those changes available will involve more hours than I +have today, it seemed best to get this notice out quickly. (There are +also some changes to some of the CM* fonts; these will also be dealt with +in the next message.) + +Here is Don's message. + +All right, I guess I capitulate. When I made the change that +led to Version 2.94 (namely, to decide that a terminal input file +could never really close), my reasoning was based on an +argument that was totally convincing to me at the time, but now +I realize it was based on faulty premises. + +Namely: I had used TeX for ten years on a computer system that has no such +thing as EOF on the terminal, and I'd NEVER felt the need for that +capability. Therefore I believed it was possible to live happily with a +system that didn't support EOF on the terminal. + +The flaw in my argument was that I also assumed, implicitly, that +any decent operating system would have a standard way to exit +from an arbitrary running program. (The WAITS system, for example, has a +great big key that acts like a super-powerful ^C; this stops +the job you're running and lets you talk to the operating system.) + +Later conversations with Tom Rokicki and Joe Weening informed me +that UNIX, for example, has evolved a different style. Still, I thought +the change I made in version 2.94 would be OK because it says, in effect, +"EOF on the terminal doesn't happen, as far as TeX is concerned; therefore +system implementors can do whatever they want in their change files." + +The flaw in that argument is that this part of TeX is tricky and +I should provide more guidance to the system implementors. I envisaged +the introduction of a new boolean variable, which would allow operation +in the old style without the problem that made a change mandatory; +but I never explained the idea to anybody. + +Now Chris Thompson has sent me another reason for EOF on the terminal. He +independently came up with the idea of the boolean variable; and he proved +to my satisfaction that I should put that variable into all versions of +TeX (and METAFONT), because it is clean and it makes the issues as easy to +understand as they possibly could be. I was holding back because I dislike +making lots of changes to Volumes B and D at this late date. (Several +hours of work are needed every time I have to deal with it.) But I cannot +responsibly leave this flaw in programs that I hope to be proud of for the +rest of my life. + +Instead of introducing a new boolean variable, I could have solved +the problem in a hoky way by setting job_name negative during the +brief time before the log file is opened. That would have meant +fewer updates to the indexes of Volumes B and D. But it would also +have meant tricky code that would look uglier every time I saw it! + +So, I'll be introducing yet a new TeX and METAFONT later today. +This will essentially retract the change made in Version 2.94, replacing +it by another change with two properties: (1) The bug that was fixed +by disallowing EOF on terminal input in 2.94 will be fixed in another +way. (2) The change files that worked for 2.93 should still work +without change in 2.95. + + +[ end of message 010 ] +------- diff --git a/info/digests/tex-implementors/message.11 b/info/digests/tex-implementors/message.11 new file mode 100644 index 0000000000..870000a1c2 --- /dev/null +++ b/info/digests/tex-implementors/message.11 @@ -0,0 +1,1052 @@ +Date: 23 Dec 88 Message No: 011 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: TeX 2.95, MF 1.7, changes to CM fonts, TANGLE 2.9 + + +As you were warned last week, TeX has again been modified, to handle the +change first made in 2.94 more robustly. The change also affects MF, +which is now at version 1.7. Updates to TeX82.BUG, MF84.BUG, TeX.WEB, +MF.WEB and ERRATA.TEX are given below; note that these changes reverse +some of the changes made in TeX 2.94 and MF 1.6, so be particularly +careful applying them if you are using the line numbers for reference. + +Some fixes have been made to bugs in the CM fonts. These changes affect +the following files: + + BIGOP.MF + CMBASE.MF + ROMANL.MF + SYM.MF + SYMBOL.MF + +The changes are posted in CM85.BUG and also in ERRATA.TEX. The changes +given in CM85.BUG for BIGOP and ROMANL are clear, and since there are +many similar code lines in these .MF files that could lead to the changes +being applied to the wrong character descriptions, I am not providing +difference lists for these. Difference lists are provided for CMBASE.MF +and SYM and SYMBOL.MF, where the changes are more extensive, or more +clearly followed from the complete list of differences. + +Finally, TANGLE has been modified to permit references to non-numeric macros +before their definitions. The changes (version 2.9) are listed below. + +All relevant files are now up to date at SCORE. + +As usual, I'd appreciate an acknowledgement that you have received +this message. + +And I'd like to wish everyone the very best of holidays. + + +######################################################################## + +Additions to TEX82.BUG + +349. By popular request, undo #347 and fix the bug a more complex way. +@x module 71 [this undoes change #347] +if not input_ln(term_in,true) then t_open_in; +@y +if not input_ln(term_in,true) then fatal_error("End of file on the terminal!"); +@z +@x module 92 [now we get to the new stuff] +begin if job_name>0 then selector:=term_and_log +@y +begin if log_opened then selector:=term_and_log +@z +@x module 93 + error; +@y + if log_opened then error; +@z +@x module 527 +@!job_name:str_number; {principal file name} +@y +@!job_name:str_number; {principal file name} +@!log_opened:boolean; {has the transcript file been opened?} +@z +@x module 528 +@=job_name:=0; name_in_progress:=false; +@y +@= +job_name:=0; name_in_progress:=false; log_opened:=false; +@z +@x module 534 +selector:=log_only; +@y +selector:=log_only; log_opened:=true; +@z +@x module 535 +begin if interaction + print_file_name(cur_name,cur_area,cur_ext); print("'.");@/ + job_name:=0; history:=fatal_error_stop; jump_out; + end; {abort the program without a log file} +@y +begin selector:=term_only; +@z +@x module 1265 [this change is optional, but it's a slight improvement] +if job_name<>0 then selector:=selector+2; +@y +if log_opened then selector:=selector+2; +@z +@x module 1333 +if job_name>0 then +@y +if log_opened then +@z +@x module 1334 +if job_name>0 then {the log file is open} +@y +if log_opened then +@z + +350. (I sincerely hope that there won't be any more) + + +######################################################################## + +Differences between TEX.WEB 2.94 and 2.95 + +;COMPARISON OF TX:TEX.WEB.10 AND TX:TEX.WEB.1 +;OPTIONS ARE /E /3 + +**** FILE TX:TEX.WEB.10, 1-33 (2181) +% A reward of $81.92 will be paid to the first finder of any remaining bug. +**** FILE TX:TEX.WEB.1, 1-32 (2179) +% Version 2.95 solves that problem a better way (December 1988). + +% A reward of $81.92 will be paid to the first finder of any remaining bug. +*************** + +**** FILE TX:TEX.WEB.10, 2-93 (9365) +@d banner=='This is TeX, Version 2.94' {printed when \TeX\ starts} + +@ Different \PASCAL s have slightly different conventions, and the present +**** FILE TX:TEX.WEB.1, 2-93 (9431) +@d banner=='This is TeX, Version 2.95' {printed when \TeX\ starts} + +@ Different \PASCAL s have slightly different conventions, and the present +*************** + +**** FILE TX:TEX.WEB.10, 7-319 (85645) +begin if job_name>0 then selector:=term_and_log +else selector:=term_only; +**** FILE TX:TEX.WEB.1, 7-319 (85711) +begin if log_opened then selector:=term_and_log +else selector:=term_only; +*************** + +**** FILE TX:TEX.WEB.10, 7-329 (85988) + error; + @!debug if interaction>batch_mode then debug_help;@+gubed@;@/ +**** FILE TX:TEX.WEB.1, 7-329 (86054) + if log_opened then error; + @!debug if interaction>batch_mode then debug_help;@+gubed@;@/ +*************** + +**** FILE TX:TEX.WEB.10, 30-312 (429711) +@ Initially |job_name=0|; it becomes nonzero as soon as the true name is known. +**** FILE TX:TEX.WEB.1, 30-311 (429794) +@!log_opened:boolean; {has the transcript file been opened?} + +@ Initially |job_name=0|; it becomes nonzero as soon as the true name is known. +*************** + +**** FILE TX:TEX.WEB.10, 30-316 (429948) +@=job_name:=0; name_in_progress:=false; + +@ Here is a routine that manufactures the output file names, assuming that +**** FILE TX:TEX.WEB.1, 30-317 (430095) +@= +job_name:=0; name_in_progress:=false; log_opened:=false; + +@ Here is a routine that manufactures the output file names, assuming that +*************** + +**** FILE TX:TEX.WEB.10, 30-399 (433094) +selector:=log_only; +@; +**** FILE TX:TEX.WEB.1, 30-401 (433262) +selector:=log_only; log_opened:=true; +@; +*************** + +**** FILE TX:TEX.WEB.10, 30-413 (433677) +Therefore the program is careful not to call |prompt_file_name| if a +fatal error could result. + +The normal idea of |batch_mode| is that nothing at all should be written +**** FILE TX:TEX.WEB.1, 30-415 (433863) +The |prompt_file_name| routine can result in a |fatal_error|, but the |error| +routine will not be invoked because |log_opened| will be false. + +The normal idea of |batch_mode| is that nothing at all should be written +*************** + +**** FILE TX:TEX.WEB.10, 30-426 (434205) +begin if interaction + print_file_name(cur_name,cur_area,cur_ext); print("'.");@/ + job_name:=0; history:=fatal_error_stop; jump_out; + end; {abort the program without a log file} +prompt_file_name("transcript file name",".log"); +**** FILE TX:TEX.WEB.1, 30-428 (434438) +begin selector:=term_only; +prompt_file_name("transcript file name",".log"); +*************** + +**** FILE TX:TEX.WEB.10, 50-796 (956324) +if job_name<>0 then selector:=selector+2; +end; +**** FILE TX:TEX.WEB.1, 50-796 (956264) +if log_opened then selector:=selector+2; +end; +*************** + +**** FILE TX:TEX.WEB.10, 52-107 (986057) +if job_name>0 then + begin wlog_cr; a_close(log_file); selector:=selector-2; +**** FILE TX:TEX.WEB.1, 52-107 (985996) +if log_opened then + begin wlog_cr; a_close(log_file); selector:=selector-2; +*************** + +**** FILE TX:TEX.WEB.10, 52-122 (986549) +if job_name>0 then {the log file is open} + begin wlog_ln(' '); +**** FILE TX:TEX.WEB.1, 52-122 (986488) +if log_opened then + begin wlog_ln(' '); +*************** + + +######################################################################## + +Additions to MF84.BUG + +546. By popular request, undo #544 and fix the bug a more complex way. +@x module 66 [this undoes chan44] +if not input_ln(term_in,true) n_in; +@y +if not input_ln(term_in,true) then fatal_error("End of file on the terminal!"); +@z +@x module 87 [now we get to the new stuff] +begin if job_name>0 selector:=term_and_log +@y +begin if log_opened then selector:=term_and_log +@z +@x module 88 + error; +@y + if log_opened then error; +@z +@x module 782 +@!job_name:str_number; {principal file name} +@y +@!job_name:str_number; {principal file name} +@!log_opened:boolean; {has the transcript file been opened?} +@z +@x module 783 +@=job_name:=0; +@y +@=job_name:=0; log_opened:=false; +@z +@x module 788 +selector:=log_only; +@y +selector:=log_only; log_opened:=true; +@z +@x module 789 +begin if interaction + print_file_name(cur_name,cur_area,cur_ext); print("'.");@/ + job_name:=0; history:=fatal_error_stop; jump_out; + end; {abort the program without a log file} +@y +begin selector:=term_only; +@z +@x module 1023 [this change is optional, but it's a slight improvement] + if job_name<>0 then selector:=selector+2; +@y + if log_opened then selector:=selector+2; +@z +@x module 1205 +if job_name>0 then +@y +if log_opened then +@z +@x module 1208 +if job_name>0 then {the log file is open} +@y +if log_opened then +@z + +547. (I sincerely hope that there won't be any more) + + +######################################################################## + +Differences between MF.WEB 1.6 and 1.7 + +;COMPARISON OF PS:MF.WEB.5 AND PS:MF.WEB.1 +;OPTIONS ARE /E /3 + +**** FILE PS:MF.WEB.5, 1-18 (1093) +% A few "harmless" optimizations have been made without changing versions. +**** FILE PS:MF.WEB.1, 1-18 (1093) +% Version 1.7 solves that problem a better way (December 1988). +% A few "harmless" optimizations have been made without changing versions. +*************** + +**** FILE PS:MF.WEB.5, 2-81 (7745) +@d banner=='This is METAFONT, Version 1.6' {printed when \MF\ starts} + +@ Different \PASCAL s have slightly different conventions, and the present +**** FILE PS:MF.WEB.1, 2-81 (7810) +@d banner=='This is METAFONT, Version 1.7' {printed when \MF\ starts} + +@ Different \PASCAL s have slightly different conventions, and the present +*************** + +**** FILE PS:MF.WEB.5, 7-324 (80761) +begin if job_name>0 then selector:=term_and_log +else selector:=term_only; +**** FILE PS:MF.WEB.1, 7-324 (80826) +begin if log_opened then selector:=term_and_log +else selector:=term_only; +*************** + +**** FILE PS:MF.WEB.5, 7-334 (81103) + error; + @!debug if interaction>batch_mode then debug_help;@+gubed@;@/ +**** FILE PS:MF.WEB.1, 7-334 (81168) + if log_opened then error; + @!debug if interaction>batch_mode then debug_help;@+gubed@;@/ +*************** + +**** FILE PS:MF.WEB.5, 39-307 (650905) +@!log_name:str_number; {full name of the log file} +**** FILE PS:MF.WEB.1, 39-307 (650989) +@!log_opened:boolean; {has the transcript file been opened?} +@!log_name:str_number; {full name of the log file} +*************** + +**** FILE PS:MF.WEB.5, 39-313 (651196) +@=job_name:=0; + +@ Here is a routine that manufactures the output file names, assuming that +**** FILE PS:MF.WEB.1, 39-314 (651342) +@=job_name:=0; log_opened:=false; + +@ Here is a routine that manufactures the output file names, assuming that +*************** + +**** FILE PS:MF.WEB.5, 39-386 (653986) +selector:=log_only; +@; +**** FILE PS:MF.WEB.1, 39-387 (654151) +selector:=log_only; log_opened:=true; +@; +*************** + +**** FILE PS:MF.WEB.5, 39-399 (654528) +Therefore the program is careful not to call |prompt_file_name| if a +fatal error could result. + +The normal idea of |batch_mode| is that nothing at all should be written +**** FILE PS:MF.WEB.1, 39-400 (654711) +The |prompt_file_name| routine can result in a |fatal_error|, but the |error| +routine will not be invoked because |log_opened| will be false. + +The normal idea of |batch_mode| is that nothing at all should be written +*************** + +**** FILE PS:MF.WEB.5, 39-412 (655056) +begin if interaction + print_file_name(cur_name,cur_area,cur_ext); print("'.");@/ + job_name:=0; history:=fatal_error_stop; jump_out; + end; {abort the program without a log file} +prompt_file_name("transcript file name",".log"); +**** FILE PS:MF.WEB.1, 39-413 (655286) +begin selector:=term_only; +prompt_file_name("transcript file name",".log"); +*************** + +**** FILE PS:MF.WEB.5, 45-46 (803909) + if job_name<>0 then selector:=selector+2; + get_x_next; +**** FILE PS:MF.WEB.1, 45-46 (803846) + if log_opened then selector:=selector+2; + get_x_next; +*************** + +**** FILE PS:MF.WEB.5, 50-116 (916496) +if job_name>0 then + begin wlog_cr; +**** FILE PS:MF.WEB.1, 50-116 (916432) +if log_opened then + begin wlog_cr; +*************** + +**** FILE PS:MF.WEB.5, 50-161 (918333) +if job_name>0 then {the log file is open} + begin wlog_ln(' '); +**** FILE PS:MF.WEB.1, 50-161 (918269) +if log_opened then + begin wlog_ln(' '); +*************** + + +######################################################################## + +Extracts from ERRATA.TeX (differences as compared with previous version) + +;COMPARISON OF TX:ERRATA.TEX.14 AND TX:ERRATA.NEW.1 +;OPTIONS ARE /E /3 + +**** FILE TX:ERRATA.TEX.15, 2-83 (4289) +\bugonpage A465, entry for {\tt\char`\\everymath} (12/12/87) +**** FILE TX:ERRATA.NEW.1, 2-83 (4289) +\bugonpage A464, left column, under Displays (12/8/88) + +\eightpoint\indent\quad +non-centered, 186, 326, 375--376, 420--421. + +\bugonpage A465, entry for {\tt\char`\\everymath} (12/12/87) +*************** + +**** FILE TX:ERRATA.TEX.15, 3-6 (5033) +\bugonpage B2, line 32 (11/6/88) + +\ninepoint\noindent\hskip10pt +{\bf define} $\\{banner}\equiv\hbox{\tt\char'23}$% +{\tt This\]is\]TeX,\]Version\]2.94\char'23}\quad +$\{\,$printed when \TeX\ starts$\,\}$ + +\bugonpage B30, line 3 from the bottom (11/6/88) + +\ninepoint\noindent\hskip10pt +{\bf if} $\lnot\\{input\_ln}(\\{term\_in},\\{true})$ + {\bf then} \\{t\_open\_in}; + +\bugonpage B38, lines 7--9 from the bottom (11/6/88) + +\tenpoint\noindent[Delete this paragraph; it is being moved to page B214.] + +\bugonpage B52, line 5 (8/13/87) +**** FILE TX:ERRATA.NEW.1, 3-6 (5163) +\bugonpage B2, line 32 (12/14/88) + +\ninepoint\noindent\hskip10pt +{\bf define} $\\{banner}\equiv\hbox{\tt\char'23}$% +{\tt This\]is\]TeX,\]Version\]2.95\char'23}\quad +$\{\,$printed when \TeX\ starts$\,\}$ + +\bugonpage B38, lines 7--9 from the bottom (11/6/88) + +\tenpoint\noindent[Delete this paragraph; it is being moved to page B214.] + +\bugonpage B38, line 5 from the bottom (12/14/88) + +\ninepoint\noindent\kern10pt +{\bf begin if\/} \\{log\_opened} {\bf then} $\\{selector}\gets\\{term\_and\_log}$ + +\bugonpage B39, line 5 (12/14/88) + +\ninepoint\noindent\kern50pt +{\bf if\/} \\{log\_opened} {\bf then} \\{error}; + +\bugonpage B52, line 5 (8/13/87) +*************** + +**** FILE TX:ERRATA.TEX.15, 3-193 (11136) +\bugonpage B214, new paragraph after line 3 (11/6/88) + +\tenpoint\noindent\hskip10pt +The normal idea of \\{batch\_mode} is that nothing at all should be written +**** FILE TX:ERRATA.NEW.1, 3-197 (11385) +\bugonpage B211, new line of code before the mini-index (12/14/88) + +\ninepoint\noindent +\\{log\_opened}: \\{boolean};\quad$\{\,$has the transcript file been opened?$\,\}$ + +\bugonpage B212, line 5 (12/14/88) + +\ninepoint\noindent\kern10pt +$\\{job\_name}\gets0$; \ $\\{name\_in\_progress}\gets\\{false}$; \ +$\\{log\_opened}\gets\\{false}$; + +\bugonpage B213, line 24 (12/14/88) + +\ninepoint\noindent\kern10pt +$\\{log\_name}\gets\\{a\_make\_name\_string}(\\{log\_file})$; \ +$\\{selector}\gets\\{log\_only}$; \ +$\\{log\_opened}\gets\\{true}$; + +\bugonpage B214, lines 2 and 3 (12/14/88) + +\tenpoint\noindent +messages or even to \\{show\_context}. +The \\{prompt\_file\_name} routine can result in a \\{fatal\_error}, +but the \\{error} +routine will not be invoked because \\{log\_opened} will be false. +\par\noindent\hskip10pt +The normal idea of \\{batch\_mode} is that nothing at all should be written +*************** + +**** FILE TX:ERRATA.TEX.15, 3-201 (11451) +\bugonpage B214, lines 8--9 (11/6/88) + +\ninepoint\noindent\hskip20pt +{\bf begin} $\\{selector}\gets\\{term\_only}$; \ + \\{print\_err}({\tt\char`\"I\]can't\]write\]on\]file\]`\char`\"});\par +\noindent\hskip20pt + \\{print\_file\_name}$(\\{cur\_name},\\{cur\_area},\\{cur\_ext})$; \ + \\{print}({\tt\char`\"'.\char`\"}); + +\bugonpage B224, second-last line (4/28/87) +**** FILE TX:ERRATA.NEW.1, 3-228 (12455) +\bugonpage B214, lines 7--11 reduce to a single line (12/14/88) + +\ninepoint\noindent\hskip10pt +{\bf begin} $\\{selector}\gets\\{term\_only}$; + +\bugonpage B224, second-last line (4/28/87) +*************** + +**** FILE TX:ERRATA.TEX.15, 3-390 (17709) +\bugonpage B547, right column (9/20/87) +**** FILE TX:ERRATA.NEW.1, 3-413 (18534) +\bugonpage B507, line 13 (12/14/88) + +\ninepoint\noindent\kern10pt +{\bf if\/} \\{log\_opened} {\bf then} $\\{selector}\gets\\{selector}+2$; + +\bugonpage B527, line 21 (12/14/88) + +\ninepoint\noindent\kern10pt +{\bf if\/} \\{log\_opened} {\bf then} + +\bugonpage B528, line 5 (12/14/88) + +\ninepoint\noindent\kern10pt +{\bf if\/} \\{log\_opened} {\bf then} + +\bugonpage B547, right column (9/20/87) +*************** + +**** FILE TX:ERRATA.TEX.15, 3-417 (18382) +\bugonpage B559, right column (8/13/87) +**** FILE TX:ERRATA.NEW.1, 3-455 (19571) +\bugonpage B559, new entry (12/14/88) + +\eightpoint\noindent +\\{log\_opened}, 92--93, $\underline{527}$, 528, 534--535, 1265, 1333--1334. + +\bugonpage B559, right column (8/13/87) +*************** + +**** FILE TX:ERRATA.TEX.15, 5-6 (20908) +\bugonpage D2, line 27 (11/6/88) + +\ninepoint\noindent\hskip10pt +{\bf define} $\\{banner}\equiv\hbox{\tt\char'23}$% +{\tt This\]is\]METAFONT,\]Version\]1.6\char'23}\quad +$\{\,$printed when \MF\ starts$\,\}$ + +\bugonpage D28, line 7 from the bottom (11/6/88) + +\ninepoint\noindent\hskip10pt +{\bf if} $\lnot\\{input\_ln}(\\{term\_in},\\{true})$ + {\bf then} \\{t\_open\_in}; + +\bugonpage D36, lines 3--5 (11/6/88) +\tenpoint\noindent[Delete this paragraph; it is being moved to page D349.] + +\bugonpage D66, lines 34--35 (7/9/88) +**** FILE TX:ERRATA.NEW.1, 5-6 (22240) +\bugonpage D2, line 27 (12/14/88) + +\ninepoint\noindent\hskip10pt +{\bf define} $\\{banner}\equiv\hbox{\tt\char'23}$% +{\tt This\]is\]METAFONT,\]Version\]1.7\char'23}\quad +$\{\,$printed when \MF\ starts$\,\}$ + +\bugonpage D36, lines 3--5 (11/6/88) + +\tenpoint\noindent[Delete this paragraph; it is being moved to page D349.] + +\bugonpage D36, line 7 (12/14/88) + +\ninepoint\noindent\kern10pt +{\bf begin if\/} \\{log\_opened} {\bf then} $\\{selector}\gets\\{term\_and\_log}$ + +\bugonpage D36, line 16 (12/14/88) + +\ninepoint\noindent\kern50pt +{\bf if\/} \\{log\_opened} {\bf then} \\{error}; + +\bugonpage D66, lines 34--35 (7/9/88) +*************** + +**** FILE TX:ERRATA.TEX.15, 5-32 (21773) +\bugonpage D349, new paragraph after line 7 (11/6/88) + +\tenpoint\noindent\hskip10pt +The normal idea of \\{batch\_mode} is that nothing at all should be written +**** FILE TX:ERRATA.NEW.1, 5-36 (23209) +\bugonpage D347, new line of code after line 5 (12/14/88) + +\ninepoint\noindent +\\{log\_opened}: \\{boolean};\quad$\{\,$has the transcript file been opened?$\,\}$ + +\bugonpage D347, line 11 (12/14/88) + +\ninepoint\noindent\kern10pt +$\\{job\_name}\gets0$; \ +$\\{log\_opened}\gets\\{false}$; + +\bugonpage D348, line 4 from the bottom (12/14/88) + +\ninepoint\noindent\kern10pt +$\\{log\_name}\gets\\{a\_make\_name\_string}(\\{log\_file})$; \ +$\\{selector}\gets\\{log\_only}$; \ +$\\{log\_opened}\gets\\{true}$; + +\bugonpage D349, lines 6 and 7 (12/14/88) + +\tenpoint\noindent +print error messages or even to \\{show\_context}. +The \\{prompt\_file\_name} routine can result in a \\{fatal\_error}, +but the \\{error} +routine will not be invoked because \\{log\_opened} will be false. +\par\noindent\hskip10pt +The normal idea of \\{batch\_mode} is that nothing at all should be written +*************** + +**** FILE TX:ERRATA.TEX.15, 5-40 (22088) +\bugonpage D349, lines 12--13 (11/6/88) + +\ninepoint\noindent\hskip20pt +{\bf begin} $\\{selector}\gets\\{term\_only}$; \ + \\{print\_err}({\tt\char`\"I\]can't\]write\]on\]file\]`\char`\"});\par +\noindent\hskip20pt + \\{print\_file\_name}$(\\{cur\_name},\\{cur\_area},\\{cur\_ext})$; \ + \\{print}({\tt\char`\"'.\char`\"}); + +\bugonpage D420, bottom line (5/25/88) +**** FILE TX:ERRATA.NEW.1, 5-67 (24256) +\bugonpage D349, lines 11--15 reduce to a single line (12/14/88) + +\ninepoint\noindent\hskip10pt +{\bf begin} $\\{selector}\gets\\{term\_only}$; + +\bugonpage D420, bottom line (5/25/88) +*************** + +**** FILE TX:ERRATA.TEX.15, 5-63 (22896) +\bugonpage D545, left column (10/31/87) +**** FILE TX:ERRATA.NEW.1, 5-86 (24884) +\bugonpage D444, line 8 from the bottom (12/14/88) + +\ninepoint\noindent\kern10pt +{\bf if\/} \\{log\_opened} {\bf then} $\\{selector}\gets\\{selector}+2$; + +\bugonpage D510, line 14 (12/14/88) + +\ninepoint\noindent\kern10pt +{\bf if\/} \\{log\_opened} {\bf then} + +\bugonpage D511, line 11 (12/14/88) + +\ninepoint\noindent\kern10pt +{\bf if\/} \\{log\_opened} {\bf then} + +\bugonpage D530, new entry (12/14/88) + +\eightpoint\noindent +\\{log\_opened}, 87--88, $\underline{782}$, 783, 788--789, 1023, 1205, 1208. + +\bugonpage D545, left column (10/31/87) +*************** + +**** FILE TX:ERRATA.TEX.15, 6-21 (23635) +\bugonpage E353, lines 38--39 (8/12/87) +**** FILE TX:ERRATA.NEW.1, 6-21 (26146) +\bugonpage E333, line 11 (12/11/88) + +\ninepoint +\line{{\bf if\/} not \\{monospace}: + $r:={\rm hround}(x_5+x_1)+l$; {\bf fi}\hfill + \% change width for better fit} + +\bugonpage E353, lines 38--39 (8/12/87) +*************** + +**** FILE TX:ERRATA.TEX.15, 6-46 (24394) +\bugonpage E485, line 4 (8/7/87) +**** FILE TX:ERRATA.NEW.1, 6-53 (27077) +\bugonpage E471, line 5 (12/11/88) + +\ninepoint\noindent +$x_2=\\{good}.x\,.5w$; \ $\\{center\_on}(x_2)$; + +\bugonpage E471, insert two lines below the rule at bottom of page (12/11/88) + +\ninepoint +\line{{\bf def\/} +\\{center\_on}({\bf expr} $x) =\null$ +{\bf if\/} not \\{monospace}:\hfill \% change width for symmetric fit} +\leftline{\kern10pt + $r:=r+2x-w$; \ $w:=2x$; \ {\bf fi} {\bf enddef};} + +\bugonpage E477, line 20 (12/11/87) + +\ninepoint\noindent +$x_4=x_8=\\{good}.x\,.5w$; \ $\\{center\_on}(x_4)$; \ +$x_2=w-x_6=\\{good}.x(x_4+a)$; + +\bugonpage E483, third line of elementary division operator (12/11/88) + +\ninepoint\noindent +$x_3-.5\\{dot\_size}={\rm hround}(.5w-.5\\{dot\_size})$; \ +$\\{center\_on}(x_3)$; + +\bugonpage E485, line 4 (8/7/87) +*************** + +**** FILE TX:ERRATA.TEX.15, 6-58 (24810) +\bugonpage E550, new line after line 23 (8/15/87) +**** FILE TX:ERRATA.NEW.1, 6-91 (28231) +\bugonpage E515, lines 5 and 12 (12/11/88) + +\ninepoint\noindent +$.5[x_1,x_2]=x_3=\\{good}.x\,.5w$; \ +$\\{center\_on}(x_3)$; \ $\\{lft}\,x_1={\rm hround}(.5w-u*{\rm sqrt}48)$; + +\bugonpage E521, lines 4 and 14 (12/12/88) + +\ninepoint\noindent +$x_1=x_2=\\{good}.x\,.5w$; \ +$\\{center\_on}(x_1)$; \ $\\{lft}\,x_3={\rm hround}\,u$; \ $x_4=w-x_3$; + +\bugonpage E537, line 6 (12/11/88) + +\ninepoint\noindent +$x_1=x_2=x_3=x_4$; \ +$x_1-.5\\{stem}={\rm hround}(.5w-.5\\{stem})$; \ +$\\{center\_on}(x_1)$; + +\bugonpage E537, line 19 (12/11/88) + +\ninepoint\noindent +$x_1=x_2=x_3$; \ +$x_1-.5\\{stem}={\rm hround}(.5w-.5\\{stem})$; \ +$\\{center\_on}(x_1)$; + +\bugonpage E539, line 4 (12/11/88) + +\ninepoint\noindent +$x_1=x_4=x_{30}=x_{33}=\\{good}.x\,.5w$; \ $\\{center\_on}(x_1)$; + +\bugonpage E539, line 21 (12/11/88) + +\ninepoint\noindent +$x_1=x_4=\\{good}.x\,.5w$; \ $\\{center\_on}(x_1)$; + +\bugonpage E541, line 4 (12/11/88) + +\ninepoint\noindent +$x_1=x_5=\\{good}.x\,.5w$; \ $\\{center\_on}(x_1)$; + +\bugonpage E541, line 17 (12/11/88) + +\ninepoint\noindent +$x_1=x_{10}=\\{good}.x\,.5w$; \ $\\{center\_on}(x_1)$; + +\bugonpage E550, new line after line 23 (8/15/87) +*************** + +**** FILE TX:ERRATA.TEX.15, 6-62 (24960) + {\bf if} $\hbox{\$}<3$: $\hbox{\$}:=3$; {\bf fi endfor} +\smallskip\noindent +**** FILE TX:ERRATA.NEW.1, 6-141 (29521) + {\bf if\/} $\hbox{\$}<3$: $\hbox{\$}:=3$; {\bf fi endfor} +\smallskip\noindent +*************** + +**** FILE TX:ERRATA.TEX.15, 6-71 (25320) + \\{cap\_bar},\\{cap\_band}$; + +\bye +**** FILE TX:ERRATA.NEW.1, 6-150 (29883) + \\{cap\_bar},\\{cap\_band})$; + +\bugonpage E572, new entry at bottom (12/11/88) + +\eightpoint\noindent +\\{center\_on}, $\underline{473}$, 477, 483, 515, 521, 537--541. + +\bye +*************** + + +######################################################################## + +Additions to CM85.BUG + +@x in BIGOP, the \displaystyle coproduct sign +lft x11=hround u; x1l-x11=x2l-x12=x22-x2r=hround cap_jut; +@y +lft x11=hround u; x1l-x11=x2l-x12=x22-x2r=hround 1.6cap_jut; +@z + +@x in ROMANL, the letter m +if not monospace: r:=hround(x5+x1)-l; fi % change width for better fit +@y +if not monospace: r:=hround(x5+x1)+l; fi % change width for better fit +@z + +@x a new routine for CMBASE, following change_width +@y +def center_on(expr x) = if not monospace: % change width for symmetric fit + r:=r+2x-w; w:=2x; fi enddef; +@z +@x in SYMBOL, the elementary division operator +x3-.5dot_size=hround(.5w-.5dot_size); w:=r:=2x3; +@y +x3-.5dot_size=hround(.5w-.5dot_size); center_on(x3); +@z +Similarly, whenever the construction "w:=r:=2x*" appears, change it to +"center_on(x*)". This happens in the programs for elementary division operator +(as noted above), large triangle, large inverted triangle, lattice top, +lattice bottom, dagger mark, double dagger mark, club/diamond/heart/spade suit +(all in SYMBOL), plus the diamond operator and universal quantifier in SYM. +The following additional change needs to be made in the programs +for lattice top and lattice bottom: +@x +x1=x2=good.x .5w; center_on(x1); lft x3=hround u; x4=r-x3; +@y +x1=x2=good.x .5w; center_on(x1); lft x3=hround u; x4=w-x3; +@z + +(I sincerely hope there won't be any more!) + + +######################################################################## + +Differences in CMBASE.MF + +;COMPARISON OF PS:CMBASE.MF.11 AND PS:CMBASE.MF.12 +;OPTIONS ARE /E /3 + +**** FILE PS:CMBASE.MF.11, 1-490 (21001) +def padded expr del_sharp = +**** FILE PS:CMBASE.MF.12, 1-490 (21001) +def center_on(expr x) = if not monospace: % change width for symmetric fit + r:=r+2x-w; w:=2x; fi enddef; + +def padded expr del_sharp = +*************** + + +######################################################################## + +Differences in SYM.MF + +;COMPARISON OF PS:SYM.MF.8 AND PS:SYM.MF.9 +;OPTIONS ARE /E /3 + +**** FILE PS:SYM.MF.8, 1-218 (9135) +x2=good.x .5w; w:=r:=2x2; +lft x1=0; x3=w-x1; +**** FILE PS:SYM.MF.9, 1-218 (9135) +x2=good.x .5w; center_on(x2); +lft x1=0; x3=w-x1; +*************** + +**** FILE PS:SYM.MF.8, 1-354 (14154) +x4=x8=good.x .5w; w:=r:=2x4; x2=w-x6=good.x(x4+a); +y2=y6=.5[y4,y8]=math_axis; y8=good.y(y2+a); +**** FILE PS:SYM.MF.9, 1-354 (14158) +x4=x8=good.x .5w; center_on(x4); x2=w-x6=good.x(x4+a); +y2=y6=.5[y4,y8]=math_axis; y8=good.y(y2+a); +*************** + + +######################################################################## + +Differences in SYMBOL.MF + +;COMPARISON OF PS:SYMBOL.MF.7 AND PS:SYMBOL.MF.8 +;OPTIONS ARE /E /3 + +**** FILE PS:SYMBOL.MF.7, 1-47 (1929) +x3-.5dot_size=hround(.5w-.5dot_size); w:=r:=2x3; +y3+.5dot_size=vround(math_spread[.5x_hei+.5dot_size); +**** FILE PS:SYMBOL.MF.8, 1-47 (1929) +x3-.5dot_size=hround(.5w-.5dot_size); center_on(x3); +y3+.5dot_size=vround(math_axis+math_spread[.5x_height,.6x_height]+.5dot_size); +*************** + +**** FILE PS:SYMBOL.MF.7, 1-500 (21343) +.5[x1,x2]=x3=good.x .5w; w:=r:=2x3; lft x1=hround(.5w-u*sqrt48); +draw z1--zle; % stroke +**** FILE PS:SYMBOL.MF.8, 1-500 (21347) +.5[x1,x2]=x3=good.x .5w; center_on(x3); lft x1=hround(.5w-u*sqrt48); +draw z1--z2--z3--cycle; % stroke +*************** + +**** FILE PS:SYMBOL.MF.7, 1-508 (21625) +.5[x1,x2]=x3=good.x .5w; w:=r:=2x3; lft x1=hround(.5w-u*sqrt48); +draw z1--z2--z3--cycle; % stroke +**** FILE PS:SYMBOL.MF.8, 1-508 (21633) +.5[x1,x2]=x3=good.x .5w; center_on(x3); lft x1=hround(.5w-u*sqrt48); +draw z1--z2--z3--cycle; % stroke +*************** + +**** FILE PS:SYMBOL.MF.7, 1-615 (26376) +x1=x2=good.x .5w; w:=r:=2x1; lft x3=hround u; x4=r-x3; +bot y1=0; y2-y1=x4-x3; +**** FILE PS:SYMBOL.MF.8, 1-615 (26388) +x1=x2=good.x .5w; center_on(x1); lft x3=hround u; x4=w-x3; +bot y1=0; y2-y1=x4-x3; +*************** + +**** FILE PS:SYMBOL.MF.7, 1-626 (26691) +x1=x2=good.x .5w; w:=r:=2x1; lft x3=hround u; x4=r-x3; +bot y1=0; y2-y1=x4-x3; +**** FILE PS:SYMBOL.MF.8, 1-626 (26707) +x1=x2=good.x .5w; center_on(x1); lft x3=hround u; x4=w-x3; +bot yy2-y1=x4-x3; +*************** + +**** FILE PS:SYMBOL.MF.7, 1-932 (39305) +x1=x2=x3=x4; x1-.5stem=hround(.5w-.5stem); w:=r:=2x1; +x5-.5stem=hround u; x6=w-x5; +**** FILE PS:SYMBOL.MF.8, 1-932 (39325) +x1=x2=x3=x4; x1-.5stem=hround(.5w-.5stem); center_on(x1); +x5-.5hround u; x6=w-x5; +*************** + +**** FILE PS:SYMBOL.MF.7, 1-946 (39921) +x1=x2=x3; x1-.5stem=hround(.5w-.5stem); w:=r:=2x1; +x4-.5hround u; x5=w-x4; +**** FILE PS:SYMBOL.MF.8, 1-946 (39945) +x1=x2=x3; x1-.5stem=hround(.5w-.5stem); center_on(x1); +x4-.5d u; x5=w-x4; +*************** + +**** FILE PS:SYMBOL.MF.7, 1-979 (41448) +x1=x4=x30=x33=good.x .5w; w:=r:=2x1; +x2=good.x(x1-.5u)-eps; lft x1-rt x10=hround .5pt; lft x12=hround .5u; +**** FILE PS:SYMBOL.MF.8, 1-979 (41476) +x1=x4=x30=x33=good.x .5w; center_on(x1); +x2=good.x(x1-.5u)-eps; lft x1-rt x10=hround .5pt; lft x12=hround .5u; +*************** + +**** FILE PS:SYMBOL.MF.7, 1-997 (42416) +x1=x4=good.x .5w; w:=r:=2x1; +lft x2=hround u; x3=w-x2; +**** FILE PS:SYMBOL.MF.8, 1-997 (42448) +x1=x4=good.x .5w; center_on(x1); +lft x2=hround u; x3=w-x2; +*************** + +**** FILE PS:SYMBOL.MF.7, 1-1009 (42973) +x1=x5=good.x .5w; w:=r:=2x1; +lft x7=hround u; x8=4u; x2+x8=x3+x7=x4+x6=w; +**** FILE PS:SYMBOL.MF.8, 1-1009 (43009) +x1=x5=good.x .5w; center_on(x1); +lft x7=hround u; x8=4u; x2+x8=x3+x7=x4+x6=w; +*************** + +**** FILE PS:SYMBOL.MF.7, 1-1023 (43554) +x1=x10=good.x .5w; w:=r:=2x1; +x2=good.x(x1-.5u)-eps; lft x1-rt x6=hround .5pt; x5=x6; +**** FILE PS:SYMBOL.MF.8, 1-1023 (43594) +x1=x10=good.x .5w; center_on(x1); +x2=good.x(x1-.5u)-eps; lft x1-rt x6=hround .5pt; x5=x6; +*************** + + +######################################################################## + +Differences between TANGLE.WEB 2.8 and 2.9 + +;COMPARISON OF PS:TANGLE.WEB.4 AND PS:TANGLE.WEB.1 +;OPTIONS ARE /E /3 + +**** FILE PS:TANGLE.WEB.4, 1-15 (889) +% Here is TeX material that gets inserted after \input webmac +**** FILE PS:TANGLE.WEB.1, 1-14 (887) +% Version 2.9 allows nonnumeric macros before their definition (December, 1988). +% Here is TeX material that gets inserted after \input webmac +*************** + +**** FILE PS:TANGLE.WEB.4, 1-32 (1590) + \centerline{(Version 2.8)} + \vfill} +**** FILE PS:TANGLE.WEB.1, 1-33 (1672) + \centerline{(Version 2.9)} + \vfill} +*************** + +**** FILE PS:TANGLE.WEB.4, 1-61 (2855) +@d banner=='This is TANGLE, Version 2.8' + +@ The program begins with a fairly normal header, made up of pieces that +**** FILE PS:TANGLE.WEB.1, 2-26 (2936) +@d banner=='This is TANGLE, Version 2.9' + +@ The program begins with a fairly normal header, made up of pieces that +*************** + +**** FILE PS:TANGLE.WEB.4, 1-1003 (43139) +if p<>name_ptr then @ +else @; +**** FILE PS:TANGLE.WEB.1, 7-114 (43215) +if p<>name_ptr then + @ +else @; +*************** + +**** FILE PS:TANGLE.WEB.4, 1-1026 (43934) +@ If a macro has appeared before it was defined, \.{TANGLE} will +still work all right; after all, such behavior is typical of the replacement +**** FILE PS:TANGLE.WEB.1, 7-138 (44028) +@ If a nonnumeric macro has appeared before it was defined, \.{TANGLE} will +still work all right; after all, such behavior is typical of the replacement +*************** + +**** FILE PS:TANGLE.WEB.4, 1-1031 (44245) +so \.{TANGLE} finds it simplest to make a blanket rule that macros should +be defined before they are used. The following routine gives an error message +**** FILE PS:TANGLE.WEB.1, 7-143 (44350) +so \.{TANGLE} finds it simplest to make a blanket rule that numeric macros should +be defined before they are used. The following routine gives an error message +*************** + +**** FILE PS:TANGLE.WEB.4, 1-1037 (44544) + begin err_print('! This identifier has already appeared'); +@.This identifier has already...@> +**** FILE PS:TANGLE.WEB.1, 7-149 (44657) + begin if t=numeric then err_print('! This identifier has already appeared'); +@.This identifier has already...@> +*************** + + +######################################################################## + + +[ end of message 011 ] +------- diff --git a/info/digests/tex-implementors/message.12 b/info/digests/tex-implementors/message.12 new file mode 100644 index 0000000000..31b99678e0 --- /dev/null +++ b/info/digests/tex-implementors/message.12 @@ -0,0 +1,333 @@ +Received: from robin by clan.nott.ac.uk id aa18295; 7 Jan 89 15:05 PST +Received: from nss.cs.ucl.ac.uk by much.Cs.Nott.AC.UK id aa11805; + 7 Jan 89 23:04 GMT +Received: from vax02.ams.com by NSS.Cs.Ucl.AC.UK via Satnet with SMTP + id aa06018; 7 Jan 89 22:53 GMT +Date: Sat 7 Jan 89 17:40:07-EST +From: bbeeton +Subject: more errata; corrections to TEX82.BUG and CM changes, etc. +To: TeX-implementors@vax02.ams.com +Message-ID: <600216007.0.BNB@VAX02.AMS.COM> +Mail-System-Version: + +Date: 7 Jan 89 Message No: 012 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: more errata; corrections to TEX82.BUG and CM changes + + +Don Knuth says + + people still read those books + and still find mistakes! I just added errata for pages A383 and C271. + Page A383 should have been updated when I made TeX version 1.3 in 1985! + +Changes to ERRATA.TEX are included below. + +A small correction has been made to TEX82.BUG in a very old change; it +affects only documentation, and corrects a module number. + + +Chris Thompson has informed me that some lines in the difference list for +SYMBOL.MF were corrupted. I believe that all of these were in the final +context lines, so anyone who has tried to apply the changes by hand has +probably been able to get a correct file. Nonetheless, the correct +difference list is given below. (The discrepancies are due to a glitch in +the software used to transfer the difference files from a DEC-20 to a +VAX/VMS. I knew this was a problem, and checked all the difference files +accordingly, or so I thought. This one slipped through somehow. Apologies.) + + +After contemplating the nature of the last two bug fixes to TeX and MF, I +have decided that a cumulative list of differences might be useful to anyone +who may have delayed installing the changes conveyed in these messages. +The following cumulative difference lists now exist, and I will be happy to +send one or more of them to anyone who sends me a specific request. + + TeX 2.0 (Dec 86) through 2.7 (Nov 87) + TeX 2.7 (Nov 87) through 2.95 (Dec 88) + MF 1.3 (Dec 86) through 1.7 (Dec 88) + + +When I communicated the changes for TANGLE 2.9 in message 11, I failed to +include Knuth's explanation. Here it is. + + At the suggestion of Wayne Sewell, who is writing a book about WEB, + I've removed a restriction: One can now use a nonnumeric macro + before declaring it. (The old documentation for section 59 of TANGLE + mentioned that this restriction wasn't really necessary. I've finally + eliminated it, because Wayne found it a hassle, and I wanted to reward + him for all his hard work. + + The only change, except to version number and documentation, is + to insert `if t=numeric then' before the first err_print in section 59. + The only change as far as users go is that some programs that used to + give error messages will now run without error. + + Programmers who use a macro before declaring it may get a spurious + warning about conflict between identifiers with the same first six letters; + TANGLE won't know that certain identifiers will later become macros. + +The changes to TANGLE precipitated some changes in the WEB manual. Those +changes are listed below. + + +In response to an inquiry for suggestions on how the TRIP and TRAP LOG files +might safely be sent across unpredictable gateways, I was sent two small C +programs, one to hexify files and the other to unhex them. Here is the +description and a warning that came with the code: + + The C programs hex.c and unhex.c translate between 8-bit binary files + and straight hex files, in which every pair of hexadecimal digits + corresponds to a single 8-bit byte. Certain files in the Kermit + distribution are in this format. You can recognize them because they + contain only the characters 0-9 and A-F -- no colons or other characters. + + Warning - HEX.C doesn't work under Microsoft C on the IBM PC family: + getchar() returns EOF (-1) whenever it reads a 0xFF byte from the input + file. Seems like a bug in MSC... Since everything is an int, there + shouldn't be any sign extension going on. Boo. Testing with feof() + wouldn't help either, because getchar() buffers ahead. Maybe use + single-character read()? + +This seems the most promising method I've heard about so far. I doubt very +much that any 0xFF bytes will occur in the LOG files, so that doesn't seem +a problem. I plan to test this out, and if I can succeed in making it work +here, the next message will include the C code, and then I will begin to +send out the long-awaited TRIP and TRAP. If anyone believes they would have +a problem with this technique, please let me know; on the other hand, if +anyone has another reasonable suggestion, I'd like to hear that too. + + +I was notified by my system administrator that at least two copies of the +last message failed to be sent, but the addresses were scrambled and there +was no way to identify the intended recipients. If you have missed any +messages, please let me know, and also acknowledge receipt of this one. +I will be out of town from Jan 13-30, and I will try, after I return, to +query anyone from whom I haven't received a reply. (TRIP and TRAP will +also have to wait until after I return, but I hope finally to be able to +take care of them quickly then.) + + +######################################################################## + +Extracts from ERRATA.TeX (differences as compared with previous version) + +;COMPARISON OF PS:ERRATA.TEX.18 AND PS:ERRATA.NEW.2 +;OPTIONS ARE /E /3 + +**** FILE PS:ERRATA.TEX.18, 2-51 (2996) +\bugonpage A454, lines 23--29 (8/13/87) +**** FILE PS:ERRATA.NEW.2, 2-51 (2996) +\bugonpage A383, lines 7--15 from the bottom (1/4/89) + +\begintt + 209 strings out of 1685 + 1659 string characters out of 17636 + 27618 words of memory out of 52821 + 1172 multiletter control sequences out of 2500 +\endtt +Consequently there was plenty of room for more macros: $52821-27618= +25203$ unused cells of main memory, $2500-1172=1328$ of name memory, +$1685-209=1476$ of string memory, and $17636-1659=15977$ of character memory. +But a fairly large \TeX\ was being used, and only the macros of +Appendices B and~E were loaded; in other circumstances it might have +been necessary to conserve space. + +\bugonpage A454, lines 23--29 (8/13/87) +*************** + +**** FILE PS:ERRATA.TEX.18, 2-100 (4766) +\bugonpage A480, right column (2/15/88) +**** FILE PS:ERRATA.NEW.2, 2-115 (5382) +\bugonpage A474, left column (12/27/88) + +\eightpoint\indent +\hbox to0pt{\hss\lower1pt\hbox{*}}|\parshape|, 101--102, 214, 271, 277, 283, + +\bugonpage A480, right column (2/15/88) +*************** + +**** FILE PS:ERRATA.TEX.18, 4-39 (21232) +\bugonpage C271, line 4 from the bottom (12/23/88) +**** FILE PS:ERRATA.NEW.2, 4-39 (21991) +\bugonpage C271, line 12 (1/4/89) + +\ninepoint\noindent +the user and \MF's primitive picture commands. +First, some important program\cutpar + +\bugonpage C271, line 4 from the bottom (12/23/88) +*************** + + +######################################################################## + +Correction to TEX82.BUG in change no. 300 (25 Nov 84) + +;COMPARISON OF PS:TEX82.BUG.14 AND PS:TEX82.BUG.2 +;OPTIONS ARE /E /3 + +**** FILE PS:TEX82.BUG.14, 19-463 (139100) +@x module 693 + print_int(dyn_used); print("; max so far: "); +**** FILE PS:TEX82.BUG.15, 19-463 (139100) +@x module 639 + print_int(dyn_used); print("; max so far: "); +*************** + + +######################################################################## + +Differences in SYMBOL.MF + +;COMPARISON OF PS:SYMBOL.MF.7 AND PS:SYMBOL.MF.8 +;OPTIONS ARE /E /3 + +**** FILE PS:SYMBOL.MF.7, 1-47 (1929) +x3-.5dot_size=hround(.5w-.5dot_size); w:=r:=2x3; +y3+.5dot_size=vround(math_axis+math_spread[.5x_height,.6x_height]+.5dot_size); +**** FILE PS:SYMBOL.MF.8, 1-47 (1929) +x3-.5dot_size=hround(.5w-.5dot_size); center_on(x3); +y3+.5dot_size=vround(math_axis+math_spread[.5x_height,.6x_height]+.5dot_size); +*************** + +**** FILE PS:SYMBOL.MF.7, 1-500 (21343) +.5[x1,x2]=x3=good.x .5w; w:=r:=2x3; lft x1=hround(.5w-u*sqrt48); +draw z1--z2--z3--cycle; % stroke +**** FILE PS:SYMBOL.MF.8, 1-500 (21347) +.5[x1,x2]=x3=good.x .5w; center_on(x3); lft x1=hround(.5w-u*sqrt48); +draw z1--z2--z3--cycle; % stroke +*************** + +**** FILE PS:SYMBOL.MF.7, 1-508 (21625) +.5[x1,x2]=x3=good.x .5w; w:=r:=2x3; lft x1=hround(.5w-u*sqrt48); +draw z1--z2--z3--cycle; % stroke +**** FILE PS:SYMBOL.MF.8, 1-508 (21633) +.5[x1,x2]=x3=good.x .5w; center_on(x3); lft x1=hround(.5w-u*sqrt48); +draw z1--z2--z3--cycle; % stroke +*************** + +**** FILE PS:SYMBOL.MF.7, 1-615 (26376) +x1=x2=good.x .5w; w:=r:=2x1; lft x3=hround u; x4=r-x3; +bot y1=0; y2-y1=x4-x3; +**** FILE PS:SYMBOL.MF.8, 1-615 (26388) +x1=x2=good.x .5w; center_on(x1); lft x3=hround u; x4=w-x3; +bot y1=0; y2-y1=x4-x3; +*************** + +**** FILE PS:SYMBOL.MF.7, 1-626 (26691) +x1=x2=good.x .5w; w:=r:=2x1; lft x3=hround u; x4=r-x3; +bot y1=0; y2-y1=x4-x3; +**** FILE PS:SYMBOL.MF.8, 1-626 (26707) +x1=x2=good.x .5w; center_on(x1); lft x3=hround u; x4=w-x3; +bot y1=0; y2-y1=x4-x3; +*************** + +**** FILE PS:SYMBOL.MF.7, 1-932 (39305) +x1=x2=x3=x4; x1-.5stem=hround(.5w-.5stem); w:=r:=2x1; +x5-.5stem=hround u; x6=w-x5; +**** FILE PS:SYMBOL.MF.8, 1-932 (39325) +x1=x2=x3=x4; x1-.5stem=hround(.5w-.5stem); center_on(x1); +x5-.5stem=hround u; x6=w-x5; +*************** + +**** FILE PS:SYMBOL.MF.7, 1-946 (39921) +x1=x2=x3; x1-.5stem=hround(.5w-.5stem); w:=r:=2x1; +x4-.5stem=hround u; x5=w-x4; +**** FILE PS:SYMBOL.MF.8, 1-946 (39945) +x1=x2=x3; x1-.5stem=hround(.5w-.5stem); center_on(x1); +x4-.5stem=hround u; x5=w-x4; +*************** + +**** FILE PS:SYMBOL.MF.7, 1-979 (41448) +x1=x4=x30=x33=good.x .5w; w:=r:=2x1; +x2=good.x(x1-.5u)-eps; lft x1-rt x10=hround .5pt; lft x12=hround .5u; +**** FILE PS:SYMBOL.MF.8, 1-979 (41476) +x1=x4=x30=x33=good.x .5w; center_on(x1); +x2=good.x(x1-.5u)-eps; lft x1-rt x10=hround .5pt; lft x12=hround .5u; +*************** + +**** FILE PS:SYMBOL.MF.7, 1-997 (42416) +x1=x4=good.x .5w; w:=r:=2x1; +lft x2=hround u; x3=w-x2; +**** FILE PS:SYMBOL.MF.8, 1-997 (42448) +x1=x4=good.x .5w; center_on(x1); +lft x2=hround u; x3=w-x2; +*************** + +**** FILE PS:SYMBOL.MF.7, 1-1009 (42973) +x1=x5=good.x .5w; w:=r:=2x1; +lft x7=hround u; x8=4u; x2+x8=x3+x7=x4+x6=w; +**** FILE PS:SYMBOL.MF.8, 1-1009 (43009) +x1=x5=good.x .5w; center_on(x1); +lft x7=hround u; x8=4u; x2+x8=x3+x7=x4+x6=w; +*************** + +**** FILE PS:SYMBOL.MF.7, 1-1023 (43554) +x1=x10=good.x .5w; w:=r:=2x1; +x2=good.x(x1-.5u)-eps; lft x1-rt x6=hround .5pt; x5=x6; +**** FILE PS:SYMBOL.MF.8, 1-1023 (43594) +x1=x10=good.x .5w; center_on(x1); +x2=good.x(x1-.5u)-eps; lft x1-rt x6=hround .5pt; x5=x6; +*************** + + +######################################################################## + +Changes in the WEB manual + +;COMPARISON OF PS:WEBMAN.TEX.2 AND PS:WEBMAN.TEX.3 +;OPTIONS ARE /E /3 + +**** FILE PS:WEBMAN.TEX.2, 1-198 (11598) +A module begins with the pair of symbols `\.{@\ }' or `\.{@*}', where +**** FILE PS:WEBMAN.TEX.3, 3-43 (11596) +\eject % page break inserted Dec 88 + +A module begins with the pair of symbols `\.{@\ }' or `\.{@*}', where +*************** + +**** FILE PS:WEBMAN.TEX.2, 1-361 (21994) +and \\{char}, even though \\{buffer} and \\{char} +**** FILE PS:WEBMAN.TEX.3, 3-208 (22031) +\vadjust{\eject} % page break inserted Dec 88 +and \\{char}, even though \\{buffer} and \\{char} +*************** + +**** FILE PS:WEBMAN.TEX.2, 1-413 (24876) +than one; it must not be a single letter. Furthermore, the identifier must +be making its first appearance in the \.{WEB} file; a macro must be defined +before it is used. + +Numeric macros are subject to the following restrictions:\quad +(1)~The right-hand side of the numeric definition must be made entirely from +integer constants, numeric macros, preprocessed strings (see below), and +**** FILE PS:WEBMAN.TEX.3, 4-18 (24959) +than one; it must not be a single letter. + +Numeric macros are subject to the following restrictions:\quad +(1)~The identifier must +be making its first appearance in the \.{WEB} file; +a numeric macro must be defined before it is used.\quad +(2)~The right-hand side of the numeric definition must be made entirely from +integer constants, numeric macros, preprocessed strings (see below), and +*************** + +**** FILE PS:WEBMAN.TEX.2, 1-425 (25582) +(2)~The numeric value must be less than $2^{15}=32768$ in absolute value. +(For larger values, you can use `\.{==}' in place of~`\.=', thus making use +**** FILE PS:WEBMAN.TEX.3, 4-31 (25670) +(3)~The numeric value must be less than $2^{15}=32768$ in absolute value. +(For larger values, you can use `\.{==}' in place of~`\.=', thus making use +*************** + + +######################################################################## + + +[ end of message 012 ] +------- diff --git a/info/digests/tex-implementors/message.13 b/info/digests/tex-implementors/message.13 new file mode 100644 index 0000000000..fc14f3077a --- /dev/null +++ b/info/digests/tex-implementors/message.13 @@ -0,0 +1,205 @@ +Received: from robin by clan.nott.ac.uk id aa02511; 3 Mar 89 9:53 PST +Received: from nss.cs.ucl.ac.uk by much.Cs.Nott.AC.UK id aa17670; + 3 Mar 89 17:50 GMT +Received: from vax02.ams.com by NSS.Cs.Ucl.AC.UK via Satnet with SMTP + id aa08564; 3 Mar 89 16:30 GMT +Date: Fri 3 Mar 89 10:58:54-EST +From: bbeeton +Subject: Announcement of TeX 2.96-2.98; other details +To: TeX-implementors@vax02.ams.com +Message-ID: <604943934.0.BNB@VAX02.AMS.COM> +Mail-System-Version: + +Date: 3 Mar 89 Message No: 013 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: Announcement of TeX 2.96-2.98; other details + + +Some of you are already aware that there exist versions of TeX beyond +2.95. Although I have had that information for some time, lack of time +and hardware problems have prevented me from obtaining all the details +and sending them out to you. This morning I received from Don Knuth a +report that another bug has been found and fixed, bring the version to +2.98. Since I am leaving tomorrow morning for a week of standards +meetings (where I will not have any computer access), and don't have +time before I leave to retrieve the details from Knuth's computer, I +will instead include Knuth's description of the reasons for the changes, +and promise to send the details as soon as possible after I return. + +In one of the last few messages, there was a reference in the ERRATA.TeX +extracts to an item, dated 12/23/88, that hadn't been sent to you. The +missing errata are listed below, incorporating the item of 1/4/89 that +cited the missing one. Needless to say, the additional bug fixes will +involve more errata; those will be sent along with the bug details. + + +######################################################################## + +Knuth's descriptions of the changes + +2.96: + + [ I can't find the message from Knuth notifying me of the + update, but this is the information line in TEX.WEB. ] + + % Version 2.96 corrects bug in "Infinite shrinkage" recovery (January 1989). + + +2.97: + + In TEX.WEB, there are one too many instances of: + @.End of file on the terminal@> + + ... when I created version 2.95 in December, I made a bunch of changes + to ERRATA.TEX etc but I left out the most important change to TEX.WEB + itself! Namely, consider the following excerpt from TEX82.BUG[tex,dek]: + +349. By popular request, undo #347 and fix the bug a more complex way. +@x module 71 [this undoes change #347] +if not input_ln(term_in,true) then t_open_in; +@y +if not input_ln(term_in,true) then fatal_error("End of file on the terminal!"); +@z +@x [and there's a lot more] + + Well, I forgot to install that. So the index was right, but not the + program... At SAIL, I'm unable to test EOF on the terminal. + + *** Folks, please excuse this dreadful oversight. The maintainers of TeX + must think I'm completely off my rocker. I have now fixed TEX.WEB at + SAIL, but not at SCORE or anywhere else. I've changed the version number + to 2.97 simply because there exist versions 2.95--2.96 in which this typo + is present. Version 2.97 is version 2.96 the way I thought 2.96 was. + (I also changed the version numbers in INITEX.CH and TRIP*.) + + +2.98 + + Frank Mittelbach and Rainer Schoepf of Gutenberg's city (Mainz) have + discovered the following bug: If you say simply + \aftergroup\relax\dump + to INITEX, you get a spurious error message (one that David Siegel + used to tell me was pretty funny). + + It was very easy to fix this bug, although I did have to change + TRIP.TEX as well as the other TRIP* files in order to make TRIP + verify its absence. + + Another $163.84; am I really going to be able to double the amount + of reward next year? + + +other questions: + +Wayne Sullivan sent the following inquiry about possible bugs in 2.95: + + I think I have found two 'bugs' in TeX 2.95, athough it would be more + apt to call them 'mites' rather than bugs, for they have no effect on + practically all existing installations of TeX. The first is that there + is to my knowledge no fixed limit on the actual size of font_area or + font_name for a given font. If either of these exceeded 255 bytes in + length, the an invalid DVI file could result. The second is that + get_strings_started calls make_string before the value of init_str_ptr + is set. In the event of overflow, init_str_ptr is used before it has + been defined. + +Knuth's reply: + + ... I looked at this and decided they were NOT bugs. + + 1) We could make TeX guarantee that font area and font name be at most + 255 bytes long, by putting the following code into module 560 just + after "g\gets null_font": + if (length(nom)>255) or (length(aire)>255) then + begin print_err("Font name too long"); + help1("I've substituted \nullfont for a weird font name."); + error; goto done; + end; + But, the DVI problem could arise only if TeX was able to read a valid + TFM file with an unreasonably long name and area. If we assume that the + operating system doesn't break, nobody would be able to use this font + anyway from a DVI file, so I claim such a TFM file will never exist in + a real system. + + 2) It's true that INITEX uses string_vacancies to abort with an + understandable error message if the implementor has set pool_size too low, + while INITEX can abort strangely if the implementor has set max_strings + too low. (The problem in that case is even worse than Mr Sullivan imagines: + The string "number of strings" may not even be present, nor would its + array index necessarily be valid.) But an implementor who is that stupid + doesn't deserve having his hand held.... + + I conclude that no changes to 2.95 are needed (yet). + + +######################################################################## + +Extracts from ERRATA.TeX (differences effective Dec 88) + +;COMPARISON OF PS:ERRATA.TEX.17 AND PS:ERRATA.NEW.2 +;OPTIONS ARE /3 + +**** FILE PS:ERRATA.TEX.17, 4-34 (21096) +\bugonpage C262, line 15 (11/6/88) + +\ninepoint\noindent +|string base_name, base_version; base_name="plain"; base_version="1.6";| +**** FILE PS:ERRATA.NEW.2, 4-34 (21096) +\bugonpage C262, line 15 (12/23/88) + +\ninepoint\noindent +|string base_name, base_version; base_name="plain"; base_version="1.7";| + +\bugonpage C271, line 12 (1/4/89) + +\ninepoint\noindent +the user and \MF's primitive picture commands. +First, some important program\cutpar + +\bugonpage C271, line 4 from the bottom (12/23/88) + +\ninepoint\noindent +|def |^|cutdraw|| expr p = % caution: you may need autorounding=0| + +\bugonpage C272, lines 5 and 6 (12/23/88) + +\ninepoint\noindent +| (cut_ scaled (1+max(pen_lft,pen_rt,pen_top,pen_bot))|\par\noindent +| rotated theta shifted z)t_;| + +\bugonpage C273, lines 20 and 22 (9/26/88) +*************** + +**** FILE PS:ERRATA.TEX.17, 4-45 (21435) +\bugonpage C331, just below the illustration (7/18/87) +**** FILE PS:ERRATA.NEW.2, 4-56 (21754) +\bugonpage C290, line 6 from the bottom (12/23/88) + +\ninepoint\noindent +(2)~A throwaway variable, +`\\{whatever}', nullifies an unwanted equation at the beginning\cutpar + +\bugonpage C331, just below the illustration (7/18/87) +*************** + +**** FILE PS:ERRATA.TEX.17, 4-57 (21758) +\bugonpage C350, left column (7/6/88) +**** FILE PS:ERRATA.NEW.2, 4-74 (22253) +\bugonpage C346, entry for {\tt autorounding} (12/23/88) + +\eightpoint\indent\hskip20pt +212, {\it262}, {\it264}, 271--272. + +\bugonpage C350, left column (7/6/88) +*************** + + +######################################################################## + + +[ end of message 013 ] +------- diff --git a/info/digests/tex-implementors/message.14 b/info/digests/tex-implementors/message.14 new file mode 100644 index 0000000000..9283d2975c --- /dev/null +++ b/info/digests/tex-implementors/message.14 @@ -0,0 +1,281 @@ +Received: from robin by clan.nott.ac.uk id aa00461; 27 Mar 89 3:56 PST +Received: from nss.cs.ucl.ac.uk by much.Cs.Nott.AC.UK id aa12159; + 25 Mar 89 3:39 GMT +Received: from math.ams.com by NSS.Cs.Ucl.AC.UK via Satnet with SMTP + id aa06298; 24 Mar 89 21:28 GMT +Date: Tue 21 Mar 89 08:39:08-EST +From: bbeeton +Subject: Details of TeX 2.96-2.98 changes; SYMBOL.MF +To: TeX-implementors@math.ams.com +Message-ID: <606490748.0.BNB@VAX02.AMS.COM> +Mail-System-Version: +Status: OR + +Date: 17 Mar 89 Message No: 014 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: Details of TeX 2.96-2.98 changes; SYMBOL.MF + + +Message #13 informed you that TeX bug fixes had brought the version +up to 2.98. The details of these changes are below, in a single +difference list between the WEB files for 2.95 [sic] and 2.98. +The relevant addenda to TeX82.BUG and ERRATA.TeX follow. + +The difference list was generated on a VAX under VMS, and the format +of the errata changes is also different from what I usually send. +I have been unable to establish a good enough connection to Score, +where the distribution versions of the files reside, to obtain full +copies of versions after 2.96, and have had to reconstruct the latest +version from partial difference lists. I have done this very carefully, +and believe the lists here to be true and complete, but will verify +that as soon as possible after contact with Score has been +re-established. I realize that some of the lines in the difference +list are longer than 80 characters; the conventions of the VMS file +comparison are different from those under TOPS-20. If any problems +occur in transmission, please let me know, and I will try to generate +a copy in the other format. + +I know that it is impossible to validate these changes in your +implementations without a current set of TRIP files. I will try to make +obtaining and sending them my highest priority after meeting a couple +of deadlines that the Math Society finds important. Thank you for +your patience. + +A small change has been made to the file SYMBOL.MF. It affects only the +labels on proof output; it should have no effect on .TFM or raster files. +Details are listed below. + + +######################################################################## + +Differences between TEX.WEB 2.95 and 2.98 + +************ +File SYSA:[TEX.NEW]TEX-295.WEB;1 + 33 + 34 % A reward of $81.92 will be paid to the first finder of any remaining bug. + 35 % (This amount will double again in 1989.) + 36 +****** +File SYSA:[TEX.NEW]TEX-298.WEB;2 + 33 % Version 2.96 corrects bug in "Infinite shrinkage" recovery (January 1989). + 34 % Version 2.97 corrects blunder in creating 2.95 (February 1989). + 35 % Version 2.98 omits save_for_after at outer level (March 1989). + 36 + 37 % A reward of $163.84 will be paid to the first finder of any remaining bug. + 38 % (This amount will double again in 1990.) + 39 +************ +************ +File SYSA:[TEX.NEW]TEX-295.WEB;1 + 173 @d banner=='This is TeX, Version 2.95' {printed when \TeX\ starts} + 174 +****** +File SYSA:[TEX.NEW]TEX-298.WEB;2 + 176 @d banner=='This is TeX, Version 2.98' {printed when \TeX\ starts} + 177 +************ +************ +File SYSA:[TEX.NEW]TEX-295.WEB;1 + 1641 if not input_ln(term_in,true) then t_open_in; + 1642 @.End of file on the terminal@> +****** +File SYSA:[TEX.NEW]TEX-298.WEB;2 + 1644 if not input_ln(term_in,true) then fatal_error("End of file on the terminal!"); + 1645 @.End of file on the terminal@> +************ +************ +File SYSA:[TEX.NEW]TEX-295.WEB;1 + 5871 begin check_full_save_stack; + 5872 save_type(save_ptr):=insert_token; save_level(save_ptr):=level_zero; + 5873 save_index(save_ptr):=t; incr(save_ptr); + 5874 end; +****** +File SYSA:[TEX.NEW]TEX-298.WEB;2 + 5874 begin if cur_level>level_one then + 5875 begin check_full_save_stack; + 5876 save_type(save_ptr):=insert_token; save_level(save_ptr):=level_zero; + 5877 save_index(save_ptr):=t; incr(save_ptr); + 5878 end; + 5879 end; +************ +************ +File SYSA:[TEX.NEW]TEX-295.WEB;1 +18294 glue_ptr(p):=r; +18295 end; +****** +File SYSA:[TEX.NEW]TEX-298.WEB;2 +18299 glue_ptr(p):=r; q:=r; +18300 end; +************ +************ +File SYSA:[TEX.NEW]TEX-295.WEB;1 +18775 q:=new_skip_param(top_skip_code); link(q):=p; {now |temp_ptr=glue_ptr(q)|} +18776 if width(temp_ptr)>height(p) then width(temp_ptr):=width(temp_ptr)-height(p) +****** +File SYSA:[TEX.NEW]TEX-298.WEB;2 +18780 q:=new_skip_param(top_skip_code); {now |temp_ptr=glue_ptr(q)|} +18781 if width(temp_ptr)>height(p) then width(temp_ptr):=width(temp_ptr)-height(p) +************ +************ +File SYSA:[TEX.NEW]TEX-295.WEB;1 +18810 glue_ptr(p):=r; +18811 end; +****** +File SYSA:[TEX.NEW]TEX-298.WEB;2 +18815 glue_ptr(p):=r; q:=r; +18816 end; +************ + +######################################################################## + +Additions to TEX82.BUG + +350. Forgotten update in error recovery (Breitenlohner, 20 Jan 89) +@x module 976 + glue_ptr(p):=r; +@y + glue_ptr(p):=r; q:=r; +@z +@x module 1004 + glue_ptr(p):=r; +@y + glue_ptr(p):=r; q:=r; +@z + +351. Avoid error \aftergroup\relax\dump (Mittelbach&Schoepf, 17 Feb 89) +@x module 280 +begin check_full_save_stack; +save_type(save_ptr):=insert_token; save_level(save_ptr):=level_zero; +save_index(save_ptr):=t; incr(save_ptr); +@y +begin if cur_level>level_one then + begin check_full_save_stack; + save_type(save_ptr):=insert_token; save_level(save_ptr):=level_zero; + save_index(save_ptr):=t; incr(save_ptr); + end; +@z + +352. (I sincerely hope that there won't be any more) + + +######################################################################## + +Extracts from ERRATA.TeX (additions and changes with context) + +********** new +\bugonpage A318, line 19 (3/3/89) + +\ninepoint +|\def\clearnotenumber{\notenumber=0\relax}| + +\bugonpage A326, line 12 (12/12/87) +*************** + +********** change +\bugonpage B2, line 32 (3/2/89) + +\ninepoint\noindent\hskip10pt +{\bf define} $\\{banner}\equiv\hbox{\tt\char'23}$% +{\tt This\]is\]TeX,\]Version\]2.98\char'23}\quad +$\{\,$printed when \TeX\ starts$\,\}$ +*************** + +********** new +\bugonpage B118, lines 2--4 (3/2/89) + +\ninepoint\noindent\hskip10pt +{\bf begin if\/} $\\{cur\_level}>\\{level\_one}$ {\bf then}\par +\noindent\hskip20pt{\bf begin} \\{check\_full\_save\_stack}; \ + $\\{save\_type}(\\{save\_ptr})\gets\\{insert\_token};\par +\noindent\hskip20pt$\\{save\_level}(\\{save\_ptr})\gets\\{level\_zero}$; \ + $\\{save\_index}(\\{save\_ptr})\gets t$; \ \\{incr}(\\{save\_ptr});\par +\noindent\hskip20pt{\bf end}; + +\bugonpage B141, line 19 (4/28/88) +*************** + +********** new +\bugonpage B406, line 9 from the bottom (1/23/89) + +\ninepoint\noindent\kern30pt +$\\{shrink\_order}(r)\gets\\{normal}$; \ $\\{delete\_glue\_ref}(q)$; \ +$\\{glue\_ptr}(p)\gets r$; \ $q\gets r$; + +\bugonpage B417, line 10 (1/23/89) + +\ninepoint\noindent\kern10pt +$q\gets\\{new\_skip\_param}(\\{top\_skip\_code)$; \quad +$\{\,$now $\\{temp\_ptr}=\\{glue\_ptr}(q)\,\}$ + +\bugonpage B418, line 14 (1/23/89) + +\ninepoint\noindent\kern30pt +$\\{shrink\_order}(r)\gets\\{normal}$; \ $\\{delete\_glue\_ref}(q)$; \ +$\\{glue\_ptr}(p)\gets r$; \ $q\gets r$; + +\bugonpage B507, line 13 (12/14/88) +*************** + +********** new +\bugonpage C248, line 21 becomes two lines (1/24/89) + +\ninepoint\noindent +which might not +be numerically stable in the presence of rounding errors.) +Another case, not really desirable, is $\\{left\_jut}=\\{right\_jut}=0$. + +\bugonpage C262, line 15 (12/23/88) +*************** + +********** new +\bugonpage E333, lines 9--11 (1/9/89) + +\ninepoint\noindent +$\\{lft}\,x_{1l}={\rm hround}(2.5u-.5\\{mfudged.stem})$; \ + $x_{1l}=x_{1'l}=x_{2l}=x_{2'l}$;\par\noindent +$\\{lft}\,x_{3l}={\rm hround}(.5w-.5\\{mfudged.stem})$; \ + $x_5-x_3=x_3-x_1$;\par +\line{{\bf if\/} not \\{monospace}: + $r:={\rm hround}(x_5+x_1)+r-w$; {\bf fi}\hfill + \% change width for better fit} + +\bugonpage E353, lines 38--39 (8/12/87) +*************** + +********** new +\bugonpage E515, line 21 (1/23/89) +\ninepoint\noindent +{\bf labels}$(5,6)$; \ \\{zero\_width}; \ {\bf endchar\/}; +\smallskip\noindent[Also put labels `{\tt5}' and `{\tt6}' on the +upper right figure, page E514.] + +\bugonpage E521, lines 4 and 14 (12/12/88) +*************** + + +######################################################################## + +Changes to SYMBOL.MF + +;COMPARISON OF PS:SYMBOL.MF.8 AND PS:SYMBOL.MF.9 +;OPTIONS ARE /E /3 + +**** FILE PS:SYMBOL.MF.8, 1-518 (22010) +labels(1,2); zero_width; endchar; +cmchar "Maps-to relation"; +**** FILE PS:SYMBOL.MF.9, 1-518 (22010) +labels(5,6); zero_width; endchar; +cmchar "Maps-to relation"; +*************** + + +######################################################################## + + +[ end of message 014 ] +------- diff --git a/info/digests/tex-implementors/message.15 b/info/digests/tex-implementors/message.15 new file mode 100644 index 0000000000..7e3aeaeac4 --- /dev/null +++ b/info/digests/tex-implementors/message.15 @@ -0,0 +1,414 @@ +(Message inbox:23) +Return-Path: +Date: Sun 9 Apr 89 14:56:06-EST +From: bbeeton +Subject: WEB 3.0; TeX change, same version; CM85.BUG +To: TeX-implementors@vax01.ams.com +Message-ID: <608154966.0.BNB@VAX01.AMS.COM> +Mail-System-Version: + +Date: 10 Apr 89 Message No: 015 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: WEB 3.0; TeX change, same version; CM85.BUG + + +Thanks to Edgar Fuss for the reminder that an ascii-code verification +list would be useful. I have "borrowed" the relevant material from the +GUTenberg trailer, and it will be attached to all messages from now on. + +I received the following message from Knuth on March 25. + + Peter Breitenlohner found a bug in TANGLE and WEAVE, and since their + version numbers were up to 2.9 I decided to go to version 3 + (also in honor of Wayne Sewell's book on WEB, which will include + the source listings). + + The bug is in input_ln, and it happens only if a line of input + is too long (more than 100 characters); so it's not serious, but + it might as well be fixed. The fix requires the new line + if final_limit>limit then final_limit:=limit; + to be added to input_ln just after the line that says "decr(limit)"; + ... (Also the version number gets changed, and a line explaining + version 3 gets added near the beginning.) ... + + Breitenlohner also found a very minor glitch in TeX that I'll fix ... + (without changing the version number). + + I just noticed that input_ln is changed in our change files for TANGLE + and WEAVE, so the bugfix may require change files to be updated... + +The glitch has been fixed as of April 8; here is Knuth's commentary: + + the "glitch" is such that it is transparent to all users except + in certain cases that "can't happen". If the latter cases can in fact + happen, the users still will see nothing unless they are using + a non-production version of TeX in which bounds checking is done, + because the relevant TeX code will be something like this: + if (x=0) or (mem[x]=0) then causefatalerror + where x=0 and mem is an array such that mem[0] doesn't exist. + (On almost all implementations mem[0] does exist.) + I will be changing that code to something like this: + if x=0 then causefatalerror; + if mem[x]=0 then causefatalerror. + In other words, the change will be simply cosmetic, not necessitating + a new version number. + +I have pointed out to Knuth that, even though the glitch is minor, serious +confusion can result when version numbers are not changed (viz. LaTeX). +However, his decision is final. In the future, I will refer to this change +as version 2.98a to try to avoid confusion. + +I have updated the cumulative difference list beginning with TeX 2.7 +(Nov 87) to include all changes through 2.98a; it previously stopped with +version 2.95. I will be happy to send a copy to anyone requesting it. + +Updates to the errata list to incorporate the change are given below. +Also included are some corrections to errors that appeared only in the +July 1987 printing of Volume D; check the publication date of your copy +carefully before making any changes. One additional error has been +posted to the previous errata file (ERRATA.THR); it fixes the section +number reference in a change on page D68: + + \bugonpage D86, second line of section 198 (2/27/87) + +(The reference had previously been given as section 128.) + +A "small bug" has been fixed in MFT.WEB; differences are given below. + +Message #14 contained a change to SYMBOL.MF, but it turns out that this +was not the only font change since the beginning of the year; a previous +change to the letter m in ROMANL was expanded. The last few additions +to CM85.BUG are given below in their entirety. (I have suggested to +Knuth that he date the updates to this file, but since nothing has been +dated so far, I doubt he will wish to start now.) + +Finally, Knuth reports that "A new version of GFtoDVI should finally +be ready in a week or so." He also mentions that he is planning to +"wean himself away" from TeXhax by the end of this year, so that he can +devote himself entirely to The Art of Computer Programming. + + Tentatively I plan to make up a form letter that gives addresses + of people to write to for help; Phyllis will send that letter out to + whoever writes me concerning TeX, and I won't see any of the letters. + I will designate a few people ... who will screen all purported bugs + and report them directly to me, so that I can spend an hour or two + max each month on residual maintenance. By next year it looks like + everything will be stable enough to cast in concrete (I mean silicon?). + +I hope that his prediction is correct. I will try to make my next message +concentrate on TRIP and TRAP; however that will have to wait until I return +from an ISO WG8 meeting which will take me out of town from April 14-23. +Thanks for your patience. + + +######################################################################## + +Changes to TEX.WEB (comparison with ver + +**** FILE PS:TEX.WEB.14, 1-15177 (656587) +begin q:=link(cur_align); +if (cur_align=null)or(q=null) then confusion("endv"); +@:this can't happen endv}{\quad endv@> +**** FILE PS:TEX.WEB.1, 1-15177 (656587) +begin if cur_align=null then confusion("endv"); +q:=link(cur_align);@+if q=null then confusion("endv"); +@:this can't happen endv}{\quad endv@> +*************** + + +######################################################################## + +Additions to TEX82.BUG + +352. Cosmetic change to validate comment in 115 (Breitenlohner, 20 Mar 89) +@x +begin q:=link(cur_align); +if (cur_align=null)or(q=null) then confusion("endv"); +@y +begin if cur_align=null then confusion("endv"); +q:=link(cur_align);@+if q=null then confusion("endv"); +@z + +353. (I sincerely hope that there won't be any more) + + +######################################################################## + +Extracts from ERRATA.TeX (differences as compared with previous version) + +;COMPARISON OF PS:ERRATA.TEX.23 AND PS:ERRATA.NEW.3 +;OPTIONS ARE /E /3 + +**** FILE PS:ERRATA.TEX.23, 3-342 (17239) +\bugonpage B338, second-last line (8/19/87) +**** FILE PS:ERRATA.NEW.3, 3-342 (17239) +\bugonpage B332, lines 11 and 12 from the bottom (4/8/89) + +\ninepoint +\noindent\hskip10pt +{\bf begin if\/} $\\{cur\_align}=\\{null}$ {\bf then} + \\{confusion}({\tt\char'23endv\char'23});\par\noindent\hskip10pt +$q\gets\\{link}(\\{cur\_align})$; \ {\bf if\/} $q=\\{null} {\bf then} + \\{confusion}({\tt\char'23endv\char'23}); + +\bugonpage B338, second-last line (8/19/87) +*************** + +**** FILE PS:ERRATA.TEX.23, 5-36 (26064) +\bugonpage D347, new line of code after line 5 (12/14/88) +**** FILE PS:ERRATA.NEW.3, 5-36 (26397) +\bugonpage D67, in the July 1987 printing (4/7/89) + +\ninepoint\noindent +[Delete line 7, which has a redundant `{\bf if\/} $r=p$ {\bf then}'; +move line 8 to the left 10 points for alignment; and restore the following +line (which was deleted by mistake after l\noindent\hskip10pt +$\\{node\_size}(p)\gets q-p$\quad$\{\,$reset the size in case it grew$\,\}$ + +\noindent +These corrections are needed only in the reprinting made July, 1987.] + +\bugonpage D228, in the July 1987 printing (4/7/89) + +\ninepoint\noindent +[Delete lines 14--15, which were inserted erroneously from a previous errata +list; and restore the following lines (which were deleted by mistake): + +\noindent\hskip20pt +{\bf begin} \\{double}(\\{max\_coef}); \ +\\{double}(\\{x0}); \ +\\{double}(\\{x1}); \ +\\{double}(\\{x2});\par\noindent\hskip20pt +\\{double}(\\{y0}); \ +\\{double}(\\{y1}); \ +\\{double}(\\{y2});\par\noindent\hskip20pt +{\bf end} + +\noindent +These corrections are needed only in the reprinting made July, 1987.] + +\bugonpage D248, in the July 1987 printing (4/7/89) + +\ninepoint\noindent +[Delete line 16, which begins with `$d\gets\\{take\_fraction}'; +and restore the following line (which was deleted by mistake after line 22): + +\noindent\hskip10pt +{\bf if\/} $d<\\{alpha}$ {\bf then} $d\gets\\{alpha}$ + +\noindent +These corrections are needed only in the reprinting made July, 1987.] + +\bugonpage D347, new line of code after line 5 (12/14/88) +*************** + +**** FILE PS:ERRATA.TEX.23, 5-96 (28009) +\bugonpage D511, line 11 (12/14/88) +**** FILE PS:ERRATA.NEW.3, 5-140 (29751) +\bugonpage D510, in the July 1987 printing (4/7/89) + +\ninepoint\noindent +[Move the 7th-to-last line, which begins with `\\{internal}[\\{fontmaking}]', +one line down, and indent it to the right by 10 more points. + +This correction is needed only in the reprinting made July, 1987.] + +\bugonpage D511, line 11 (12/14/88) +*************** + + +######################################################################## + +Differences between TANGLE.WEB 2.9 and 3.0 + +;COMPARISON OF PS:TANGLE.WEB.5 AND PS:TANGLE.WEB.2 +;OPTIONS ARE /E /3 + +**** FILE PS:TANGLE.WEB.5, 1-16 (971) +% Here is TeX material that gets inserted after \input webmac +**** FILE PS:TANGLE.WEB.2, 1-15 (969) +% Version 3, for Sewell's book, fixed a long-line bug in input_ln (March, 1989). +% Here is TeX material that gets inserted after \input webmac +*************** + +**** FILE PS:TANGLE.WEB.5, 1-33 (1672) + \centerline{(Version 2.9)} + \vfill} +**** FILE PS:TANGLE.WEB.2, 1-34 (1754) + \centerline{(Version 3)} + \vfill} +*************** + +**** FILE PS:TANGLE.WEB.5, 2-26 (2936) +@d banner=='This is TANGLE, Version 2.9' + +@ The program begins with a fairly normal header, made up of pieces that +**** FILE PS:TANGLE.WEB.2, 2-26 (3016) +@d banner=='This is TANGLE, Version 3' + +@ The program begins with a fairly normal header, made up of pieces that +*************** + +**** FILE PS:TANGLE.WEB.5, 4-104 (24505) + print_nl('! Input line too long'); loc:=0; error; +**** FILE PS:TANGLE.WEB.2, 4-104 (24583) + if final_limit>limit then final_limit:=limit; + print_nl('! Input line too long'); loc:=0; error; +*************** + + +######################################################################## + +Differences between WEAVE.WEB 2.9 and 3.0 + +;COMPARISON OF PS:WEAVE.WEB.6 AND PS:WEAVE.WEB.7 +;OPTIONS ARE /E /3 + +**** FILE PS:WEAVE.WEB.6, 1-23 (1403) +% Here is TeX material that gets inserted after \input webmac +**** FILE PS:WEAVE.WEB.7, 1-22 (1401) +% Version 3, for Sewell's book, fixed a long-line bug in input_ln (March, 1989). +% Here is TeX material that gets inserted after \input webmac +*************** + +**** FILE PS:WEAVE.WEB.6, 1-42 (2192) + \centerline{(Version 2.9)} + \vfill} +**** FILE PS:WEAVE.WEB.7, 1-43 (2274) + \centerline{(Version 3)} + \vfill} +*************** + +**** FILE PS:WEAVE.WEB.6, 1-69 (3298) +@d banner=='This is WEAVE, Version 2.9' + +@ The program begins with a fairly normal header, made up of pieces that +**** FILE PS:WEAVE.WEB.7, 1-70 (3378) +@d banner=='This is WEAVE, Version 3' + +@ The program begins with a fairly normal header, made up of pieces that +*************** + +**** FILE PS:WEAVE.WEB.6, 1-590 (24677) + print_nl('! Input line too long'); loc:=0; error; +**** FILE PS:WEAVE.WEB.7, 1-591 (24755) + if final_limit>limit then final_limit:=limit; + print_nl('! Input line too long'); loc:=0; error; +*************** + + +######################################################################## + +CM85.BUG -- the last 40 lines (as of 23 Jan 89) + +@x in ROMANL, the letter m +lft x1l=hround(2.5u-.5stem); x1l=x1'l=x2l=x2'l; +lft x3l=hround(.5w-.5stem); x5-x3=x3-x1; +if not monospace: r:=hround(x5+x1)-l; fi % change width for better fit +@y +lft x1l=hround(2.5u-.5stem); x1l=x1'l=x2l=x2'l; % stem, sic +lft x3l=hround(.5w-.5mfudged.stem); x5-x3=x3-x1; +if not monospace: r:=hround(x5+x1)+r-w; fi % change width for better fit +@z + +@x a new routine for CMBASE, following change_width +@y +def center_on(expr x) = if not monospace: % change width for symmetric fit + r:=r+2x-w; w:=2x; fi enddef; +@z +@x in SYMBOL, the elementary division operator +x3-.5dot_size=hround(.5w-.5dot_size); w:=r:=2x3; +@y +x3-.5dot_size=hround(.5w-.5dot_size); center_on(x3); +@z +Similarly, whenever the construction "w:=r:=2x*" appears, change it to +"center_on(x*)". This happens in the programs for elementary division operator +(as noted above), large triangle, large inverted triangle, lattice top, +lattice bottom, dagger mark, double dagger mark, club/diamond/heart/spade suit +(all in SYMBOL), plus the diamond operator and universal quantifier in SYM. +The following additional change needs to be made in the programs +for lattice top and lattice bottom: +@x +x1=x2=good.x .5w; center_on(x1); lft x3=hround u; x4=r-x3; +@y +x1=x2=good.x .5w; center_on(x1); lft x3=hround u; x4=w-x3; +@z + +@x in SYMBOL, at end of zero-width slash +labels(1,2); zero_width; endchar; +@y +labels(5,6); zero_width; endchar; +@z + +(I sincerely hope there won't be any more!) + + +######################################################################## + +Updates to MFT.WEB (differences as compared with previous version) + +;COMPARISON OF PS:MFT.WEB.2 AND PS:MFT.WEB.4 +;OPTIONS ARE /3 + +**** FILE PS:MFT.WEB.2, 1-7 (349) + +% Here is TeX material that gets inserted after \input webmac +**** FILE PS:MFT.WEB.4, 1-6 (347) +% Version 0.4 fixed minor bug regarding empty comments (April 8, 1989). + +% Here is TeX material that gets inserted after \input webmac +*************** + +**** FILE PS:MFT.WEB.2, 1-29 (1204) + \centerline{(Version 0.3, August 1985)} + \vfill} +**** FILE PS:MFT.WEB.4, 1-30 (1277) + \centerline{(Version 0.4, April 1989)} + \vfill} +*************** + +**** FILE PS:MFT.WEB.2, 1-116 (5413) +@d banner=='This is MFT, Version 0.3' + +@ The program begins with a fairly normal header, made up of pieces that +**** FILE PS:MFT.WEB.4, 1-116 (5483) +@d banner=='This is MFT, Version 0.4' + +@ The program begins with a fairly normal header, made up of pieces that +*************** + +**** FILE PS:MFT.WEB.2, 1-1837 (71552) +repeat incr(loc); +until (loc=limit)or(buffer[loc]="|"); +copy(id_first); +**** FILE PS:MFT.WEB.4, 1-1828 (71604) +while (loc"|") do incr(loc); +copy(id_first); +*************** + + +######################################################################## + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Character code reference +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Upper case letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ +% Lower case letters: abcdefghijklmnopqrstuvwxyz +% Digits: 0123456789 +% Square, curly, angle braces, parentheses: [] {} <> () +% Backslash, slash, vertical bar: \ / | +% Punctuation: . ? ! , : ; +% Underscore, hyphen, equals sign: _ - = +% Quotes--right left double: ' ` " +%"at", "number" "dollar", "percent", "and": @ # $ % & +% "hat", "star", "plus", "tilde": ^ * + ~ +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +[ end of message 015 ] +------- diff --git a/info/digests/tex-implementors/message.16 b/info/digests/tex-implementors/message.16 new file mode 100644 index 0000000000..6124895bb8 --- /dev/null +++ b/info/digests/tex-implementors/message.16 @@ -0,0 +1,574 @@ +(Message inbox:34) +Date: Tue 11 Apr 89 21:54:58-EST +From: bbeeton +Subject: WEAVE 3.1; TRIP.TEX +To: TeX-implementors@vax01.ams.com +Message-ID: <608352898.0.BNB@VAX01.AMS.COM> +Mail-System-Version: + +Date: 11 Apr 89 Message No: 016 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: WEAVE 3.1; TRIP.TEX + + +Another bug has been found in WEAVE.WEB. The differences are listed below. +This is Knuth's announcement: + + Here's a new change to WEAVE. I guess it has to be version 3.1, because + some other people already have 3.0. The bug in 3.0 occurs iff there's a + change and the program consists of exactly one module. But the new code is + not only correct, it's much simpler. (This was found and fixed by Peter + Breitenlohner in Germany.) + + +The entire current TRIP.TEX file is included in this message. Because +some lines begin with a period, which causes peculiar things to happen +going through some gateways, I have inserted one X at the beginning of +every line. These X's should be removed before using the file, and the +character code list at the end of the message should be checked very +carefully to make sure that nothing was corrupted. (If the file didn't +make it through intact, send me a message that says what characters were +changed and I will try to come up with a more reliable technique. I do +not yet have a working coder/decoder.) The file contains exactly 448 +lines; a few are longer than 80 characters, and if your gateway truncated +or broke lines, let me know that too. The dates on the files at Stanford +are as follows: + Sail [TEX,SYS] TRIP TEX 4.4 25-May-88 1630 + Score TRIP.TEX 9 22013(7) 4-Jun-88 11:49:29 + + +I will be out of town from April 14-23. If you send a message about a +problem, it may take a while for me to answer it, though I'll try to +acknowledge all such messages as quickly as I can. After I return, if +I find that sending the TRIP.TEX file was successful, I'll try the same +technique with TRIP.LOG. + + +######################################################################## + +Differences between WEAVE.WEB 3.0 and 3.1 + +;COMPARISON OF PS:WEAVE.WEB.7 AND PS:WEAVE.WEB.2 +;OPTIONS ARE /E /3 + +**** FILE PS:WEAVE.WEB.7, 1-24 (1485) +% Here is TeX material that gets inserted after \input webmac +**** FILE PS:WEAVE.WEB.2, 1-23 (1483) +% Version 3.1 fixed a bug for programs with only one module (April, 1989). +% Here is TeX material that gets inserted after \input webmac +*************** + +**** FILE PS:WEAVE.WEB.7, 1-43 (2274) + \centerline{(Version 3)} + \vfill} +**** FILE PS:WEAVE.WEB.2, 1-44 (2350) + \centerline{(Version 3.1)} + \vfill} +*************** + +**** FILE PS:WEAVE.WEB.7, 1-70 (3378) +@d banner=='This is WEAVE, Version 3' +@ The program begins with a fairly normal header, made up of pieces that +**** FILE PS:WEAVE.WEB.2, 1-71 (3456) +@d banner=='This is WEAVE, Version 3.1' +@ The program begins with a fairly normal header, made up of pieces that +*************** + +**** FILE PS:WEAVE.WEB.7, 1-4507 (176859) +while not changed_module[k_module] do incr(k_module); +out4("\")("c")("h")(" "); +out_mod(k_module); +repeat repeat incr(k_module)@+ until changed_module[k_module]; + out2(",")(" "); out_mod(k_module); +until k_module=module_count; +out("."); +**** FILE PS:WEAVE.WEB.2, 1-4508 (176939) +out4("\")("c")("h")(" "); +while k_module () +% Backslash, slash, vertical bar: \ / | +% Punctuation: . ? ! , : ; +% Underscore, hyphen, equals sign: _ - = +% Quotes--right left double: ' ` " +%"at", "number" "dollar", "percent", "and": @ # $ % & +% "hat", "star", "plus", "tilde": ^ * + ~ +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +[ end of message 016 ] +------- diff --git a/info/digests/tex-implementors/message.17 b/info/digests/tex-implementors/message.17 new file mode 100644 index 0000000000..f27dbd410b --- /dev/null +++ b/info/digests/tex-implementors/message.17 @@ -0,0 +1,490 @@ +Date: 29 Jun 89 Message No: 017 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: TeX 2.991, cosmetic change to MF.WEB, METAFONTware + + +There has been a fair bit of activity since my last message, which I am +only now able to report. So this message will contain an overview of +changes and details of the most important, and I hope to complete the +details in a second message within a few days. + +Two more bugs have been uncovered (both by Frank Mittelbach) and fixed. +TeX is now at version 2.991. Here is Knuth's explanation of 2.99: + + What was the error in versions \le2.98? You could write + $$\begingroup\halign{#\cr}$$ + and get the message "This can't happen (display)." + [The new version inserts \endgroup for you.] + +There was no neat explanation of the changes for 2.991, but Knuth did +provide the following information: + + And it means TeX version 2.999. (Assuming that this one holds up + until the TUG meeting, I'll renumber it version 3.0 at that time. + If another bug occurs, I'll go to 2.9991 and wait until nine + more are found!) + + The files that have changed (and presumably need UNDEKing) are + TEX.WEB, various .CH (version number only), + TRIP.TEX, TRIPIN.LOG, TRIP.LOG, TRIP.FOT, TRIP.TYP, + ERRATA.TEX[tex,dek], TEX82.BUG[tex,dek], + and also MF.WEB[mf,sys], TRAP.LOG[tex,sys] for a cosmetic change to MF. + +(Note that 2.999 was changed to 2.991, so we won't have to add another +digit quite so soon if another bug is found before the TUG meeting.) +The installation of all these files on Score is not yet complete (the net +connection between the AMS and Score has been broken more than it has +been available for the past month, and some of the installation is simply +not possible using Kermit); I will have an update with the next message. + +As he has done several times before, Knuth closed the errata file with the +content as reported in the list dated 20 February 1989 and distributed +with TUGboat 10 #1, and started a new one. The previous collection has +the file name ERRATA.FOU, and the current one is ERRATA.TeX. Since this +is still quite small, I am including the entire file. + +Knuth has completed his long-promised review of the METAFONTware software, +and the definitive sources of GFTYPE.WEB, GFTOPK.WEB, GFTODV.WEB and +MFT.WEB have been published in a Stanford CS report. There is also a +change to PLAIN.MFT. I don't have the report number or price, but will +get it for the next message. I will also save the details of the changes +for the next message. + +Finally, you may have received the information already, but if you haven't, +Score will be unplugged on August 31. Members of the TUG board and others +are trying to find a new home for the "canonical" TeX system. There are +several candidates, and perhaps it will be possible to keep more than one +site current for public access. More news when available. + + +######################################################################## + +Additions to TeX82.BUG + +353. $$\begingroup\halign{#\cr}$$ caused confusion (Mittelbach, 7 Jun 89) +@x module 1130 +mmode+halign: if privileged then init_align; +@y +mmode+halign: if privileged then + if cur_group=math_shift_group then init_align + else off_save; +@z + +354. Conflict in global array dig with .5\ifdim.6 (Mittelbach, 20 Jun 89) +@x module 450 +@!k:small_number; {number of digits in a decimal fraction} +@y +@!k,@!kk:small_number; {number of digits in a decimal fraction} +@!p,@!q:pointer; {top of decimal digit stack} +@z +@x module 452 +begin k:=0; get_token; {|point_token| is being re-scanned} +loop@+ begin get_x_token; + if (cur_tok>zero_token+9)or(cur_tok=17| cannot affect the result} + begin dig[k]:=cur_tok-zero_token; incr(k); + end; + end; +done1: f:=round_decimals(k); +@y +begin k:=0; p:=null; get_token; {|point_token| is being re-scanned} +loop@+ begin get_x_token; + if (cur_tok>zero_token+9)or(cur_tok=17| cannot affect the result} + begin q:=get_avail; link(q):=p; info(q):=cur_tok-zero_token; + p:=q; incr(k); + end; + end; +done1: for kk:=k downto 1 do + begin dig[kk-1]:=info(p); q:=p; p:=link(p); free_avail(q); + end; +f:=round_decimals(k); +@z + +355. (I sincerely hope that there won't be any more) + + +######################################################################## + +Differences between TeX 2.98a and 2.991 + +;COMPARISON OF TX:TEX.WEB.15 AND TX:TEX.WEB.1 +;OPTIONS ARE /E /3 + +**** FILE TX:TEX.WEB.15, 1-37 (2458) +% A reward of $163.84 will be paid to the first finder of any remaining bug. +**** FILE TX:TEX.WEB.1, 1-36 (2456) +% Version 2.99 catches $$\begingroup\halign...$$ (June 1989). +% Version 2.991 catches .5\ifdim.6... (June 1989). + +% A reward of $163.84 will be paid to the first finder of any remaining bug. +*************** + +**** FILE TX:TEX.WEB.15, 1-176 (9644) +@d banner=='This is TeX, Version 2.98' {printed when \TeX\ starts} + +@ Different \PASCAL s have slightly different conventions, and the present +**** FILE TX:TEX.WEB.1, 1-178 (9759) +@d banner=='This is TeX, Version 2.991' {printed when \TeX\ starts} + +@ Different \PASCAL s have slightly different conventions, and the present +*************** + +**** FILE TX:TEX.WEB.15, 1-8674 (379174) +@!k:small_number; {number of digits in a decimal fraction} +@!v:scaled; {an internal dimension} +**** FILE TX:TEX.WEB.1, 1-8676 (379290) +@!k,@!kk:small_number; {number of digits in a decimal fraction} +@!p,@!q:pointer; {top of decimal digit stack} +@!v:scaled; {an internal dimension} +*************** + +**** FILE TX:TEX.WEB.15, 1-8694 (379933) +begin k:=0; get_token; {|point_token| is being re-scanned} +loop@+ begin get_x_token; +**** FILE TX:TEX.WEB.1, 1-8697 (380101) +begin k:=0; p:=null; get_token; {|point_token| is being re-scanned} +loop@+ begin get_x_token; +*************** + +**** FILE TX:TEX.WEB.15, 1-8698 (380151) + begin dig[k]:=cur_tok-zero_token; incr(k); + end; + end; +done1: f:=round_decimals(k); +if cur_cmd<>spacer then back_input; +**** FILE TX:TEX.WEB.1, 1-8701 (380328) + begin q:=get_avail; link(q):=p; info(q):=cur_tok-zero_token; + p:=q; incr(k); + end; + end; +done1: for kk:=k downto 1 do + begin dig[kk-1]:=info(p); q:=p; p:=link(p); free_avail(q); + end; +f:=round_decimals(k); +if cur_cmd<>spacer then back_input; +*************** + +**** FILE TX:TEX.WEB.15, 1-12335 (535118) +else if (term_offset>0)or(file_offset>0) then print_char(" "); +print_char("["); j:=9; +**** FILE TX:TEX.WEB.1, 1-12342 (535426) +else if (term_offset>0)or(file_offset>0) +then print_char(" "); +print_char("["); j:=9; +*************** + +**** FILE TX:TEX.WEB.15, 1-20761 (890803) +mmode+halign: if privileged then init_align; +vmode+endv,hmode+endv: do_endv; +**** FILE TX:TEX.WEB.1, 1-20769 (891112) +mmode+halign: if privileged then + if cur_group=math_shift_group then init_align + else off_save; +vmode+endv,hmode+endv: do_endv; +*************** + + +######################################################################## + +MF.WEB changes + + +;COMPARISON OF PS:MF.WEB.7 AND PS:MF.WEB.2 +;OPTIONS ARE /E /3 + +**** FILE PS:MF.WEB.7, 1-21 (1236) +% A reward of $20.48 will be paid to the first finder of any remaining bug. +% (This amount will double again in 1989.) +% Although considerable effort has been expended to make the METAFONT program +**** FILE PS:MF.WEB.2, 1-21 (1236) +% A reward of $40.96 will be paid to the first finder of any remaining bug. +% (This amount will double again in 1990.) +% Although considerable effort has been expended to make the METAFONT program +*************** + +**** FILE PS:MF.WEB.7, 1-17420 (721418) + help1("The expression above should have been a number > 3/4."); + put_get_flush_error(unity); +**** FILE PS:MF.WEB.2, 1-17420 (721418) + help1("The expression above should have been a number >=3/4."); + put_get_flush_error(unity); +*************** + + +######################################################################## + +ERRATA.TeX (complete file, as of 25 June 1989) + +% Bugs (sigh) in Computers \& Typesetting + +\input manmac +\font\sltt=cmsltt10 +\font\niness=cmss9 +\font\ninessi=cmssi9 +\proofmodefalse +\raggedbottom +\output{\hsize=29pc \onepageout{\unvbox255\kern-\dimen@ \vfil}} + +\def\today{\number\day\ + \ifcase\month\or + Jan\or Feb\or Mar\or Apr\or May\or Jun\or + Jul\or Aug\or Sep\or Oct\or Nov\or Dec\fi + \ \number\year} + +\def\cutpar{{\parfillskip=0pt\par}} + +\def\rhead{Bugs in {\tensl Computers \& Typesetting as of \today}} +\def\bugonpage#1(#2) \par{\bigbreak\tenpoint + \hrule width\hsize + \line{\lower3.5pt\vbox to13pt{}Page #1\hfil(#2)}\hrule width\hsize + \nobreak\medskip} +\def\buginvol#1(#2) \par{\bigbreak\penalty-1000\tenpoint + \hrule width\hsize + \line{\lower3.5pt\vbox to13pt{}Volume #1\hfil(#2)}\hrule width\hsize + \nobreak\medskip} +\def\slMF{{\manual 89:;}\-{\manual <=>:}} % slant the logo +\def\0{\raise.7ex\hbox{$\scriptstyle\#$}} +\newcount\nn +\newdimen\nsize \newdimen\msize \newdimen\ninept \ninept=9pt +\newbox\eqbox \setbox\eqbox=\hbox{\kern2pt\eightrm=\kern2pt} + +\noindent This is a list of all corrections made to {\sl Computers \& +Typesetting}, Volumes A--E\null, since 20 February 1989. Corrections made to +the softcover version of {\sl The \TeX book} are the same as corrections to +Volume~A\null. Corrections to the softcover version of {\sl The +\slMF\kern1ptbook\/} are the same as corrections to Volume~C\null. +Some of these corrections have already been made in reprintings +of the books. Some of these corrections affect the indexes and +mini-indexes of Volumes B~and~D in ways not shown here. + +% volume A + +\bugonpage A116, lines 11--15 (6/7/89) + +\danger If you have two or more |\topinsert| or |\pageinsert| commands in +quick succession, \TeX\ may need to carry them over to several subsequent +pages; but they will retain their relative order when they are +carried over. For example, suppose you have pages that are nine inches +tall, and suppose you have already specified 4~inches of text for some +page, say page~25. Then suppose you make seven topinserts in a row, of% +{\parfillskip=0pt\endgraf}\endgroup + +\bugonpage A318, line 19 (3/3/89) + +\ninepoint +|\def\clearnotenumber{\notenumber=0\relax}| + +\bugonpage A385, line 8 (5/14/89) + +\ninepoint +|\def\beginbox{\setbox0=\hbox\bgroup}| + +\bugonpage A464, line 10 (5/15/89) + +\eightpoint\noindent +displays, 87, 103, {\it139--145}, {\it166--167}, + +% volume B +\hsize=35pc +\def\\#1{\hbox{\it#1\/\kern.05em}} % italic type for identifiers +\def\to{\mathrel{.\,.}} % double dot, used only in math mode + +\bugonpage Bvii, top two lines (4/21/89) + +{\hsize=29pc +\tenpoint\noindent +{\it {\sltt WEB} documentation for four utility programs that are +often used in conjunction with \TeX: {\sltt POOLtype}, {\sltt TFtoPL}, +{\sltt PLtoTF}, and {\sltt DVItype}.} +\par} + +\bugonpage B2, line 32 (6/20/89) + +\ninepoint\noindent\hskip10pt +{\bf define} $\\{banner}\equiv\hbox{\tt\char'23}$% +{\tt This\]is\]TeX,\]Version\]2.991\char'23}\quad +$\{\,$printed when \TeX\ starts$\,\}$ + +\bugonpage B118, lines 2--4 (3/2/89) + +\ninepoint\noindent\hskip10pt +{\bf begin if\/} $\\{cur\_level}>\\{level\_one}$ {\bf then}\par +\noindent\hskip20pt{\bf begin} \\{check\_full\_save\_stack}; \ + $\\{save\_type}(\\{save\_ptr})\gets\\{insert\_token}$;\par +\noindent\hskip20pt$\\{save\_level}(\\{save\_ptr})\gets\\{level\_zero}$; \ + $\\{save\_index}(\\{save\_ptr})\gets t$; \ \\{incr}(\\{save\_ptr});\par +\noindent\hskip20pt{\bf end}; + +\bugonpage B182, line 13 becomes two lines (6/20/89) + +\ninepoint\noindent +$k,\\{kk}$: \\{small\_number};\quad + $\{\,$number of digits in a decimal fraction$\,\}$\par\noindent +$p,q$: \\{pointer};\quad + $\{\,$top of decimal digit stack$\,\}$ + +\bugonpage B182, line 15 from the bottom (6/20/89) + +\ninepoint\noindent\hskip10pt +{\bf begin} $k\gets0$; $p\gets\\{null}$; \\{get\_token};\quad + $\{\,$\\{point\_token} is being re-scanned$\,\}$ + +\bugonpage B182, line 11 from the bottom (6/20/89) + +\ninepoint\noindent\hskip30pt +{\bf begin} $q\gets\\{get\_avail}$; $\\{link}(q)\gets p$; + $\\{info}(q)\gets\\{cur\_tok}-\\{zero\_token}$; + $p\gets q$; $\\{incr}(k)$; + +\bugonpage B182, line 8 from the bottom (6/20/89) + +\ninepoint\noindent +\\{done1}: {\bf for} $\\{kk}\gets k$ {\bf downto} 1 {\bf do}\par +\noindent\hskip20pt +{\bf begin} $\\{dig}[kk-1]\gets\\{info}(p)$; $q\gets p$; $p\gets\\{link}(p)$; + $\\{free\_avail}(q)$;\par +\noindent\hskip20pt{\bf end};\par +\noindent\hskip10pt$f\gets\\{round\_decimals}(k)$; + +\bugonpage B332, lines 11 and 12 from the bottom (4/8/89) + +\ninepoint +\noindent\hskip10pt +{\bf begin if\/} $\\{cur\_align}=\\{null}$ {\bf then} + \\{confusion}({\tt\char'23endv\char'23});\par\noindent\hskip10pt +$q\gets\\{link}(\\{cur\_align})$; \ {\bf if\/} $q=\\{null}$ {\bf then} + \\{confusion}({\tt\char'23endv\char'23}); + +\bugonpage B466, line 5 becomes three lines (6/7/89) + +\ninepoint +\noindent +$\\{mmode}+\\{halign}$: {\bf if\/} \\{privileged} {\bf then}\par\noindent +\hskip20pt{\bf if\/} $\\{cur\_group}=\\{math\_shift\_group}$ + {\bf then} \\{init\_align}\par\noindent\hskip20pt +{\bf else} \\{off\_save}; + +% volume C +\hsize=29pc +\def\\#1{\hbox{\it#1\/\kern.05em}} % italic type for identifiers + +\bugonpage C259, lines 16 and 17 from the bottom (5/14/89) + +\tenpoint +\noindent +|screenchars|; \ |screenstrokes|; \ |imagerules|; \ |gfcorners|; \ +|nodisplays|;\hfil\break +|notransforms|; \ |input| \. + +% Volume D +\hsize=35pc +\def\\#1{\hbox{\it#1\/\kern.05em}} % italic type for identifiers +\def\to{\mathrel{.\,.}} % double dot, used only in math mode + +\bugonpage Dvi, bottom two lines, and top lines of page vii (4/21/89) + +{\hsize=29pc \tenpoint +\textindent\bull ``\MF\/ware'' by Donald~E. Knuth, Tomas~G. Rokicki, and +Ar\-thur~L. Samuel, Stanford Computer Science Report 1255 (Stanford, +California, April 1989), 207~pp. \ {\it The {\sltt WEB} programs for +four utility programs that are often used in conjunction with +\slMF\kern1pt: {\sltt GFtype}, {\sltt GFtoPK}, {\sltt GFtoDVI}, +and {\sltt MFT}.} +\par} + +\bugonpage D67, in the July 1987 printing (4/7/89) + +\ninepoint\noindent +[Delete line 7, which has a redundant `{\bf if\/} $r=p$ {\bf then}'; + move line 8 to the left 10 points for alignment; and restore the following + line (which was deleted by mistake after line 8): + + \noindent\hskip10pt + $\\{node\_size}(p)\gets q-p$\quad$\{\,$reset the size in case it grew$\,\}$ + + \noindent + These corrections are needed only in the reprinting made July, 1987.] + +\bugonpage D228, in the July 1987 printing (4/7/89) + +\ninepoint\noindent +[Delete lines 14--15, which were inserted erroneously from a previous errata +list; and restore the following lines (which were deleted by mistake): + +\noindent\hskip20pt +{\bf begin} \\{double}(\\{max\_coef}); \ +\\{double}(\\{x0}); \ +\\{double}(\\{x1}); \ +\\{double}(\\{x2});\par\noindent\hskip20pt +\\{double}(\\{y0}); \ +\\{double}(\\{y1}); \ +\\{double}(\\{y2});\par\noindent\hskip20pt +{\bf end} + +\noindent +These corrections are needed only in the reprinting made July, 1987.] + +\bugonpage D248, in the July 1987 printing (4/7/89) + +\ninepoint\noindent +[Delete line 16, which begins with `$d\gets\\{take\_fraction}$'; +and restore the following line (which was deleted by mistake after line 22): + +\noindent\hskip10pt +{\bf if\/} $d<\\{alpha}$ {\bf then} $d\gets\\{alpha}$ + +\noindent +These corrections are needed only in the reprinting made July, 1987.] + +\bugonpage D389, line 10 (6/20/89) + +\ninepoint\noindent\hskip20pt +\\{help1}({\tt\char'23 +The\]expression\]above\]should\]have\]been\]a\]number\]>=3/4.\char'23}); + +\bugonpage D510, in the July 1987 printing (4/7/89) + +\ninepoint\noindent +[Move the 7th-to-last line, which begins with `\\{internal}[\\{fontmaking}]', +one line down, and indent it to the right by 10 more points. +This correction is needed only in the reprinting made July, 1987.] + +% volume E +\hsize=29pc +\def\dashto{\mathrel{\hbox{-\kern-.05em}\mkern3.9mu\hbox{-\kern-.05em}}} + +\bugonpage Exiii, bottom four lines (5/5/89) + +{\hsize=29pc \tenpoint +\textindent\bull ``Metamarks: Preliminary studies for a Pandora's Box of +shapes'' by Neenie Billawala, +Stanford Computer Science Report 1256 (Stanford, +California, May 1989), 132~pp. \ {\it Lavishly illustrated studies in +parameter variation, leading to the design of a new family of +typefaces called Pandora.} +\par} + +\bugonpage E401, bottom line (5/16/89) + +\ninepoint\noindent +{\bf \def\_{\kern.04em\vbox{\hrule width.3em height .6pt}\kern.08em}% +math\_fit}$(-.3\\{cap\_height}\0*\\{slant}-.5u\0,\\{ic}\0)$;\par\noindent +{\bf penlabels}$(1,2,3,4,5,6,7,8)$; {\bf endchar\/}; +\smallskip\noindent +[some points and labels are missing at the tip of the tail on page 400] + +\bye + +Now here are some that I will make soon! + + +######################################################################## + + +[ end of message 017 ] +------- diff --git a/info/digests/tex-implementors/message.18 b/info/digests/tex-implementors/message.18 new file mode 100644 index 0000000000..ea3eeea371 --- /dev/null +++ b/info/digests/tex-implementors/message.18 @@ -0,0 +1,268 @@ +>From BNB@math.ams.com Mon Oct 16 08:28:17 1989 +Return-Path: +Date: Wed 11 Oct 89 19:36:21-EST +From: bbeeton +Subject: Impending TeX 3.0; verification of mailing list +To: TeX-implementors@math.ams.com +Mail-System-Version: + +Date: 11 Oct 89 Message No: 018 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: Impending TeX 3.0; verification of mailing list + + +After a long silence (message 17 was sent on 29 June) there is some big +news to report: + +At the TUG meeting, Don Knuth announced some changes to TeX, largely to +support non-English and multilingual environments. A sheet describing +the proposed changes was handed out, but on the assumption that the +contents of that proposal have already reached everyone (and not having +a copy in electronic form), the details are not attached. More about +this later. + +A second major development was Leslie Lamport's decision that, since he +does not intend to develop LaTeX further (he will devote what time he +spends on LaTeX to writing a long-awaited manual on writing style files), +he is willing to turn maintenance and development over to a committee. +A natural head of such a committee was present at the meeting, Frank +Mittelbach, and, subject to Frank's arranging the time to work on the +project, Leslie has expressed his willingness to be consulted and give +advice to this work. There were two well-attended meetings of persons +interested in "the future of LaTeX", gathered at Leslie's request, at +which various strategies were discussed. If memory serves (though I +took notes, I have not yet unpacked them; between the middle of August +and now, I have attended two TeX meetings and two standards meetings, +and have not yet even finished attending to the accumulated mail), the +first stage will consist of such tasks as generalizing the existing +LaTeX macros to be language-independent and performing any pending bug +fixes. After that is complete, more extensive changes, the direction +of which is yet to be decided, will be undertaken. I will try to bring +news of this project as it develops. + +The TeX-related files from Score, except those that were entirely +Score-related, have been made available for ftp from another Stanford +computer, labrea.stanford.edu . This is a VAX 11/750 Unix machine. +The relevant directories are accessible as ~ftp/pub/tex . + +Score was made unavailable to logins, including FTP, on 20 September. +R.I.P. + +Back to the TeX 3.0 announcement. I have received the following message +from Don: + + Date: 25 Sep 89 2223 PDT + From: Don Knuth + Subject: progress report + + Well, I'm still not finished with TeX version 3.0, but I'm beginning + to see the light at the end of the tunnel! (In other words, I'm + beginning to develop tunnel vision.) + + I've completed a revision of the text for the 17th printing. It was + possible to sneak in all the new stuff with only 95 pages changed. + I've made "errata.five" to document all the changes to The TeXbook + and The MFbook occasioned by the new versions. Almost every change + appears in nine point or eight point type; thus, changes were substantial, + but they affect only macro writer and advanced users to a noticeable degree. + + Vols B and D will change on virtually every page, so there's no + hope to keep those errata uptodate. I have recorded all the substantive + changes in TEX82.BUG and MF84.BUG as usual, but that's all I can do. + Hundreds of modules changed in order to handle each of the four major parts + of this revision. + + I plan to write a brief description of the new features, which do look + good to me at the moment (although I'm still not finished with the + tough algorithm that reconstitutes hyphenated words as discretionaries + when the new ligature conventions are in use). (One of the hardest + things is to make it possible to hyphenate a word that's preceded by + a double-quote ligature and -- with the new ligature conventions --- + then the first character of the word has been altered besides. I need + to stand on my head to handle that.) + + There's still more than a week's work to do, realistically, because + it won't be easy to update TRIP and TRAP. But then I'll have a tape + with brand-new sources, and I'll try to get all the old-timers + psyched up to propagate the new versions to the whole world. + +And a later progress report from Don: + + Date: 06 Oct 89 0310 PDT + From: Don Knuth + Subject: as of 3:07am today (PST) + + TeX is alive and well. Oh what a TRIP he has just taken. + + (METAFONT is next; that won't be as dangerous an operation) + +It's clear that certain files will have to be retrieved in full, and the +main .WEB files are probably among them; certainly TRIP and TRAP will best +be obtained in new versions. Regarding TRIP, I have received quite a few +inquiries for difference files between past versions and the current one. +Unfortunately, only the latest version has been maintained on any computer +at Stanford, and I have only a few random versions, most of which i can't +identify unambiguously, but they're almost certainly not the same versions +that you have. Therefore, I am still looking for a good way to encode +TRIP and TRAP so that they will survive network mail transmission and be +able to be decoded on the other end. Or perhaps it will be best to ask +for you to help one another and pass the files along after they get +installed in the various archives. Offers of such assistance can be +forwarded through this mailing list by sending a message to + TeX-implementors@Math.AMS.com + +This seems a good time to include the contents of that list so that the +names and addresses can be verified. Please check your own name below, +and look carefully to see if all the implementors and distributors you +know of are included. And then send all corrections and suggestions to +me. Even if you have no comments, please acknowledge this message -- +since the last message the AMS has been switched from the Arpanet to +NSFnet, and there have been some unexplained mail failures. + + +######################################################################## + +This is the TeX implementors mailing list. + +"TeX-implementors":- +! This file contains the mailing list of TeX implementors and !- +! distributors accessible via network mail. This file is !- +! Math.AMS.com::SYSA:[prg.bnb.TeXdistrib]TeXdistrib.list !- +! Last update: 11 October 1989 |- +! !- +! The following are primary maintainers or distributors: !- +! !- +fox@uwavm.acs.washington.edu, ! 16Dec87 Jim Fox, CDC Cyber !- +Bart@cssun.tamu.edu, ! 23Nov88 Bart Childs, DG MV !- +KNM5936@TAMSIGMA.Bitnet, ! 23Nov87 Ken Marsh, HP9000/500 !- +Platt@ccm.UManitoba.CA, ! 24Nov87/8Oct89 Craig Platt, IBM/MVS!- +Guenther@wsuvm1.Bitnet, ! 20Nov87 Dean Guenther, IBM/CMS !- +Simpson@yktvmx.Bitnet, ! 23Nov87 Rick Simpson, IBM RT !- +"well!pti"@lll-crg.llnl.gov, ! 23Nov87 Lance Carnes, PCTeX !- +crawford-j@osu-20.ircc.ohio-state.edu, ! 20Nov87/10Apr89 John Crawford,Prime!- +"tektronix!reed!barry"@uunet.UU.NET, ! 21Nov87 Barry Smith, Textures !- +MacKay@June.cs.Washington.edu, ! 22Nov87 Pierre MacKay, Unix !- +"nls!davek"@uunet.UU.NET, ! 21Nov87/8Oct89 Dave Kellerman, VAX/VMS !- +! !- +! Additional TeX implementors or distributors: !- +! !- +beihl@mcc.com, ! 28Jul89 Gary Beihl, !- +FISICA%ASTRPD.INFN.IT@ICINECA2.BITNET, ! 4Dec87/25Jan89 Max Calvani, !- +! VAX/VMS/DECnet, Italy !- +c3ar@zaphod.uchicago.edu, ! 27Jul89 Walter Carlip, OzTeX, U.S. !- +mike@inrs-telecom.uquebec.ca, ! 20Nov87/1Apr89 Mike Ferguson, MTeX !- +GRZ046@DBNGMD21.Bitnet, ! 20Nov87 Edgar Fu\ss, Atari ST !- +XITIKGUN@DDATHD21.Bitnet, ! 24Nov87 Klaus Guntermann, Atari ST !- +U0275@DGOGWDG5.BITNET, ! 8Oct89 Klaus Heidrich, for !- +! Stefan Lindner, Atari ST !- +GRZTEX@DBNGMD21.Bitnet, ! 20Nov87 Ferdinand Hommes, IBM !- +! "unido!altger!tep"@uunet.UU.NET, 29May88 Klaus Lichtenwalder, C !- +! disabled 30Jun89 after failures on messages 016, 017 !- +"sun!saxony!pjm"@UUNET.UU.NET, ! 24Nov87 Pat Monardo, CommonTeX !- +TNIELAND%FALCON@WPAFB-AAMRL.ARPA, ! 28May88 Ted Nieland, DECUS !- +cczdao%clan.nott.ac.uk@nsfnet-relay.ac.uk, ! 8Sep88 David Osborne, ICL Clan !- +Rokicki@neon.Stanford.edu, ! 20Nov87/5Sep89 Tom Rokicki, Amiga !- +yaski%NTT-20.NTT.JP@relay.cs.net, ! 17Nov88 Yaski Saito, JTeX !- +FE617@DHAFEU11.BITNET, ! 27Oct88 Peter Sawatzki, !- +! Turbo Pascal !- +P920021@DBORUB01.Bitnet, ! 14Nov88 Norbert Schwarz, CDC Cyber !- +jjs@arbortext.com, ! 30Nov87 Jim Sterken, ArborText !- +! "munnari!g.ua.oz.au!ATREVORROW"@uunet.UU.NET, !- +! 15Dec88 Andrew Trevorrow OzTeX/Mac !- +! suspended by request, Apr 89 !- +WSULIVAN@IRLEARN.Bitnet, ! 25Jul88 Wayne Sullivan, SB*TeX !- +"mcvax!ed.ac.uk!G.Toal"@uunet.UU.NET, ! 14Jun88 Graham Toal, Acorn !- +CCFD8%vax2.sussex.ac.uk@ukacrl.Bitnet, ! Brian Williams, UK DECUS !- +! !- +! Implementors or distributors of, e.g., device drivers: !- +! !- +Beebe@Science.Utah.edu, ! 23Nov87 Nelson Beebe, UofUtah !- +Harrison@mahogany.Berkeley.edu, ! 23Nov87 Michael Harrison, VorTeX !- +X066TR@TAMVM1.TAMU.EDU, ! 23Nov87 Tom Reid, TeXrox !- +! !- +! Other primary information re-distributors: !- +! !- +abbottp%uk.ac.aston@nsfnet-relay.ac.uk, ! 29May88 Peter Abbott, UKTeX !- +alien%ese.essex.ac.uk@nsfnet-relay.ac.uk, ! 28Jul88 Adrian Clark, VAX/VMS !- +fps%vaxa.cc.imperial.ac.uk@nsfnet-relay.ac.uk, ! !- +! 4Jan88 Malcolm Clark, TeXline !- +mrd@sun.soe.clarkson.edu, ! 8Sep88 Mike DeCorte, LaTeX-Style !- +UCIR001@FRORS31.Bitnet, ! 28May88 Bernard Gaulle, GUTenberg !- +DLatex@ucbcmsa.Bitnet, ! 24Nov87 Doug Henderson, PC MF !- +DHosek@hmcvax.claremont.edu, ! 20Nov87/27Jul89 Don Hosek, output devices !- +Karney%PPC.MFENET@NMFECC.LLNL.GOV, ! 5Dec87 Charles Karney, VMS exten !- +RZ92@DHDURZ1.Bitnet, ! 23Nov87 Joachim Lammarsch, DANTE !- +jonradel@icecream.princeton.edu, ! 28Jul89 Jon Radel, PC pub-domain !- +R02SCH@DHHDESY3.Bitnet, ! 22Jan88 Peter Schilling, DESY !- +CET1%phoenix.cambridge.ac.uk@nsfnet-relay.ac.uk, ! !- +! 22Nov87 Chris Thompson, UK !- +X230GV@TAMVM1.Bitnet, ! 20Nov87 Glenn Vanderburg, TeX-L !- +! alw%munmurra.mu.oz.au@xx.lcs.mit.edu, 28May88 Alex Warman, Australia !- +! !- +! Other addressees: !- +! !- +A.Eric@GSB-HOW.Stanford.edu, ! 20Nov87 Eric Berg !- +mbb@jessica.Stanford.edu, ! 24Nov87/8Oct89 Malcolm Brown, !- +! former TeXhax !- +garcia@cfa.harvard.edu, ! 8Sep88 Michael Garcia, request !- +! Smithsonian Astrophysics !- +"frame!drf"@Sun.COM, ! 20Nov87/8Oct89 David Fuchs !- +Gropp@cs.Yale.edu, ! 24Nov87 Bill Gropp, former Apollo !- +Ray@theory.lcs.mit.edu, ! 25Nov87 Ray Hirschfeld, MIT, comp !- +LEICHTER@Venus.YCC.Yale.edu, ! 3Mar89 Jerry Leichter, !- +! Adrian Clark's VMS in U.S. !- +ogawa@saturn.arc.nasa.gov, ! 28Sep89 Art Ogawa, request !- +JEPTeX@Venus.TAMU.EDU, ! 28Apr89 J E Pittman, request !- +B35048@ANLCMT.Bitnet, ! 23Nov87 Tony Scandora, !- +! former DECUS, request !- +SCHOEPF@DMZNAT51.Bitnet, ! 3Mar89 Rainer Schoepf, bug 2.98 !- +QZDMGN@DRUEDS2.Bitnet, ! 28Dec88 Reinhard Wonneberger, !- +! request, EDS, Germany !- +Ken@cs.Rochester.edu, ! 20Nov87 Ken Yap, ex-LaTeX-Style !- +rey, ! 1Dec87 Ralph Youngen, AMS !- +dcl, ! 1Dec87 Dan Latterner, MR !- +bnb@seed.ams.com, ! 28May88 verification copy !- +! !- +! paper mail only: !- +! Randy Best, DCS !- +! Richard Kinch, C !- +! Kevin King, Talaris !- +! !- +! still to be added: !- +! ??? , Apollo !- +! ??? , Burroughs !- +! Arthur Flatau !- +! Ralph Stromquist ???, Sperry !- +! Lian Zerafa, FTL, Mac !- +! !- +! asked and declined: !- +! lamport@SRC.DEC.com, 20Nov87 Leslie Lamport, LaTeX !- +!**** Last Line ****! + + +######################################################################## + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Character code reference +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Upper case letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ +% Lower case letters: abcdefghijklmnopqrstuvwxyz +% Digits: 0123456789 +% Square, curly, angle braces, parentheses: [] {} <> () +% Backslash, slash, vertical bar: \ / | +% Punctuation: . ? ! , : ; +% Underscore, hyphen, equals sign: _ - = +% Quotes--right left double: ' ` " +%"at", "number" "dollar", "percent", "and": @ # $ % & +% "hat", "star", "plus", "tilde": ^ * + ~ +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +[ end of message 018 ] +------- + diff --git a/info/digests/tex-implementors/message.19 b/info/digests/tex-implementors/message.19 new file mode 100644 index 0000000000..0d430a6284 --- /dev/null +++ b/info/digests/tex-implementors/message.19 @@ -0,0 +1,628 @@ +>From BNB@math.ams.com Mon Oct 23 08:40:43 1989 +Return-Path: +Date: Sun 22 Oct 89 10:51:40-EST +From: bbeeton +Subject: Knuth's description of new TeX and Metafont +To: TeX-implementors@math.ams.com +Mail-System-Version: +Sender: BNB@vax01.ams.com + +Date: 22 October 89 Message No: 019 + +To: TeX implementors and distributors + +From: Barbara Beeton + +Subject: Knuth's description of new TeX and Metafont + + +Knuth has sent me the article below for TUGboat and to disseminate to +the world. You are welcome to distribute this further, but if you do, +please mark it "draft", and note that it will appear in TUGboat. + +I have successfully retrieved the main TeX README file from the directory +/pub/tex at labrea.stanford.edu and scanned the contents of the TeX +directories. Nearly everything was brought from Score with the original +timestamp more-or-less intact. The directory structure is changed somewhat +from Score, but it is logical, and should be easy enough to navigate. +However, nothing new seems to have appeared, in particular the new errata +(it will be called "errata.fiv") and the additions to the bug files (which +will be called tex82.89 and mf84.89). The errata and TeX bug files will +be in the subdirectory /pub/tex/tex and the MF bug file in /pub/tex/mf . +The README file is included for information. + +I will send a notice as soon as I see that the new .WEB files and +documentation have been installed at labrea. However, I will be away +from tomorrow through 1 November, so you won't hear anything until at +least the beginning of November. + + +######################################################################## + +[ README file from /pub/tex at labrea.stanford.edu ] + +This is the official TeX distribution directory at Stanford University. +Most of the files here were moved from Score.Stanford.EDU in September +1989 when that host was retired from service. File modification times +were preserved as much as possible. + +All of the files here are available for anonymous FTP by anyone and +may be freely redistributed. Some are copyrighted; see the files +themselves for more details. If you have any questions or comments, +please send mail to "tex@labrea.stanford.edu". + +(Note: at present, things are still somewhat unsettled, so some files +may be missing or have problems. Some of the directories are being +reorganized. By the end of October 1989 it should be more stable.) + +Here is a short description of what is contained in the subdirect- +ories. For further information, refer to the file README (or a +similar name) in each subdirectory. + +amsfonts AMS Cyrillic and math symbols fonts + +amstex The AMSTeX macros + +bibtex The BibTeX program and related files + +cm Metafont sources for the Computer Modern fonts + +fonts TFM files for standard (and some non-standard) fonts + +gf GF font files (for Imagen and Lasewriter) + +imagen Various files to support Imagen printers + +latex LaTeX macros, font sources, related files + +lib Input files read by TeX, Metafont and other programs + +ln03 Various files to support LN03 printers + +mf Metafont source code and documentation + +mfware Metafont utilities + +misc Miscellaneous files (temporary) + +tex TeX source code and documentation + +texware TeX utilities + +texhax TeXhax archives + +tugboat Files for things mentioned in TUGboat + +unix Unix TeX distribution from University of Washington + +web The WEB system + + +######################################################################## + +% Knuth's article + +\font\logo=logo10 % font used for the METAFONT logo +\font\logosl=logosl10 % font used for slanted METAFONT logo + +\def\MF{{\logo META}\-{\logo FONT}} +\def\MFbook{{\sl The {\logosl METAFONT}\kern1pt book}} +\def\TeX{T\hbox{\hskip-.1667em\lower.424ex\hbox{E}\hskip-.125em X}} +\def\ldt{\mathinner{\ldotp\ldotp}} + +\line{\bf The New Versions of \TeX\ and \MF\ \hfill by Donald E. Knuth} +\bigskip +\noindent +For more than five years I held firm to my conviction that a stable system +was far better than a system that continues to evolve. But during the TUG +meeting at Stanford in August, 1989, I~was persuaded to make one last set of +changes, in order to bring \TeX\ and \MF\ to a state of completion consistent +with their overall philosophy and goals. + +The main reason for the changes was the fact that I~had guessed wrong about +7-bit character sets versus 8-bit character sets. I~believed that standard text +input would continue indefinitely to be confined to at most 128~characters, +since I~did not think a keyboard with 256~different outputs would be +especially efficient. Needless to say, I~was proved wrong, especially by +developments in Europe and Asia. As soon as I~realized that a text formatting +program with 7-bit input would rapidly begin to seem as archaic as the 6-bit +systems we once had, I~knew that a fundamental revision was necessary. + +But the 7-bit assumption pervaded everything, so I needed to take the programs +apart and redo them thoroughly in 8-bit style. This put \TeX\ +onto the operating table and under the knife +for the first time since 1984, and I~had a final +opportunity to include a few new features that had occurred to me or been +suggested by users since then. + +The new extensions are entirely upward compatible with previous versions +of \TeX\ and \MF\ (with a few small exceptions mentioned below). +This means that error-free inputs to the old \TeX\ and \MF\ will still +be error-free inputs to the new systems, and they will still produce the +same outputs. + +However, anybody who dares to use the new extensions will be unable to get +the desired results from old versions of \TeX\ and \MF\null. I~am therefore +asking the \TeX\ community to update all copies of the old versions +as soon as possible. Let us root out and destroy the obsolete 7-bit systems, +even though we were able to do many fine things with them. + +In this note I'll discuss the changes, one by one; then I'll describe +the exceptions to upward compatibility. + +\bigskip +\noindent +{\bf 1. The character set.} +Up to 256 distinct characters are now allowed in input files. The codes that +were formerly limited to the range $0\ldt 127$ are now in the range +$0\ldt 255$. All characters are alike; you are free to use any character +for any purpose in \TeX, assigning appropriate values to its +{\tt{\char'134}catcode}, +{\tt{\char'134}mathcode}, +{\tt{\char'134}lccode}, +{\tt{\char'134}uccode}, +{\tt{\char'134}sfcode}, +and +{\tt{\char'134}delcode}. +Plain \TeX\ initializes these code values for characters above~127 just as +it initializes the codes for ordinary punctuation characters +like~`{\tt{\char'041}}'. + +There's a new convention for inputting an arbitrary 8-bit character +to \TeX\ when you can't necessarily type~it: The four consecutive +characters +{\tt{\char'136\char'136}}$\alpha\beta$, where $\alpha$ and~$\beta$ are +any of the ``lowercase hexadecimal digits'' +{\tt{0}}, +{\tt{1}}, +{\tt{2}}, +{\tt{3}}, +{\tt{4}}, +{\tt{5}}, +{\tt{6}}, +{\tt{7}}, +{\tt{8}}, +{\tt{9}}, +{\tt{a}}, +{\tt{b}}, +{\tt{c}}, +{\tt{d}}, +{\tt{e}}, +or +{\tt{f}}, +are treated by \TeX\ on input as if they were a single character with +specified code digits. For example, +{\tt{\char'136\char'136}80} +gives character code~128; the entire character set +is available from +{\tt{\char'136\char'136}00} +to +{\tt{\char'136\char'136}ff}. +The old convention discussed in Appendix~C, under which character~0 was +{\tt{\char'136\char'136\char'100}}, +character~1 (control--A) was +{\tt{\char'136\char'136}A}, +\dots, +and character~127 was +{\tt{\char'136\char'136}?}, +still works for the first 128~character codes, except that the +character following +{\tt{\char'136\char'136}} +should not be a lowercase hexadecimal digit when the immediately following +character is another such digit. + +The existence of 8-bit characters has less effect +in \MF\ than in \TeX, because \MF's character classes are built in to each +installation. The normal set of 95~printing characters described on +page~51 of +\MFbook\ +can be supplemented by extended characters as discussed on page~282, but this +is rarely done because it leads to problems of portability. \MF's +{\bf char} operator is now redefined to operate modulo~256 instead +of modulo~128. + +\bigskip\noindent +{\bf 2. Hyphenation tables.} +Up to 256 distinct sets of rules for hyphenation are now allowed in \TeX. +There's a new integer parameter called +{\tt{\char'134}language}, +whose current value specifies the hyphenation convention in force. If +{\tt{\char'134}language} +is negative or greater than~255, \TeX\ acts as if +$\hbox{\tt{\char'134}language}=0$. + +When you list hyphenation exceptions with \TeX's +{\tt{\char'134}hyphenation} +primitive, those exceptions apply to the current language only. Similarly, +the +{\tt{\char'134}patterns} +primitive tells \TeX\ to remember new hyphenation patterns for the current +language; this operation is allowed only in the special ``initialization'' +program called {\tt INITEX}\null. Hyphenation exceptions can be added at any +time, but new patterns cannot be added after a paragraph has been typeset. + +When \TeX\ reads the text of a paragraph, it automatically inserts +``whatsit nodes'' into the horizontal list for that paragraph whenever +a character comes from a different +{\tt{\char'134}language} +than its predecessor. In that way \TeX\ can tell what hyphenation +rules to use on each word of the paragraph even if you switch +frequently back and forth among many different languages. + +The special whatsit nodes are inserted automatically in unrestricted horizontal +mode (i.e., when you are creating a paragraph, but not when you are +specifying the contents of an hbox). You can insert a special whatsit +yourself in restricted horizontal mode by saying +{\tt{\char'134}language}$\langle$number$\rangle$. +This is needed only if you are doing something tricky, like unboxing some +contribution to a paragraph. + +\bigskip\noindent +{\bf 3. Hyphenated fragment control.} +\TeX\ has new parameters +{\tt{\char'134}lefthyphenmin} +and +{\tt{\char'134}righthyphenmin}, +which specify the smallest word fragments that will appear at the beginning +or end of a word that has been hyphenated. Previously the values +{\tt{\char'134}lefthyphenmin=2} +and +{\tt{\char'134}righthyphenmin=3} +were hard-wired into \TeX\ and impossible to change. Now plain \TeX\ +format supplies the old values, which are still recommended for most +American publications; but you can get more hyphens by decreasing these +parameters, and you can get fewer hyphens by increasing them. If the sum of +{\tt{\char'134}lefthyphenmin} +and +{\tt{\char'134}righthyphenmin} +is~63 or more, all hyphenation is suppressed. (You can also suppress +hyphenation by using a font with +{\tt{\char'134}hyphenchar=-1}, +or by switching to a +{\tt{\char'134}language} +that has no hyphenation patterns or exceptions.) + +\bigskip\noindent +{\bf 4. Smarter ligatures.} +Now here's the most radical change. +Previous versions of \TeX\ had only one kind of ligature, in which two +characters like~`f' and~`i' were changed into a single character like~`fi' +when they appeared consecutively. The new \TeX\ understands much more +complex constructions by which, for example, we could change +an~`i' following~`f' to a dotless~`\i' while the~`f' remains + unchanged:~`f\i'. + +As before, you get ligatures only if they have been provided in the font +you are using. So let's look at the new features of \MF\ by which +enhanced ligatures can be created. A~\MF\ programmer can specify a +``ligature/kerning program'' for any character of the font being +created. If, for example, the~`fi' combination appears in font +position~12, the replacement of~`f' and~`\i' by~`fi' is specified by +including the statement +$$\hbox{\tt{"i"~=:~12}}$$ +in the ligature/kerning program for {\tt{"f"}}; this is \MF's present +convention. + +The new ligatures allow you to retain one or both of the original characters +while inserting a new one. Instead of {\tt{=:}} you can also write +{\tt{\char'174}=:} if you wish to retain the left character, or +{\tt{=:{\char'174}}} if you wish to retain the right character, +or {\tt{\char'174}=:{\char'174}} if you want to keep them both. +For example, if the dotless~\i\ appears in font position~16, you can +get the behavior mentioned above by having +$$\hbox{% +{\tt{"i" {\char'174}=: 16}} +}$$ +in f's program. + +There also are four additional operators +$$\hbox{% +{\tt{\char'174}=:{\char'076}},\qquad +{\tt{=:{\char'174\char'076}}},\qquad +{\tt{\char'174}=:{\char'174\char'076}},\qquad +{\tt{\char'174}=:{\char'174\char'076\char'076}}, +}$$ +where each {\tt\char'076} tells \TeX\ to shift its focus one position +to the right. For example, if~f and~i had been replaced by~f +and dotless~\i\ as above, \TeX\ would begin again to execute f's +ligature/kern program, possibly inserting a kern before the dotless~\i, +or possibly changing the~f to an entirely different character, etc. +But if the instruction had been +$$\hbox{% +{\tt{"i" {\char'174}=:{\char'076} 16}} +}$$ +instead, \TeX\ would turn immediately to the ligature/kern program for +characters following character~16 (the dotless \i); +no further change would be made between~f and~\i\ even if the font +had something specified there. + +\bigskip\noindent +{\bf 5. Boundary ligatures.} +Every consecutive string of `characters' read by \TeX\ in horizontal mode +(after macro expansion) can be called a `word'. (Technically we consider +a `character' in this definition to be either a character whose +{\tt{\char'134}catcode} +is a +letter or otherchar, or a control sequence that has been +{\tt{\char'134}let} +equal to such a character, or a control sequence that has been defined by +{\tt{\char'134}chardef}, +or the construction +{\tt{\char'134}char}$\langle$number$\rangle$.) +The new \TeX\ now imagines that there is an invisible ``left boundary +character'' just before every such word, and an invisible ``right boundary +character'' just after it. These boundary characters take effect if the font +designer has specified ligatures and/or kerning between them and the +adjacent letters. Thus, the first or last character of a word can +now be made to change its shape automatically. + +A ligature/kern program for the left boundary character is specified within +\MF\ by using the special label~ +{\tt{\char'174\char'174}:} +in a {\bf ligtable} command. A~ligature or kern with the right +boundary character is specified by assigning a value to the new internal +\MF\ parameter +{\it boundarychar}, +and by specifying a ligature or kern with respect to this character. +The +{\it boundarychar\/} +may or may not exist as a real character in the font. + +For example, suppose we want to change the first letter of a word from~`F' +to~`ff' if we are doing some olde English. The \MF\ font designer could then +say +$$\hbox{ligtable {\tt{\char'174\char'174}: "F" {\char'174}:= 11}}$$ +if character 11 is the `ff'. The same ligtable instruction should +appear in the programs for characters like~( and~` and~`` and~- that can +precede strings of letters; then `{\tt Bassington-French}' will +yield `Bassington-ffrench'. + +If the `s' of our font is the pre-19th +century~s that looks like a mutilated~`f', and if we have a modern~`s' +in position~128, we can convert the final~s's as Ben Franklin did by +introducing ligature instructions such as +$$\vcenter{\halign{{\tt{#}}\hfil$\;$&{\tt{#}}\hfil\cr +boundarychar :=&255;\cr +ligtable "s":&255 =:{\char'174} 128,\cr +&"." =:{\char'174} 128,\cr +&"," =:{\char'174} 128,\cr +&")" =:{\char'174} 128,\cr +&"'" =:{\char'174} 128,\cr}}$$ +and so on. (A true oldstyle font would also have +ligatures for +ss and si and sl and ssi and ssl +and~st; it would be fun to create a Computer Modern Oldstyle.) + +The implicit left boundary character is omitted by \TeX\ if you say +{\tt{\char'134}noboundary} +just before the word; the implicit right boundary is omitted if you say +{\tt{\char'134}noboundary} +just after it. + +\bigskip\noindent +{\bf 6. More compact ligatures.} +Two or more ligtables can now share common code. To do this in \MF, you +say `{\bf skipto}~$\langle n\rangle$' at the end of one {\bf ligtable} +command, then you say `$\langle n\rangle$::' within another. Such local labels +can be reused; e.g., you can say {\bf skipto}~1 again after {\tt 1::} has +appeared, and this skips to the {\it next\/} appearance of~{\tt 1::}. There +are 256~local labels, numbered~0 to~255. Restriction: At most 128 ligature +or kern commands can intervene between a {\bf skipto} and its matching label. + +The {\tt TFM} file format has been upwardly extended to allow more than 32,500 +ligature/kern commands per font. (Previously there was an effective limit +of 256.) + +\bigskip\noindent +{\bf 7. Better looking sloppiness.} +There is now a better way to avoid overfull boxes, for people who don't want +to look at their documents to fix unfeasible line breaks manually. Previously +people tried to do this by setting +{\tt{\char'134}tolerance=10000}, +but the result was terrible because \TeX\ would tend to consolidate +all the badness in one truly horrible line. (\TeX\ considers all badness +$\ge10000$ to be infinitely bad, and all these infinities are equal.) + +The new feature is a dimension parameter called +{\tt{\char'134}emergencystretch}. +If +{\tt{\char'134}emergencystretch} +is positive and if \TeX\ has been unable to typeset a paragraph without +exceeding the given tolerances, another pass over the paragraph is made +in which \TeX\ pretends that additional stretchability equal to +{\tt{\char'134}emergencystretch} +is present in every line. The effect of this is to scale down all the +badnesses into a range where previously infinite cases become finite; +\TeX\ will find an optimum solution to the scaled-down problem, and this +will be about as good as possible in a practical sense. (The extra stretching +is not really present; therefore underfull boxes will be reported in warning +messges unless +{\tt{\char'134}hbadness} +is increased.) + +\bigskip\noindent +{\bf 8. Looking at badness.} +\TeX\ has a new internal integer parameter called +{\tt{\char'134}badness} +that records the badness of the box it has most recently constructed. +If that box was overfull, +{\tt{\char'134}badness} +will be 1000000; otherwise +{\tt{\char'134}badness} +will be between~0 and~10000. + +\bigskip\noindent +{\bf 9. Looking at the line number.} +\TeX\ also has a new internal integer parameter called +{\tt{\char'134}inputlineno}, +which contains the number of the line that \TeX\ would show on an error message +if an error occurred now. (This parameter and +{\tt{\char'134}badness} +are ``read only'' in the same way as +{\tt{\char'134}lastpenalty}: +You can use them in the context of a $\langle$number$\rangle$, e.g., by saying +`{\tt{\char'134}ifnum{\char'134}inputlineno{\char'076\char'134}badness ...\ +{\char'134}fi}' +or +`{\tt{\char'134}the{\char'134}inputlineno}', +but you cannot set them to new values.) + +\bigskip\noindent +{\bf 10. Not looking at error context.} +There's a new integer parameter called +{\tt{\char'134}errorcontextlines} +that specifies the maximum number of two-line pairs of context displayed with +\TeX's error messages (in addition to the top and bottom lines, which always +appear). Plain \TeX\ now sets +{\tt{\char'134}errorcontextlines=5}, +but higher level format packages might prefer +{\tt{\char'134}errorcontextlines=1} +or even +{\tt{\char'134}errorcontextlines=0}. +In the latter case, an error that previously involved three or more pairs of +context would now appear as follows: + +\halign{\qquad\qquad{\tt{#}}\hfil\cr +{\char'041} Error.\cr +$\langle$somewhere$\rangle$ The {\char'134}top\cr +\phantom{$\langle$somewhere$\rangle$ The {\char'134}top\ }line\cr +...\cr +1.123 {\char'134}The\cr +\phantom{1.123 {\char'134}The\ }bottom line.\cr} + +\noindent +(If +{\tt{\char'134}errorcontextlines{\char'074}0} +you wouldn't even see the `{\tt{...}}' here.) + +\bigskip\noindent +{\bf 11. Output recycling.} +One more new integer parameter completes the set. If +{\tt{\char'134}holdinginserts{\char'076}0} +when \TeX\ is putting the current page into +{\tt{\char'134}box255} +for the +{\tt{\char'134}output} +routine, \TeX\ will not move anything from insertion nodes into the +corresponding boxes; all insertion nodes will stay in place. Designers of +output routines can use this when they want to put the contents of box~255 back +into the current page to be re-broken (because they might want to change +{\tt{\char'134}vsize} +or something). + +\bigskip\noindent +{\bf 12. Exceptions to upward compatibility.} +The new features of \TeX\ and \MF\ imply that a few things work differently +than before. I~will try to list all such cases here (except when the +previous behavior was erroneous due to a bug in \TeX\ or \MF\null). +I~don't know of any cases where users will actually be affected, because +all of these exceptions are pretty esoteric. + +\medskip $\bullet$\enspace +\TeX\ used to convert the character strings +{\tt{\char'136\char'136}0}, +{\tt{\char'136\char'136}1}, +\dots, +{\tt{\char'136\char'136}9}, +{\tt{\char'136\char'136}a}, +{\tt{\char'136\char'136}b}, +{\tt{\char'136\char'136}c}, +{\tt{\char'136\char'136}d}, +{\tt{\char'136\char'136}e}, +{\tt{\char'136\char'136}f} +into the respective single characters +{\tt p}, +{\tt q}, +\dots, +{\tt y}, +{\tt{\char'041}}, +{\tt "}, +{\tt{\char'043}}, +{\tt{\char'044}}, +{\tt{\char'045}}, +{\tt{\char'046}}. +It will no longer do this if the following character is one of the characters +{\tt 0123456789abcdef}. + +\medskip $\bullet$\enspace +\TeX\ used to insert no character at the end of an input line if +{\tt{\char'134}endlinechar{\char'076}127}. +It will now insert a character unless +{\tt{\char'134}endlinechar{\char'076}255}. +(As previously, +{\tt{\char'134}endlinechar{\char'074}0} +suppresses the end-of-line character. This character is normally +$13=$ ASCII control--M $=$ carriage return.) + +\medskip $\bullet$\enspace +Some diagnostic messages from \TeX\ used to have the notation +{\tt ["80]} \dots {\tt ["FF]} +when referring to characters $128\ldots 255$ (for example when displaying the +contents of an overfull box involving fonts that include such characters). +The notation +{\tt{\char'136\char'136}80} $\ldots$ +{\tt{\char'136\char'136}ff} +is now used instead. + +\medskip $\bullet$\enspace +The expressions +{\tt{char128}} and {\tt{char0}} used to be equivalent in \MF; now +{\bf char} is defined modulo~256 instead. Hence {\tt{char-1}} $=$ +{\tt{char255}}, etc. + +\medskip $\bullet$\enspace +{\tt INITEX} used to forget all previous hyphenation patterns each time +you specified +{\tt{\char'134}patterns}. +Now all hyphenation pattern specifications are cummulative, and you are not +permitted to use +{\tt{\char'134}patterns} +after a paragraph has been hyphenated by {\tt INITEX}. + +\medskip $\bullet$\enspace +\TeX\ used to act a bit differently when you tried to typeset missing +characters of a font. A~missing character is now considered to be a word +boundary, so you will get slightly more diagnostic output when +{\tt{\char'134}tracingcommands{\char'076}0}. + +\medskip $\bullet$\enspace +\TeX\ and \MF\ will report different statistics at the end of a run because +they now have a different number of primitives. + +\medskip $\bullet$\enspace +Programs that use the string pool feature of {\tt TANGLE} will no longer run +without changes, because the new {\tt TANGLE} starts numbering multicharacter +strings at~256 instead of~128. + +\medskip $\bullet$\enspace +{\tt INITEX} programs must now set +{\tt{\char'134}lefthyphenmin=2} and +{\tt{\char'134}righthyphenmin=3} +in order to reproduce their previous behavior. + +\bye + + +######################################################################## + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Character code reference +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Upper case letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ +% Lower case letters: abcdefghijklmnopqrstuvwxyz +% Digits: 0123456789 +% Square, curly, angle braces, parentheses: [] {} <> () +% Backslash, slash, vertical bar: \ / | +% Punctuation: . ? ! , : ; +% Underscore, hyphen, equals sign: _ - = +% Quotes--right left double: ' ` " +%"at", "number" "dollar", "percent", "and": @ # $ % & +% "hat", "star", "plus", "tilde": ^ * + ~ +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +[ end of message 019 ] +------- + + diff --git a/info/digests/tex-implementors/mf.dif b/info/digests/tex-implementors/mf.dif new file mode 100644 index 0000000000..4258fe0f16 --- /dev/null +++ b/info/digests/tex-implementors/mf.dif @@ -0,0 +1,285 @@ +************ +File DRB0:[BELL.WEB]MF.WEB;2 + 7 % TeX is a trademark of the American Mathematical Society. + 8 % METAFONT is a tradement of Addison-Wesley Publishing Company. + 10 % Version 0 was completed on July 28, 1984. + 11 % Version 1 was completed on January 4, 1986; it corresponds to "Volume D". + 12 % Version 1.1 trivially corrected the punctuation in one message (June 1986). + 13 % Version 1.2 corrected an arithmetic overflow problem (July 1986). + 14 % Version 1.3 improved rounding when elliptical pens are made (November 1986). + 15 % A few "harmless" optimizations have been made since then. + 17 % A reward of $10.24 will be paid to the first finder of any remaining bug. + 18 % (This amount will double again in 1988.) + 20 % Although considerable effort has been expended to make the METAFONT program +****** +File DRB0:[BELL.WEB]MF.WEB;1 + 7 % Version 0 was completed on July 28, 1984. + 8 % Version 1 was completed on January 4, 1986; it corresponds to "Volume D". + 10 % A reward of $5.12 will be paid to the first finder of any remaining bug. + 11 % (This amount will double in 1987.) + 13 % Although considerable effort has been expended to make the METAFONT program +************ +************ +File DRB0:[BELL.WEB]MF.WEB;2 + 42 \chardef\%=`\% + 43 \let\swap=\leftrightarrow +****** +File DRB0:[BELL.WEB]MF.WEB;1 + 35 \let\swap=\leftrightarrow +************ +************ +File DRB0:[BELL.WEB]MF.WEB;2 + 146 @d banner=='This is METAFONT, Version 1.3' {printed when \MF\ starts} + 148 @ Different \PASCAL s have slightly different conventions, and the present +****** +File DRB0:[BELL.WEB]MF.WEB;1 + 138 @d banner=='This is METAFONT, Version 1.0' {printed when \MF\ starts} + 140 @ Different \PASCAL s have slightly different conventions, and the present +************ +************ +File DRB0:[BELL.WEB]MF.WEB;2 + 1019 @!str_ptr : str_number; {number of the current string being created} + 1020 @!init_pool_ptr : pool_pointer; {the starting value of |pool_ptr|} +****** +File DRB0:[BELL.WEB]MF.WEB;1 + 1011 @!str_ptr : str_number; {start of the current string being created} + 1012 @!init_pool_ptr : pool_pointer; {the starting value of |pool_ptr|} +************ +************ +File DRB0:[BELL.WEB]MF.WEB;2 + 1617 when |get_next| is being used to delete a token, and/or if some fatal error + 1618 occurs while \MF\ is trying to fix a non-fatal one. But such recursion + 1619 @^recursion@> + 1620 is never more than two levels deep. + 1622 @= +****** +File DRB0:[BELL.WEB]MF.WEB;1 + 1609 when |get_next| is being used to delete a token, or if some fatal error + 1610 occurs while \MF\ is trying to fix a non-fatal one. But such recursion + 1611 @^recursion@> + 1612 is never more than one level deep. + 1614 @= +************ +************ +File DRB0:[BELL.WEB]MF.WEB;2 + 3177 @ The |mem| array is divided into two regions that are allocated separately, +****** +File DRB0:[BELL.WEB]MF.WEB;1 + 3169 @= + 3170 @!temp_ptr:pointer; {a pointer variable for occasional emergency use} + 3172 @ The |mem| array is divided into two regions that are allocated separately, +************ +************ +File DRB0:[BELL.WEB]MF.WEB;2 + 3314 @p function get_node(@!s:integer):pointer; {variable-size node allocation} + 3315 label found,exit,restart; +****** +File DRB0:[BELL.WEB]MF.WEB;1 + 3309 @p function get_node(@!s:integer):pointer; {variable-size node liberation} + 3310 label found,exit,restart; +************ +************ +File DRB0:[BELL.WEB]MF.WEB;2 + 3368 if r=p then if rlink(p)<>p then + 3369 @; +****** +File DRB0:[BELL.WEB]MF.WEB;1 + 3363 if r=p then if ((rlink(p)<>rover) or (llink(p)<>rover)) then + 3364 @; +************ +************ +File DRB0:[BELL.WEB]MF.WEB;2 + 4250 or syntactic significance, except in a few instances defined here. + 4251 There's also |max_class|, which can be used as a basis for additional +****** +File DRB0:[BELL.WEB]MF.WEB;1 + 4245 or syntactic significance, expect in a few instances defined here. + 4246 There's also |max_class|, which can be used as a basis for additional +************ +************ +File DRB0:[BELL.WEB]MF.WEB;2 + 6061 @!s,@!t:pointer; {registers for list traversal} + 6062 @!delx,@!dely:scaled; {directions where |open| meets |explicit|} +****** +File DRB0:[BELL.WEB]MF.WEB;1 + 6056 @!r,@!s,@!t:pointer; {registers for list traversal} + 6057 @!delx,@!dely:scaled; {directions where |open| meets |explicit|} +************ +************ +File DRB0:[BELL.WEB]MF.WEB;2 + 6164 @@; +****** +File DRB0:[BELL.WEB]MF.WEB;1 + 6159 @!sine,@!cosine:fraction; {trig functions of various angles} + 6160 @@; +************ +************ +File DRB0:[BELL.WEB]MF.WEB;2 + 6759 (The constant .14 is actually $(7-\sqrt{28}\,)/12$; the worst case + 6760 occurs for polynomials like $B(0,28-4\sqrt{28},14-5\sqrt{28},42;t)$.) + 6762 @ OK, now that a long theoretical preamble has justified the +****** +File DRB0:[BELL.WEB]MF.WEB;1 + 6755 (The constant .14 is actually $(7-\sqrt{28}/12$; the worst case + 6756 occurs for polynomials like $B(0,28-4\sqrt{28},14-5\sqrt{28},42)$.) + 6758 @ OK, now that a long theoretical preamble has justified the +************ +************ +File DRB0:[BELL.WEB]MF.WEB;2 + 8304 The following code maintains the invariant relations + 8305 $0\L|x0|<\max(|x1|,|x1|+|x2|)$, + 8306 $\vert|x1|\vert<2^{30}$, $\vert|x2|\vert<2^{30}$; +****** +File DRB0:[BELL.WEB]MF.WEB;1 + 8300 The following code maintains the invariant relations |0<=x00 then +11234 d:=d-take_fraction(internal[fillin],make_fraction(beta+beta,delta)); +11235 d:=take_fraction((d+4) div 8,delta); alpha:=alpha div half_unit; +11236 if d0 then d:=d-take_fraction(internal[fillin],beta+beta); +11230 d:=(d+4) div 8; alpha:=alpha div half_unit; +11231 if d +****** +File DRB0:[BELL.WEB]MF.WEB;1 +20447 ("Pretend that you're Miss Marple, examine all clues,")@/ +20448 @^Marple, Jane@> +************ +************ +File DRB0:[BELL.WEB]MF.WEB;2 +20535 last gives the ``face byte.'' +20537 \yskip\hang|header[0]| is a 32-bit check sum that \MF\ will copy into +****** +File DRB0:[BELL.WEB]MF.WEB;1 +20533 last gives the ``face byte.'' Extensions of \TeX\ for oriental languages +20534 should be able to identify oriental fonts by means of this additional +20535 header information. +20536 @^oriental characters@>@^Chinese characters@>@^Japanese characters@> +20538 \yskip\hang|header[0]| is a 32-bit check sum that \MF\ will copy into +************ +************ +File DRB0:[BELL.WEB]MF.WEB;2 +21284 print_nl("Font metrics written on "); print(metric_file_name); print_char("."); +21285 @.Font metrics written...@> +****** +File DRB0:[BELL.WEB]MF.WEB;1 +21285 print_nl("Font metrics written on "); print(metric_file_name); +21286 @.Font metrics written...@> +************ +************ +File DRB0:[BELL.WEB]MF.WEB;2 +22487 This program doesn't bother to close the input files that may still be open. +22489 @= +****** +File DRB0:[BELL.WEB]MF.WEB;1 +22488 @= +************ +************ +File DRB0:[BELL.WEB]MF.WEB;2 +22527 internal[fontmaking]:=0; {avoid loop in case of fatal error} +22528 @; +****** +File DRB0:[BELL.WEB]MF.WEB;1 +22526 @; +************ + +Number of difference sections found: 27 +Number of difference records found: 54 + +DIFFERENCES /IGNORE=(SPACING,TRAILING_SPACES,BLANK_LINES)/WIDTH=132/MERGED=1/OUTPUT=DRB0:[BELL.WEB]MF.DIF;1- + DRB0:[BELL.WEB]MF.WEB;2- + DRB0:[BELL.WEB]MF.WEB;1 diff --git a/info/digests/tex-implementors/mf84.bug b/info/digests/tex-implementors/mf84.bug new file mode 100644 index 0000000000..9a9d40a884 --- /dev/null +++ b/info/digests/tex-implementors/mf84.bug @@ -0,0 +1,1880 @@ +This file has been updated periodically ever since METAFONT84 was born. +What you are about to read is "authentic source material" from the +early days before the program converged. Module numbers on the first +entries may bear little relation to those in Volume D. + +Entries are in chronological order; thus the most recent news appears +at the bottom of the file. + +------------------------------------------------------------------------------- + +(rough list of all bugs found in MF after it passed syntax check) +Starting with Version -100.0: [Mar 27, first run, about 00:30] +1. fix_date_and_time was badly patched in INIMF. +2. cur_tok function forgot "cur_tok:=p" at the end; PASCAL doesn't catch that. +3. "multiletter control sequences" msgs should say "symbolic tokens". +Version -99.0: [still Mar 27, done while waiting for WEAVE/TeX output] +4. do_statement should initialize cur_type:=vacuous. +5. find_variable has misplaced p:=equiv(p). +6. one-character primitives shouldn't decrease str_ptr. +7. clear_symbol had "q" at end where I meant to say "p". +8. help message for extra token flushing improved. +9. "buffer[k]" should be "buffer[j]" for 1-character id_lookup. +10. def_delims forgot to get_next afterwards. +11. type_command at beginning of statement wasn't diverted. +12. menu always came out after help message. +13. forgot to return after getting num/str token from token list. + Version -98.0: [March 28] +14. scan_declared_variable flushes too much. +15. ordered pairs: one level of indirection was forgotten. +16. type declarations must add "unknown" bit. +17. semicolon+ added to do_statement cases. +18. base_ident should get max_str_ref. +19. "internal[...]" missing in date for base_ident. +20. do_binary(p,c) should be do_binary(p,d) after continue_path +21. in scan_def after get_clear_symbol I need to get_next. +22. get_next needed at end of scan_def. +23. get_next needed at end of mode_command processing. +24. randomseed missing error typo: `;' for `:='. +25. print_nl("") at beginning of show. +26. refcounts on macro calls were incremented twice. +27. forgot to advance loc after getting num/str token from token list. +28. "/" has the wrong command code. +29. get_x_next needed after, e.g., "1/2" in scan_primary. +30. take_fraction should be make_fraction in call of frac_mult. +31. v:=dep_list(v) forgotten in dep+dep branch of add_or_subtract. +32. q:=link(q) etc misplaced and omitted in p_plus_fq and p_plus_q. +33. dep_finish recycled a dependency list twice. +34. call of dep_finish should use null not cur_exp. +35. decided that "3 3" shouldn't equal 9. +[also put in new code for the addto command] + Version -97.0: [March 29] +36. forget to set q:=qq in scan_expression. +37. first line of print_path: forgot print_ln. +38. typo in set_controls: right_y should be left_y. +39. toss_knot_list forgot that it has a circular list to toss. +40. print_exp shows big nodes backwards. +41. angle brackets didn't look good in print_exp; took them out. +42. left_brace must be between min_tertiary and max_tertiary. +43. prev_dep should point back to tail, not head, of previous list. + (that error was in encapsulate and ) +44. nonlinear_eq should leave node p vacant, sometimes. +45. conditional routine forgot that get_boolean starts with get_x_next. +46. forgot get_x_next in processing of else. +47. str_ref not initialized by make_string. +48. param_start not initialized properly. +49. "%EXPR" didn't look good in token list. +50. "{loop}" not necessary in forever loops; there's already enough. +51. macro name didn't come out right when tracing macros. +52. macro parameters weren't shown when tracing macros. +53. quote marks missing when displaying strings. +54. parameter names on macro call trace should look nicer. +55. statement beginning with bad token: error message needed. +56. `->' desired in context lines of macro. +57. forgot q:=loop_list_loc(s) in begin_iteration. +[also put in new code for shipout] + Version -96.0: [March 30] +58. forgot loop_type(s):=null in begin_iteration. +59. forgot value(p):=null after type(p):=type(pp) in find_variable. +60. forgot to delete_pen_ref after filling a contour. +61. check that it's a cycle before calling make_spec. +62. "if tracing_stats>0" should be "if internal[tracing_stats]>0"! +63. forgot get_next after showdependencies. +64. forgot link(r):=p at end of dependency list addition. +65. extra `get_x_next' in . +66. typos in last half of : mind the p's and q's. +67. take_fraction should be make_fraction in simple case of two givens. +68. in print_exp of unknown type, stop if v=null. +69. showtoken forgot to stop; also should be consistent with TeX. +70. "continue" label needed in error routine, after all. +71. id_lookup should treat length-one identifiers by simpler method. + (in particular, this allows it to find unprintable ones!) +72. need psi[n+1]:=psi[1] in cyclic case of make_choices. +73. tension/controls take primaries as arguments, not expressions. +74. print_spec didn't initialize octant. +75. print_spec: break lines into two, since they are quite long. +76. smooth_moves not called in fill_spec. +77. typo < for > in edge_prep. +78. edge tracing misses half the corners, and forgot to set trace_y. +79. edge_prep needs extra logic when rover=head. +80. make_good should compute cur_d based on good values, not original values; + but we sometimes need the other alternative too. +81. valid_sum: the test was backwards. +82. print_weight blunder: ho(q) should be ho(info(q)). +83. forgot init_gf in shipout. +84. typo in : if total_chars<>1 then print("s"). +85. initializations of ww, prev_w, and m were forgotten in ship_out. +86. typos in initialization of prev_m and gf_min_x. +87. forgot to update prev_n in ship_out. +88. relax becomes "expandable". +89. internal[x]>1 should be internal[x]>unity! +90. forgot to restore normal scanner_status in pass_text. +91. (end occurred when if...) was inevitable. +[also put in new code for openwindow, display] + Version -95.0: [April 1] +92. forgot to unscale the window numbers in that new code. +93. had w<0 test instead of w<=0 in . +94. prev_w:=w should be done in all cases of . +95. forgot get_x_next after scanning `1/2'. +96. in do_assignment, after recycle_value(p) I need to set type(p):=something. +97. omit `.' after the equivalent in showtoken. +98. in , I said "until q=p"; I meant "until q=value(p)". +99. print_macro_name said "info(link(a))"; meant "text(info(info(link(a))))". +100. forgot get_x_next after macro_call in scan_primary. +101. scan_primary installed dependent components badly (data structure error). +102. new_structure failed in case of generic_subscript (data structure error). +103. param_type case of print_cmd_mod had bad if/else nesting (language error). +104. null_path forgot to return a value (language error). +105. p_with_x_becoming_q had typos (q and f for x). +106. should end with cur_exp:=t, not r. +107. subscripted definitions: out of sync; scan_primary loop needs revision. +108. secondarydef went through scan_def instead of make_op_def. +109. make_op_def forgot the final get_next. +110. make_op_def also forgot to insert the general_macro preface. +111. showvar shows too much of macro variables. + Version -94.0: [April 4] +112. single_dependency needs to take account of the scale factor. +113. add_or_subtract starts out with wrong v value. [bug 31 was fixed wrong] +114. print_exp needs a case for t=independent. +115. also numeric_type, and case v=null of pair_type, transform_type. +116. end_token_list thought identity_macro and insertions had ref counts. +117. disp_var should display also in case of generic subscripts. +118. find_var should put value(pp):=null when it sets type(pp):=numeric_type. +119. yet another problem in : copy_dep_list(dep_list(q)). +120. scan_primary should flush_node_list(q) before make_exp_copy(p). +121. make_scaled arguments reversed in p_over_v. +[also added code for new internals: smoothing, autorounding] +[also added code for showstats] + Version -90.0: [April 5] +122. Should check range of variables when they become known. +123. should include begin...end (WEB language error). +124. forever should be followed by a colon. +125. dangling else problem in make_eq: "abc"="abc" considered false. +126. showstats, showtoken should read the semicolon before stopping. +127. print_variable_name balked at, e.g., xpart of a capsule. + Version -89.0: [April 6] +128. after &foo, shouldn't assume there's an input file present. +129. forever forgot get_next. +130. pair=path and path=pair should coerce the pair to be a path. +131. similarly in the operand to `addto'. +[added new code for cull command] +[minor revision of internal quantities; e.g., labeling is out, fontmaking is in] + Version -88.0: [April 7] +132. "string" operator is renamed "str". +133. min/max coordinates added to boc command. +134. labeling_command removed; it will be implemented in macros. +135. info(p) should be attr_loc(p) in flush_variable. +136. make_spec didn't realize the need for xh and yh. +137. gf_new_row parameters had sign reversed. +138. the "numeric" case was left out of recycle_value. +[added new code for special/numspecial] + Version -87.0: [April 13] +139. q:=qq should apply also after , in scan_expr. +140. param_size: better defined than a constant. +141. surprise: back_input fails when cur_cmd=expr_arg, as it changes limit. +142. forgot to change right_type(r). +143. show shows the whole path. +144. expr like 0..1 leads to with q undefined. +145. typos in , clobbered dx2 and used right_type(p) twice. +146. need to adjust expr_arg when macro is inside a macro! +147. expr_arg forbidden to be in a text argument. +148. frozen_relax added to prevent premature termination. +[I took out the code used for debugging the screen interface] +[added "cycle", a unary operator taking path to boolean] +[added the code for concatenation and for str and for xpart..yypart] + Version -86.0: [April 25] +149. not_scolded_yet was never set false after scolding. +150. Missing "q:=s" at the end of . +151. In @, add get_next after back_error. +152. New xpart routine didn't recycle other components of the big node. +[added the "hard_times" case of multiplication] +[added the complete set of boolean expressions] +[added the eight transformations, applied to three kinds of expressions] +[added the save command] +[added the interim command] +[added the let command] +[added the pen operations] +153. Incomplete help message on "Not a variable". +154. forgot begin...end in the last section of materialize_pen. +155. blunder : length(p,s,q) should be length(s,q,r). +156. : forgot begin...end here too. +157. "(newly created)" shd be " (newly created)". +158. path_trans: forgot to unstash the capsule p. +159. set_up_trans: transform_type should be transformed_by, in one place. +160. : had p instead of q, in several places. +161. edges_trans: an edges variable isn't in a capsule. + Version -85.0: [May 2] +162. begingroup ... endgroup should be allowed as compound statement. +163. pausing shouldn't clobber "showit". (WAITS version only) +164. Improved help message for isolated expressions. +165. Bad error recovery after "Not a variable" in showvar. +166. Typo in clear_symbol: name_type(p) instead of name_type(q). +167. "%" and ";" to be left out of file names being input. +168. dep_finish used v for two purposes; wrong declared type. +169. autorounding 2 suppresses correction when the derivative isn't critical. +170. tab characters should be changed to spaces on input. (WAITS version) +171. harmful goto: Forgot to |return| after path_trans and edge_trans. +[added ord, hex, oct, length, char, decimal, and jobname] + Version -80.0: [May 4] +172. showvar still screwed up. +173. don't clobber screen for prompt_input (WAITS only). +174. length of non-cyclic path is one too high. +175. evoked the wrong message. +176. better error message needed on `Equation cannot be performed'. +177. ">> " inserted before expression displays. +178. should dup_offset also when n=0. +179. pencircle was a factor of 2 too big. +180. cosine of 180 should be -1 exactly. +181. ord "" should be -1. +182. shipout should allow expressions as well as variables. +183. "mod outer_tag" needed in various tests on eq_type. +184. merge_edges forgot to adjust for changes in m_offsets. +185. typo, ww for w in print_pen. +186. typo, "outer" for "errhelp" in print_cmd_mod (message case). +[added "also"] +[added "message", "errmessage", "errhelp"] +[added "outer", "inner"] +[added "readterminal", "readstring"] + Version -79.0: [May 6] +187. read_toks forgot to include the general_macro token. +188. offset_prep should treat n=0 like n=1. +189. cusp transitions (from change 169) must be suppressed in envelope case. +190. shouldn't change xp or yp. +191. was used too late. +192. had a redundant test (a relic of old code). +193. wastefully made the same fraction three times. +194. doublepath should split the cycle. +195. `if k=0' in fin_offset_prep should have been `if k=1'. +196. `done:' misplaced in . +197. also move[move_ptr] should be initialized to 1 there, not 0. +198. skew is used with p=q in fill_envelope. +199. it's no use tracing subdivision for offsets, since everything is skewed. +200. in , round_unscaled should be floor_unscaled. +201. unskewing: wrong formula (x was .5 too large). +202. elliptical pens: better correction for the case gamma<=abs(alpha). +203. dual env_move was updated badly, in both and . +204. dual env_move to move: subscripts were off by 1. +205. should set ww:=knil(link(h)), not link(h). +[added ++] + Version -70.0: [May 9] +206. suppressed cusp rounding in envelope case too. +207. `show' should use `>> ' when it shows an expression. +208. streamlined the test for bad lambda and mu in |skew|. +209. after linear_eq, must check if type(cur_exp)=known. +210. print_spec surprise: contours might never travel toward the first octant! +211. t0,t1,t2 sign was reversed in . + Version -69.0: [May 10] +212. "showvar" changed to "showvariable". +213. typo: r for r_delim in . +214. "newinternal" feature added. +215. needs to update envmove at end of loop. +216. smooth_moves shouldn't affect the extreme points. +217. floor(unity*(n-1)/n) is unity when n is large; need to be more careful. +218. major improvements to rounding, based on new theory of (x+eps,y+eps^2). +219. pen offsets made symmetrical about the origin. +220. p:=half(p+q) overflow problem in take_fraction, take_scaled. +221. cull_edges now updates the max/min values too. +222. make_spec needs to be more bullet-proof to rounding errors; added `dest's. +223. xmult/ymult/zmult changed to xscaled/yscaled/zscaled. +224. elliptical pens improved by temporarily allowing zero-length lines. +[added edge transposition algorithm] + Version -67.0: [May 17] +225. copy can encounter a vacuous expression, e.g. in a parameter. +226. xy_swap_edges mustn't change w when inserting a large weight. +227. in #222, had typo pp for r in . +228. in #222, incorrectly assumed local max = global max of cubic. + Version -66.0: [May 19] +229. bad_binary(c,p) should have been bad_binary(p,c). +230. enabled comparison of unknown strings. +231. fixed ring_delete to avoid unexpected scolding. +232. should store character width info even when proofing<0. +[added all the TFM commands and output routines] +[added the `substring' operation] +[added `point', `precontrol', `postcontrol'; deleted `direction'] + Version -65.0: [May 24] +233. Change error message `(t)point(u)' to `point(t)of(u)'. +234. newinternal to allow a list of tokens. +235. In , should check for overflow before begin_token_list. +236. scan_def didn't allow for the case warning_info=null. + Version -60.0: [May 25] +237. increased param_size. +238. added . +239. stopped too early if the first cubic was dead. +240. bad_unary, bad_binary should distinguish pair from unknown pair. +241. yet another "m was scaled instead of fraction. + Version -59.0: [May 27] +245. break up initialize routine into two parts (cf init_prim in TeX) + Version -58.0: [May 28] +246. do_ship_out should scan_expression, not scan_primary. +247. offset_prep might clobber node q, so we need to search for q again. +248. pair "1" = true! (blunder in type_test) +249. allow strings x in `def f(expr x)=def g=x enddef enddef'. +250. allow exprs in text parameters, in sufficiently easy cases. +251. check right delimiters in macro_call. +252. "Bad window number" message gave unscaled value. +253. turnaround feature improves automatic rounding slightly. +254. primaries changed to expressions in window and cull commands. +255. scan_expression should make (0,0){0,0} a path, not a future path. +256. showvariable and showtoken to allow lists; all shows made consistent. +257. new internal quantity "windingcheck". +258. delete warning message about edges never used. +259. vardef: group the righthand side. +260. show commands stop once each. +261. cur_type should be vacuous after equation or assignment on outer level. + Version -57.0: [June 4] +262. added xyzzy diagnostic about effect of autorounding. +263. make_moves now puts xi_corr,eta_corr into halving. +[otherwise "draw (0,0)..(9,-.00002)" and "draw (0,-.00002)..(9,0)" fail badly!] + Version -56.0: [June 6] +264. smooth_moves changed completely; now is LR symmetric, cleaner. +265. changed "unknown" to "known". +266. pair to path conversion now done on length, makepen, reverse, etc. +267. cycle now defined on arguments of any type. +268. (re 218) sign was flipped in ceiling correction of . +[added union, subpath, penoffset, directiontime, intersectiontimes] + +Note: the first two draw statements in PENS.mf show an interesting effect. +With autorounding, the curves are noticeably better, esp the small one. +But there are two "holes", because of tiny discrepancies that I believe +are unavoidable. +Added later: Actually these are avoided by the new smooth_moves, but +certain others will not be. + Version -50.0 [June 30] +269. smoothing to be shut off at the retrograde transitions +270. more care needed in the rootfinding part of find_direction_time. +271. improved error recovery after "Isolated expression". + Version -40.0 [July 3] --- the first version to be "complete"! +272. trivial change in . +273. check that halfwords are large enough to hold edge/weight data. +274. `path reverse (0,1)' should be true. +275. xy_swap_edges might empty the structure; then x_reflect will fail! +276. fix_offset was being done too often, due to improper range test. +277. parameters come out even when tracingonline=0. +278. step-until wasted r and didn't check syntax carefully. +279. had typo: `line' for `group_line'. +280. "You can't dump in a group" error was impossible. +281. need better ETC cutoff in showmacro. +282. print_exp needs to handle independents, because it's used by disp_var. +283. suppress `#### xpart %CAPSULEnnnn' printouts. +[added code for everyjob; this version wasn't complete after all!] + Version -30.0 [July 9] +284. need better error/help after ` if s1=s2' when the strings are unknown. +285. removed autorounding>2; it was leading to more glitches than it was worth. +286. envelope filling of a cycle to be done by two calls of fill_envelope. +287. "null" changed to "vacuous". +288. cyclic path inserted in another path should retain its last arc. +289. introduce several dozen "put_get" errors for improved recovery. +290. suppress "with autorounding" when autorounding hasn't been set. +291. {loop value} came out even when tracingonline=0. +292. show commands should wake up the terminal before showing their output. +293. forgot error message in `if true else'. + Version -20.0 [July 14] +294. need to catch pens that are too large. +295. make_eq dassn't change lhs (because this clobbers the memory links later). +296. string usage is reported too high by showstats. +297. bilin1 and add_mult_dep can call p_plus_fq with type(q)=proto_dependent. +298. forgot to recycle pp. +299. in change number 286, the weight of the two paths should be the same. +300. print_ln sometimes changed to print_nl("") in order to avoid blank lines. +301. xyzzy to be combined with tracingedges. +302. good3 entries should be 1 and 2 (not 1 and 0), to give desired symmetry. + Version -10.0 [July 17] +303. had to add `new_if_limit' to `conditional'. +304. `else' can be incomplete as well as `if' and `elseif'. +305. new help "You can't redefine a parameter." +306. print_edges should use cur_edges, because print_weight does. +307. cull shouldn't round; it should use ordinary inequalities. +308. obliterated variable left `0' token hanging in scan_primary. +309. forgot recycle_value(p) in . +310. forgot to check improper culling amounts. +311. `on' to be changed to `inwindow'. +312. >=max_tfm_dimen should be simply >. + Version -9.0 [July 19] +313. max_tfm_dimen needs to be decreased by design_size div 2^21. +314. merge test data reporting into the screen display routines. +315. use @# in printout at time of macro expansion tracing. +316. bad recovery after "Incomplete string" error. +317. @ should be usable as a parameter. +318. spacing bad on `missing of' and `too many parameters' errors messages. +319. keep track of largest str_ptr and pool_ptr values; showstats on two lines. + Version -8.0 [July 26] [introduced new test routines to study memory usage] +320. make_pen doesn't recycle the knots +321. flush_below often says free_node(2) on node of size 3. +322. make_eq should recycle and free; do_equation shouldn't +323. re #298 and #309: should also free the value nodes! +324. the replacement text of a bad_var definition should be recycled. +325. token lists left unrecycled in error recovery of addto, cull, display. + Version -7.0 [July 27] +326. showall to put "(see the transcript file)" after >> if not tracingonline. +327. remove redundant code: hex in print_the_digs; second l=1 in idlookup. +328. procedures never called: b_open_in; round_scaled. +329. need to zero cur_mod after back_expr in . +330. now catches also numbers that round to 1.0. +331. known_pair logic was obsolete; now it is massively simpler. +332. fix_check_sum now zeroes the negative bytes; this simplifies other code. +333. show_dependencies not to show parts of capsules. +334. forgot to set fix_needed:=false! +335. move fix_needed from add_or_subtract to dep_finish. +336. test fix_needed in bilin1 and add_mult_dep. +337. after back_expr in , forgot to unstash p. + Version 0.0 [July 28] [Hurray! The preliminary TRAP test is fully passed.] +338. corrected blunder in definition of trans_spec type. (found by Karney) +339. less extreme starting values of gf_min_x and its cousins. +340. uninitialized left_curl was possible. (found by John Hobby) +341. In , need to test sign before the `div 3' ops. +342. In pyth_add, remove `+2' when dividing by 4, to prevent overflow. +343. "Not a variable" changed to "Not a suitable variable". +344. known_pair forgot to reset cur_type. +345. round and floor procedures need to work in the presence of huge arguments. +346. major revision to allow independent variables to disappear silently: +346a. delete null_path and . +346b. delete the hard part of ring_delete, and delete . +346c. stash/unstash/flush_cur_exp routines to allow independent type. +346d. print_exp to allow a ring that contains only capsules. +346e. becomes (major new code). +346f. stash_in needs code to handle the case cur_type=independent. +346g. negation needs code to handle the case cur_type=independent. +346h. take_part needs code to handle the case cur_type=independent. +346i. do_binary needs code to handle either or both operands independent. +346j. frac_mult needs code to handle the case cur_type=independent. +346k. make_eq and try_eq too. +346l. linear_eq needs to check if cur_exp=x and cur_type=independent. +346m. linear_eq displays new dependency only when lhs is interesting. +347. minor improvement for coding style/brevity: the "interesting" function. +348. test `if t, didn't watch for coefficients zeroed. +352. check_mem now checks also the links in the dependency lists. +353. null_pen initialization belongs in , not . +354. fix_dependencies has to worry about coefficients dropping to zero. +355. add tracing to frac_mult. +356. need cur_sym>0 at the time of end_read_terminal. (found by S Robinson) + Version 0.1 [August 30] +357. Don't complain about winding_number<=0 when doing a doublepath. +358. Need to test for max_coef=0 in offset_prep. +359. Cusp detection should allow for more rounding error. +360. Major change to path syntax, allowing {dir}..{dir} path joins. +360a. `Fragments' disappear; new_fragment becomes new_knot. +360b. print_path has simpler conventions. +360c. future_path type disappears. +360d. left_brace renumbered and removed from scan_tertiary. +360e. some scan_tertiary code moves to new subroutine scan_direction. +360f. scan_expression has a bunch of new code. +361. scan_expression shouldn't have returned after cycle_hit. +362. abort_path, scrap_knot logic removed from scan_expression. + Version 0.2 [September 12] +363. new operator: makepath . +364. define point/precontrol/postcontrol at endpoints and beyond. (JDH) +365. union replaced by +; negation and subtraction allowed on edges. +366. another new operator: totalweight . (JDH's idea) +367. undelimited parameters may be preceded by an optional = or :=. +368. base_area_length was wrong. (affects CH files)(found by Pavel) +369. internal names to be allowable in suffixes. +370. label not_found was misplaced in do_add_to. (found by PasMESA translator) +371. progress report should be given at time of shipout. +372. procedures make_choices, make_spec,fill_envelope split into shorter pieces. +373. locals of cubic_intersection made global so that people could split it. + Version 0.3 [September 27] +374. allow ::= +375. equation that's off by .0001 shouldn't be called inconsistent. +376. bug in skew: must compute x_coord(q) and y_coord(q) exactly. +377. right/left/up/down to be assigned to octants 1/5/2/6; was 1/4/2/7. +378. boundedness to be allowed with any tension, and one-sidedly. +379. eliminate coordinate nodes in path lists by passing angles instead (JDH). +380. known_pair to free cur_exp after error msgs that might showdependencies. +381. scan_primary sometimes accessed num before it had a value (found by Pavel). +382. invalid characters should cause error message (suggested by PMB). + Version 0.4 [October 12] +383. allow `0' in response to error prompts. +384. put loop value on error context lines. +385. change `ord' to `ASCII'. +386. scantokens to be permitted; readterminal goes away. +387. expandafter to be permitted. +388. improved overflow conventions on make_fraction, make_scaled. +389. variable= should get its own error message. +390. nice_pair first argument can be any integer. +391. new feature, shortshow commands that don't pause. +392. "harmless" bug in negate_edges, the sorted list can get out of sorts. +393. ni too skimpy (15 instead of 63). (JDH) +394. loop_ptr not initialized. (found by Paul Richards) +395. bug in , q=null should goto done1. (Richards) +396. empty_edges macro added for readability. +397. x_reflect_edges might as well fix the offset as it goes. +398. blunder: frozen_bad_vardef had the wrong eq_type. +399. "name" changed to "tag". +400. check_arith inserted after division of numeric tokens. +401. stop_bit was not initialized in . +402. char 127 to be a string of length 1; slow_print added (therefore). +403. pyth_sub added to the repertoire. +404. minor change to calls on "confusion" in make_fraction, make_scaled. (JJW) + Version 0.5 [November 9] +405. 4095.999999 should be erroneous. +406. length to give the absolute value; argd changed to "angle". +407. get_next changed to get_x_next wherever possible. +408. z1..z2{curl 0} should be equivalent to z1..{curl 0}z2. +409. scantokens "" should be fast. +410. allow undelimited suffix and text parameters. +411. warningcheck to allow large variable values passed over silently. +412. "edges" changed to "picture". +413. "winding" changed to "turning". +414. had typo, "p" for "q". +415. elliptical pens should have axis symmetry. +416. slow_add introduced to catch arithmetic overflow on addition. +417. add a turningnumber primitive. +418. no carriage return between ">>" and "Edge structure...". +419. install new memory management routines (from TeX version 1.3). +420. generalized cull command. (suggested by Bruce Leban) +421. bad goto: `x..' reports that x is vacuous, loses value of x. +422. shortshows replaced by an internal variable "showstopping". +423. major change, capsule tokens: lots of code and restrictions gone! (JDH) +424. substring(a,b), subpath(a,b) to reverse the result when a>b. +425. new GF format: z goes away. (suggested by ALS) +426. another GF mod: chardw replaced by chardx/chardy, which are scaled. (PMB) +427. make `&' have the same precedence always (not different for strings). +428. wrong error message for 2"s" (bug introduced in change 369). +429. variable l in show_context has to be declared type integer. +430. bug in chop_path when both limits are large. + Version 0.6 [December 10] +431. xoffset and yoffset to be added by shipout. [this affects GF comments] +432. wake_up_terminal, not t_open_out, before "Ouch..." (Scott Robinson) +433. undelimited suffix parameters to allow an optional delimiter, disallow =. +434. showall... to be eliminated; tracingcapsules added. +435. allow undelimited parameters after delimited ones. +436. nullpen test in addto should test for any one-point pen. +437. granularity parameter to affect autorounding (Bruce Leban) +[this leads to major improvements suggested by JDH; lots of code changes!] +[basically, make_spec is now responsible for autorounding; fill_spec just fills] +438. node_size overflow problem must be prevented. (Paul Richards) +439. allow unary + with a picture. +440. nullpen should transform quickly to itself, if not shifted. +441. print_edges should skip over null rows, if it doesn't already. +442. open_base_file improved (following TeX's change number 302). +443. output initialization improved (following TeX's change number 303). +444. operators shouldn't fail because future pen isn't a pen. (JDH) +445. intersection routine to quit in hard cases. (DRF) +446. angle routine was off by epsilon on negative arguments. (Karney) +447. octant assignment should look ahead further in ambiguous cases. (JDH) +448. forgot that right_type(r)=endpoint could happen. +449. turning_number calculated directly, not times 8. +450. floor_scaled made more efficient by trading subtraction for multiplication. +451. doublepath autorounding to compromise between east and west. (JDH) +452. codes of picture_type and path_type interchanged, to simplify a "case". + Version 0.7 [January 17, 1985] +453. def to allow both := and =. (NB) +454. "keeping" and "dropping" instead of "including" and "excluding". (HWT) +455. (see the transcript...): why, when tracingonline>0? +456. dead cubics need to be removed also before xy_round. (NB) +457. [re 433] I said get_x_next twice; a blunder. + Version 0.75 [January 23, 1985] +458. Abbreviated boc command makes GF format more attractive for lowres. (GusF) + Version 0.76 [February 2] +459. known and unknown might as well both be primitive. +460. ab_vs_cd(a-d,b,c-b,d) simplifies to ab_vs_cd(a,b,c,d). (JDH) +461. (from change 435) must use k, not n. +462. (from change 458) max_new_row added, since 165 wasn't updated to 164. + Version 0.77 [February 16] +463. abbreviated version of tracingspecs is desired for turning number errors. +464. improved octant number in pathological cases of quadrant_subdivide (JDH) +465. xoffset,yoffset communicated to GF file when proofing>0. +466. Poirot changed to Marple. +467. reverse starts the reversed path at the wrong time. +468. Extra help given after `undefined coordinate' errors. +469. Keep segment numbers from overflowing max_halfword. (JDH) +470. Ditto for pen offset slope numbers. +471. n_magic had min_halfword with wrong sign. (John Johnson) + Version 0.80 [April 1] +472. In errhelp, % means , %% means %. (BPL) +473. tracing of envelopes should give symbolic octant names. +474. (-x mod y) should be ((-x) mod y) in good_val. +475. crossingpoint could overflow on 32-bit machines. (BPL) +476. Improvements to abbreviated format of number 463. + Version 0.81 [April 4] +477. `I hide(showdependencies)' in hint to become `I ???'. +478. print_strange shouldn't wake up the terminal in scroll mode. (cf 463) +479. flush_list procedure made a bit faster. (DRF) +480. bounded velocities to be multiplied by .999 for safety. +481. Detect error in declaration that tries to extend a vardef. +482. print_strange puts turns in parentheses (cf 463). +483. make_name_string shouldn't ever cause string space overflow. +484. allow xscaled m yscaled n. +485. checksum should consider values relative to designsize. (DRF) +[I also increased max_strings to 2000.] + +[Note: Neenie found a case where missing pixels can occur, due to +inconsistent rounding between left-to-right and right-to-left subdivision: +pickup pencircle; draw +(0,126)..controls (130.29451,126) and (288,126.00002) + ..(288,36)..controls (288,143.99998) and (132.97438,144) + ..(0,144)..controls (0,138) and (0,132) + ..cycle; +The "right" way to fix this would be to develop a make_spec routine for +non-cycles, and to copy a reversed spec, so that double paths would be +guaranteed self-inverse. However, my later experiments showed that +autorounding wasn't nearly as useful as I had expected it to be, hence I +decided not to waste time beefing up this routine; no satisfactory +automatic approach to rounding occurs to me.] + Version 0.90 [May 10] +486. 180-degree turns to be clockwise for half of doublepath cycles. +487. introduce fillin parameter. +488. `numeric_type' moved before `known', so that print_exp works (Richards). +489. numeric_type as unary op should include independent in its range (cf 346). + Version 0.91 [May 13] +490. show_token_list gets null_tally parameter. +491. if bad>0, change the code as in TeX changes 315, 316. +492. batchmode change as in TeX 317. +493. "and double autorounding" to be traced, if appropriate. +494. introduce tracingrestores. + *`restoring a bad variable'? +495. put decimal number into gf extension +496. mediation put into scan_primary, so that round .5[a,b] works properly. +497. cubic_intersection now has |tol| to compensate for rounding errors. +498. find_direction_time needs to worry about degenerate case x3=y3=0. +499. crossing_point(a,b,0) now yields fraction_one if a,b>0. +500. diag_round shouldn't insist that b-a is even (see below). +501. macro_call will show_macro with much larger limit. +502. TFM file statistics are logged too. + +* Here's an example (found by Neenie) explaining bugfix 500: +autorounding:=2; draw +(7.03159,-9.31831)..controls (12.14732,-9.4386) and (17.4299,-6.82948) + ..(21.60132,0)..controls (27.47417,9.61507) and (37.87402,15.58647) + ..(43.74687,25.20154)..controls (51.16223,37.34201) and (57.31,50.171) + ..(63.45776,63.00002) withpen pencircle; +The missing pixels are due to the following curious circumstances: (1) the +middle cubic splits into three, when subdividing into octants; (2) the reverse +curve splits too but with slightly different rounding, off by 1; (3) the old +diag_round routine, when it ensures that b-a is even, computes aa=a+1 on +one side of the curve, but aa=a-1 on the other side, thus making the +rounding "safe" on only one side. (Namely, on one side we have consecutive +values + b=1317666 a=1310720 + b=1329617 a=1310721 +and on the other side, + b=-1329618 a=-1310720 + b=-1317667 a=-1310721.) + +* Here's an example (by JDH) showing the necessary of bugfix 497: +path p[]; +p1 = (1,0)..controls (1,0.10493) and (0.98347,0.20921) + ..(0.95105,0.30902)..controls (0.91862,0.40881) and (0.8707,0.50288) + ..(0.80902,0.58778); +p2 = (0,0)..controls (0.63403,0.20601) and (1.26807,0.41203) + ..(1.9021,0.61804); +show p1 intersectiontimes p2; % (-1,-1), without `tol' +pickup pencircle; +currenttransform := identity scaled 150; +draw p1; draw p2; +showit; % but they clearly intersect + Version 0.95 [Aug 12] +503. `Se' changed to `SSE', etc. (suggested by RFS) +504. Inconsisting diagonal rounding was introduced in bugfix 500. + +[the following lines from @ in diag_round: + if aa>bb then cc:=dd-half(aa-bb-1)@+else cc:=dd-half(aa-bb+1) + if a>b then c:=d-half(a-b-1)@+else c:=d-half(a-b+1) +were replaced respectively by: + if right_type(p)>switch_x_and_y then cc:=dd-half(aa-bb+1) + else cc:=dd-half(aa-bb-1) + if right_type(p)>switch_x_and_y then c:=d-half(a-b-1) + else c:=d-half(a-b+1) +in order to make the rounding consistent on adjacent octants; +the following command caused `this can't happen': +fill (33,7)..controls (32.63094,5.70827) and (32.06163,3.716) + ..(31.59488,3.36667)..controls (31.10509,3.00009) and (29.14824,3) + ..(27.85318,3)..controls (27.85286,3) and (23.84952,3) + ..(23.8492,3)..controls (23.73282,2) and (23.61646,1) + ..(23.50008,0)..controls (26.66672,0) and (29.83336,0) + ..(33,0)..controls (33.66667,2.33333) and (34.33333,4.66667) + ..(35,7)..controls (34.33333,7) and (33.66667,7) + ..cycle;] + Version 0.96 [Aug 17] +505. allow comparison of transforms. [test by trying t=t when t is new...] +506. {restoring...} shouldn't get through when tracingonline=0. +507. better error message needed on `interim alpha:=0', `interim 0:=0'. +508. make_op_def should put parameters in the other order. +509. should say get_x_next, not get_next. +510. unif_rand to allow negative x, save on error messages. +511. tidy up chop_string when b<0 and/or a>l. +512. randomseed is automatically logged. +513. change 495 messed up if gf file couldn't be opened. (found by DRF) +[In INIMF.CH, 3-character extensions now have 0--9 or A--Z as leading digit.] + Version 0.97 [Sep 5] +514. a[b,c] to be tried only if a is numeric type. +515. simplified the code for length_op(string_type). +516. citations of `Chapter xx' now replaced by correct references. +517. to be in stat...tats version only. +518. remove extra space after and . +519. offsets should be included in the tracingoutput output. +520. a vacuous expression should be considered known. +521. charlist syntax changed from commas to colons. +[also the WAITS version command-line reader was fixed to handle `^^W'] + Version 0.99 [Sep 24] +522. vardef's begingroup...endgroup should be accessible. +523. allow an empty expression in for loops. + Version 0.999 [Oct 1] +524. "charfam" changed to "charext". +525. variable tt makes get_node slightly faster. (PROFILE suggests this) +526. cur_cmd<=max should be tested before cur_cmd>=min. (PROFILE) +527. fast_get_avail used in cur_tok and scan_primary. (PROFILE) + Version 0.9999 [Oct 27] +528. Major change to representation of independent variables + ("serial number" added so that MF's equation solving doesn't depend + on vagaries of storage allocation) + [module number change: new module between old 585 and 586] + [in terms of new numbering, modules 232, 585--587, 589, 594, 597, + 601, 608, 610, 816--817, 855, 1198--1199 were affected] +[I also reordered some of the cases in print_op, module 189, +so that the program could be condensed in published version] + Version 0.99999 [Nov 13] +529. forgot to decrease three_l in change 497! +530. cubic_intersection to give approximation if max_patience exceeded. +[the following example, found by NB, motivated this change: + show ( + (36.00104,26.99951)..controls (36.00131,26.99979) and (36.00146,27.00017) + ..(36.00146,27.00055) + )intersectiontimes( + (36,27.00055)..controls (45.17148,21.12364) and (55.83588,18) + ..(66.72873,18) + );] + Version 0.999999 [Dec 2] +531. hold_head needed (scan_toks calls cur_tok calls copy_edges). (D. Kosower) + Version 1.0 [January 4, 1986] +532. Optimization in module 1174, suggested by LER (3 Feb 86) +@x + if delta=0 then gf_out(skip0) + else begin gf_out(skip1); gf_out(delta); + end +@y + begin gf_out(skip1); gf_out(delta); + end +@z +*** Late copies of version 1.0 include this correction; +in particular, the program listing in Volume D was updated (with scissors)! + Changes subsequent to `Version 1.0' as published in C&T, Volume D: +533. Inconsistent punctuation in user messages (found by Karl Berry, June 86) +@x module 1134 +print_nl("Font metrics written on "); print(metric_file_name); +@y +print_nl("Font metrics written on "); print(metric_file_name); print_char("."); +@z (that was installed in version 1.1) + +534. Possible arithmetic overflows (found by Klaus Guntermann, July 86) +@x module 496 +while max_coef; +@y + internal[fontmaking]:=0; {avoid loop in case of fatal error} + @; +@z (that too was installed in version 1.2) + +536. Double rounding error should be avoided in make_ellipse (JDH, 22 Nov 86) +@x module 533 +d:=take_fraction(d,delta); +alpha:=abs(u); beta:=abs(v); +if alpha0 then d:=d-take_fraction(internal[fillin],beta+beta); +d:=(d+4) div 8; alpha:=alpha div half_unit; +@y +alpha:=abs(u); beta:=abs(v); +if alpha0 then + d:=d-take_fraction(internal[fillin],make_fraction(beta+beta,delta)); +d:=take_fraction((d+4) div 8,delta); alpha:=alpha div half_unit; +@z (That was the reason for version 1.3) + +537. Trivial change to a help message (version number is still 1.3). +@x module 1086 + ("Pretend that you're Miss Marple, examine all clues,")@/ +@y + ("Pretend that you're Miss Marple: Examine all clues,")@/ +@z + +538. Storage allocation can be more elegant and efficient (4/21/87) +@x module 169 +if r=p then if ((rlink(p)<>rover) or (llink(p)<>rover)) then +@y +if r=p then if rlink(p)<>p then +@z + +539. Unused variables can be eliminated. (Found by John Sauter, 5/5/87) +@x module 158 +@= +@!temp_ptr:pointer; {a pointer variable for occasional emergency use} + +@y (I used it only in my change file!) +@z +@x module 280 +@!r,@!s,@!t:pointer; {registers for list traversal} +@y +@!s,@!t:pointer; {registers for list traversal} +@z +@x module 284 +@!sine,@!cosine:fraction; {trig functions of various angles} +@y (the declarations in module 281 are correct, but in 284 they're superfluous) +@z +@x module 497 +var @!q,@!ww:pointer; {for list manipulation} +@!du,@!dv:scaled; {for slope calculation} +@!t0,@!t1,@!t2:integer; {test coefficients} +@!t:fraction; {place where the derivative passes a critical slope} +@!s:fraction; {slope or reciprocal slope} +@!v:integer; {intermediate value for updating |x0..y2|} +begin loop + begin q:=link(p); right_type(p):=k; +@y +var @!ww:pointer; {for list manipulation} +@!du,@!dv:scaled; {for slope calculation} +@!t0,@!t1,@!t2:integer; {test coefficients} +@!t:fraction; {place where the derivative passes a critical slope} +@!s:fraction; {slope or reciprocal slope} +@!v:integer; {intermediate value for updating |x0..y2|} +begin loop + begin right_type(p):=k; +@z +@x module 652 +@!s:0..param_size; {value of |param_start| on the current level} +@y who knows why that line was there? +@z +@x module 862 +var @!p,@!q,@!r:pointer; {for list manipulation} +@y +var @!p:pointer; {for list manipulation} +@z +@x module 985 +@!vv:scaled; {initial value of |v|} +@!q:pointer; {successor of |p|} +begin vv:=v; p:=cur_exp;@/ +@y +@!q:pointer; {successor of |p|} +begin p:=cur_exp;@/ +@z +@x module 1059 +@!t:small_number; {variant of |with_option|} +@y +@z + +540. Typo suppresses an error detection (Chris Thompson, 2May88) +@x module 963 + if txy mod unity=0 then if tyy mod unity=0 then +@y + if txx mod unity=0 then if tyy mod unity=0 then +@z + +541. get_x_token can lose a scanned declared variable (Chris Thompson, 4May88) +@x module 1011 +if equiv(x)=null then new_root(x); +@y +@z +@x module 1011 +done:scan_declared_variable:=h; +@y +done: if eq_type(x)<>tag_token then clear_symbol(x,false); +if equiv(x)=null then new_root(x); +scan_declared_variable:=h; +@z + +542. Avoid negative divisor rounding upward (Chris Thompson, fixed 19Jun88) +@x module 168 +else t:=(lo_mem_max+hi_mem_min+2) div 2; {|lo_mem_max+2<=t=1998 then t:=lo_mem_max+1000 +@z + +544. Avoid fatal_error after terminal eof (Tim Morgan, reported 25Oct88) +@x module 66 [serious problem occurred if this was called in open_log_file] +if not input_ln(term_in,true) then fatal_error("End of file on the terminal!"); +@y +if not input_ln(term_in,true) then t_open_in; +@z + +545. Force terminal output when open_log_file aborts (6Nov88) +@x module 789 + begin print_err("I can't write on file `"); +@y + begin selector:=term_only; print_err("I can't write on file `"); +@z + +546. By popular request, undo #544 and fix the bug a more complex way. +@x module 66 [this undoes change #544] +if not input_ln(term_in,true) then t_open_in; +@y +if not input_ln(term_in,true) then fatal_error("End of file on the terminal!"); +@z +@x module 87 [now we get to the new stuff] +begin if job_name>0 then selector:=term_and_log +@y +begin if log_opened then selector:=term_and_log +@z +@x module 88 + error; +@y + if log_opened then error; +@z +@x module 782 +@!job_name:str_number; {principal file name} +@y +@!job_name:str_number; {principal file name} +@!log_opened:boolean; {has the transcript file been opened?} +@z +@x module 783 +@=job_name:=0; +@y +@=job_name:=0; log_opened:=false; +@z +@x module 788 +selector:=log_only; +@y +selector:=log_only; log_opened:=true; +@z +@x module 789 +begin if interaction + print_file_name(cur_name,cur_area,cur_ext); print("'.");@/ + job_name:=0; history:=fatal_error_stop; jump_out; + end; {abort the program without a log file} +@y +begin selector:=term_only; +@z +@x module 1023 [this change is optional, but it's a slight improvement] + if job_name<>0 then selector:=selector+2; +@y + if log_opened then selector:=selector+2; +@z +@x module 1205 +if job_name>0 then +@y +if log_opened then +@z +@x module 1208 +if job_name>0 then {the log file is open} +@y +if log_opened then +@z + +547. String startup problems corresponding to TeX change 355 (17 Jul 89) +@x module 30 (Warning: This affects most change files!) + overflow("buffer size",buf_size); +@:METAFONT capacity exceeded buffer size}{\quad buffer size@> +@y + @; +@z +@x module 34 +consist of the remainder of the command line, after the part that invoked \MF. +@y +consist of the remainder of the command line, after the part that invoked \MF. + +The first line is special also because it may be read before \MF\ has +input a base file. In such cases, normal error messages cannot yet +be given. The following code uses concepts that will be explained later. + +@= +if base_ident=0 then + begin write_ln(term_out,'Buffer size exceeded!'); goto final_end; +@.Buffer size exceeded@> + end +else begin cur_input.loc_field:=first; cur_input.limit_field:=last-1; + overflow("buffer size",buf_size); +@:METAFONT capacity exceeded buffer size}{\quad buffer size@> + end +@z +@x module 1193 +k:=pool_ptr-4; undump_four_ASCII +@y +k:=pool_ptr-4; undump_four_ASCII; +init_str_ptr:=str_ptr; init_pool_ptr:=pool_ptr;@/ +max_str_ptr:=str_ptr; max_pool_ptr:=pool_ptr +@z +@x module 1204 +tini@/ +@y +init_str_ptr:=str_ptr; init_pool_ptr:=pool_ptr;@/ +max_str_ptr:=str_ptr; max_pool_ptr:=pool_ptr; fix_date_and_time; +tini@/ +@z +@x module 1204 +init_str_ptr:=str_ptr; init_pool_ptr:=pool_ptr;@/ +max_str_ptr:=str_ptr; max_pool_ptr:=pool_ptr;@/ +@y +@z + +548. Major changes to allow 8-bit input, cf. TeX82 #359 (11 Sep 89). +@x module 18 +@!ASCII_code=0..127; {seven-bit numbers} +@y +@!ASCII_code=0..255; {eight-bit numbers} +@z +@x module 19 +@d last_text_char=127 {ordinal number of the largest element of |text_char|} + +@= +@!i:0..last_text_char; +@y +@d last_text_char=255 {ordinal number of the largest element of |text_char|} + +@= +@!i:integer; +@z +@x module 21 +xchr[0]:=' '; xchr[@'177]:=' '; + {ASCII codes 0 and |@'177| do not appear in text} +@y +@z +@x module 22 +for i:=1 to @'37 do xchr[i]:=' '; +@y changing ' ' to chr(i) here will allow all 8-bit characters to get in +for i:=0 to @'37 do xchr[i]:=' '; +for i:=@'177 to @'377 do xchr[i]:=' '; +@z +@x module 23 +for i:=1 to @'176 do xord[xchr[i]]:=i; +@y +for i:=@'200 to @'377 do xord[xchr[i]]:=i; +for i:=0 to @'176 do xord[xchr[i]]:=i; +@z +@x module 37 +@= +@!pool_pointer = 0..pool_size; {for variables that point into |str_pool|} +@!str_number = 0..max_strings; {for variables that point into |str_start|} + +@ @= +@!str_pool:packed array[pool_pointer] of ASCII_code; {the characters} +@y [OK to make si(#)==#-128 and so(#)==#+128 (without parens) in change files] +Some \PASCAL\ compilers won't pack integers into a single byte unless the +integers lie in the range |-128..127|. To accommodate such systems +we access the string pool only via macros that can easily be redefined. + +@d si(#) == # {convert from |ASCII_code| to |packed_ASCII_code|} +@d so(#) == # {convert from |packed_ASCII_code| to |ASCII_code|} + +@= +@!pool_pointer = 0..pool_size; {for variables that point into |str_pool|} +@!str_number = 0..max_strings; {for variables that point into |str_start|} +@!packed_ASCII_code = 0..255; {elements of |str_pool| array} + +@ @= +@!str_pool:packed array[pool_pointer] of packed_ASCII_code; {the characters} +@z +@x module 41 +begin str_pool[pool_ptr]:=#; incr(pool_ptr); +@y +begin str_pool[pool_ptr]:=si(#); incr(pool_ptr); +@z +@x module 45 + begin if str_pool[j]<>buffer[k] then +@y + begin if so(str_pool[j])<>buffer[k] then +@z +@x module 47 +var k,@!l:0..127; {small indices or counters} +@y +var k,@!l:0..255; {small indices or counters} +@z +@x module 47 +@; +@y +@; +@z +@x module 48 +@ @= +for k:=0 to 127 do + begin if (@) then + begin append_char("^"); append_char("^"); + if k<@'100 then append_char(k+@'100) + else append_char(k-@'100); +@y +@ @d app_lc_hex(#)==l:=#; + if l<10 then append_char(l+"0)@+else append_char(l-10+"a") + +@= +for k:=0 to 255 do + begin if (@) then + begin append_char("^"); append_char("^"); + if k<@'100 then append_char(k+@'100) + else if k<@'200 then append_char(k-@'100) + else begin app_lc_hex(k div 16); app_lc_hex(k mod 16); + end; +@z +@x module 59 + begin print_char(str_pool[j]); incr(j); +@y + begin print_char(so(str_pool[j])); incr(j); +@z +@x module 60 + begin print(str_pool[j]); incr(j); +@y + begin print(so(str_pool[j])); incr(j); +@z +@x module 85 + begin if str_pool[j]<>"%" then print(str_pool[j]) + else if j+1=str_start[err_help+1] then print_ln + else if str_pool[j+1]<>"%" then print_ln +@y + begin if str_pool[j]<>si("%") then print(so(str_pool[j])) + else if j+1=str_start[err_help+1] then print_ln + else if str_pool[j+1]<>si("%") then print_ln +@z +@x module 199 +char_class[127]:=invalid_class; +@y +for k:=127 to 255 do char_class[k]:=invalid_class; +@z +@x module 200 +@d hash_is_full == (hash_used=1) {test if all positions are occupied} +@d eq_type(#) == eqtb[#].lh {the current ``meaning'' of a symbolic token} +@d equiv(#) == eqtb[#].rh {parametric part of a token's meaning} +@d hash_base=129 {hashing actually starts here} +@y [incidentally I fixed a bug re hash overflow here] +@d eq_type(#) == eqtb[#].lh {the current ``meaning'' of a symbolic token} +@d equiv(#) == eqtb[#].rh {parametric part of a token's meaning} +@d hash_base=257 {hashing actually starts here} +@d hash_is_full == (hash_used=hash_base) {are all positions occupied?} +@z +@x module 210 +for j:=0 to l-1 do buffer[j]:=str_pool[k+j]; +cur_sym:=id_lookup(0,l);@/ +if s>=128 then {we don't want to have the string twice} +@y +for j:=0 to l-1 do buffer[j]:=so(str_pool[k+j]); +cur_sym:=id_lookup(0,l);@/ +if s>=256 then {we don't want to have the string twice} +@z +@x module 223 +begin c:=char_class[str_pool[str_start[r]]]; +@y +begin c:=char_class[so(str_pool[str_start[r]])]; +@z +@x module 717 + begin buffer[first]:=str_pool[j]; incr(j); incr(first); +@y + begin buffer[first]:=so(str_pool[j]); incr(j); incr(first); +@z +@x module 774 +for j:=str_start[a] to str_start[a+1]-1 do append_to_name(str_pool[j]); +for j:=str_start[n] to str_start[n+1]-1 do append_to_name(str_pool[j]); +for j:=str_start[e] to str_start[e+1]-1 do append_to_name(str_pool[j]); +@y +for j:=str_start[a] to str_start[a+1]-1 do append_to_name(so(str_pool[j])); +for j:=str_start[n] to str_start[n+1]-1 do append_to_name(so(str_pool[j])); +for j:=str_start[e] to str_start[e+1]-1 do append_to_name(so(str_pool[j])); +@z +@x module 912 + else begin cur_exp:=round_unscaled(cur_exp) mod 128; cur_type:=string_type; + if cur_exp<0 then cur_exp:=cur_exp+128; +@y + else begin cur_exp:=round_unscaled(cur_exp) mod 256; cur_type:=string_type; + if cur_exp<0 then cur_exp:=cur_exp+256; +@z +@x module 913 + else n:=str_pool[str_start[cur_exp]] +@y + else n:=so(str_pool[str_start[cur_exp]]) +@z +@x ibid + begin m:=str_pool[k]; +@y + begin m:=so(str_pool[k]); +@z +@x module 976 +for k:=str_start[a] to str_start[a+1]-1 do append_char(str_pool[k]); +for k:=str_start[b] to str_start[b+1]-1 do append_char(str_pool[k]); +@y +for k:=str_start[a] to str_start[a+1]-1 do append_char(so(str_pool[k])); +for k:=str_start[b] to str_start[b+1]-1 do append_char(so(str_pool[k])); +@z +@x module 977 + for k:=str_start[s]+b-1 downto str_start[s]+a do append_char(str_pool[k]) +else for k:=str_start[s]+a to str_start[s]+b-1 do append_char(str_pool[k]); +@y + for k:=str_start[s]+b-1 downto str_start[s]+a do append_char(so(str_pool[k])) +else for k:=str_start[s]+a to str_start[s]+b-1 do append_char(so(str_pool[k])); +@z +@x module 1103 + begin c:=str_pool[str_start[cur_exp]]; goto found; +@y + begin c:=so(str_pool[str_start[cur_exp]]); goto found; +@z +@x module 1160 + for k:=str_start[s] to str_start[s+1]-1 do gf_out(str_pool[k]); + end; +if t<>0 then for k:=str_start[t] to str_start[t+1]-1 do gf_out(str_pool[k]); +@y + for k:=str_start[s] to str_start[s+1]-1 do gf_out(so(str_pool[k])); + end; +if t<>0 then for k:=str_start[t] to str_start[t+1]-1 do gf_out(so(str_pool[k])); +@z +@x module 1192 + w.b0:=str_pool[k]; w.b1:=str_pool[k+1]; + w.b2:=str_pool[k+2]; w.b3:=str_pool[k+3]; +@y [often qi(so(x))=x, but not e.g. when "quarterwords" are two bytes] + w.b0:=qi(so(str_pool[k])); w.b1:=qi(so(str_pool[k+1])); + w.b2:=qi(so(str_pool[k+2])); w.b3:=qi(so(str_pool[k+3])); +@z +@x module 1193 + str_pool[k]:=w.b0; str_pool[k+1]:=w.b1; + str_pool[k+2]:=w.b2; str_pool[k+3]:=w.b3 +@y + str_pool[k]:=si(qo(w.b0)); str_pool[k+1]:=si(qo(w.b1)); + str_pool[k+2]:=si(qo(w.b2)); str_pool[k+3]:=si(qo(w.b3)) +@z + +549. Make ".base" more easily switchable (see TeX82 log #369). +@x module 775 gets a new definition +@y +@d base_extension=".base" {the extension, as a \.{WEB} constant} +@z now replace ".base" by base_extension in modules 784 and 1200. + +550. "This can't happen" happened because of nonmonotonic rounding + (bug found by Mark Eklof, fixed 7 Oct 89) +@x module 411 +left_x(r):=x_coord(r); +@y +left_x(r):=x_coord(r); +if right_x(p)>x_coord(r) then right_x(p):=x_coord(r); + {we always have |x_coord(p)<=right_x(p)|} +@z +@x ibid +else if x_coord(r)>dest_x then x_coord(r):=dest_x; +@y +else begin if x_coord(r)>dest_x then + begin x_coord(r):=dest_x; left_x(r):=-x_coord(r); right_x(r):=x_coord(r); + end; + if left_x(q)>dest_x then left_x(q):=dest_x + else if left_x(q)x_coord(s) then left_x(q):=-x_coord(s) +else negate(left_x(q)); +negate(x_coord(s)); right_x(s):=x_coord(s); +@z +@x module 415 +if x_coord(r)>dest_x then x_coord(r):=dest_x +else if x_coord(r)y_coord(r) then right_y(pp):=y_coord(r); + {we always have |y_coord(pp)<=right_y(pp)|} +@z +@x ibid +else if y_coord(r)>dest_y then y_coord(r):=dest_y; +@y +else begin if y_coord(r)>dest_y then + begin y_coord(r):=dest_y; left_y(r):=-y_coord(r); right_y(r):=y_coord(r); + end; + if left_y(qq)>dest_y then left_y(qq):=dest_y + else if left_y(qq)dest_x then x_coord(s):=dest_x +else if x_coord(s)y_coord(s) then left_y(qq):=-y_coord(s) +else negate(left_y(qq)); +negate(y_coord(s)); right_y(s):=y_coord(s); +@z +@x module 424 +if y_coord(r)>dest_y then y_coord(r):=dest_y +else if y_coord(r)dest_x+dest_y then + begin y_coord(r):=dest_x+dest_y-x_coord(p); + if left_y(r)>y_coord(r) then + begin left_y(r):=y_coord(r); + if right_y(p)>y_coord(r) then right_y(p):=y_coord(r); + end; + end; +if x_coord(r)dest_x+dest_y then + x_coord(r):=dest_x+dest_y-y_coord(r); +left_x(r):=x_coord(r); +if right_x(p)>x_coord(r) then right_x(p):=x_coord(r); + {we always have |x_coord(p)<=right_x(p)|} +y_coord(r):=y_coord(r)+x_coord(r); right_y(r):=right_y(r)+x_coord(r);@/ +negate(x_coord(r)); right_x(r):=x_coord(r);@/ +left_y(q):=left_y(q)+left_x(q); negate(left_x(q));@/ +dest_y:=dest_y+dest_x; negate(dest_x); +if right_y(r)>dest_y then right_y(r):=dest_y; +if left_y(q)>dest_y then left_y(q):=dest_y +else if left_y(q)left_y(q) then right_y(r):=left_y(q); +@z +@x ibid +else if x_coord(r)>dest_x then x_coord(r):=dest_x +@y +else begin if x_coord(r)>dest_x then + begin x_coord(r):=dest_x; left_x(r):=-x_coord(r); right_x(r):=x_coord(r); + end; + if left_x(q)>dest_x then left_x(q):=dest_x + else if left_x(q)= +begin split_cubic(r,t,dest_x,dest_y); s:=link(r);@/ +if x_coord(r)+y_coord(s)>dest_x+dest_y then + begin y_coord(s):=dest_x+dest_y-x_coord(r); + if left_y(s)>y_coord(s) then + begin left_y(s):=y_coord(s); + if right_y(r)>y_coord(s) then right_y(r):=y_coord(s); + end; + end; +if x_coord(s)+y_coord(s)>dest_x+dest_y then x_coord(s):=dest_x+dest_y-y_coord(s) +else begin if x_coord(s)x_coord(s) then + begin left_y(q):=left_y(q)+x_coord(s); left_x(q):=-x_coord(s);@+end +else begin left_y(q):=left_y(q)+left_x(q); negate(left_x(q));@+end; +y_coord(s):=y_coord(s)+x_coord(s); right_y(s):=right_y(s)+x_coord(s);@/ +negate(x_coord(s)); right_x(s):=x_coord(s);@/ +dest_y:=dest_y+dest_x; +if right_y(s)>dest_y then right_y(s):=dest_y; +if left_y(q)>dest_y then left_y(q):=dest_y +else if left_y(q)left_y(q) then right_y(s):=left_y(q); +end +@z + +551. Major change for extended ligatures. +@x module 11 (this may affect change files) +@!lig_table_size=300; {maximum number of ligature/kern steps} +@y +@!lig_table_size=5000; {maximum number of ligature/kern steps, must be + at least 255 and at most 32510} +@!max_kerns=500; {maximum number of distinct kern amounts} +@z +@x module 14 gets a new line of code +@y +if(lig_table_size<255)or(lig_table_size>32510)then bad:=7; +@z +@x module 186 +@d lig_kern_token=76 {the operators `\&{kern}' and `\.{=:}'} +@d assignment=77 {the operator `\.{:=}'} +@d colon=78 {the operator `\.:'} +@# +@d comma=79 {the operator `\.,'} +@d end_of_statement==cur_cmd>comma +@d semicolon=80 {the operator `\.;', must be |comma+1|} +@d end_group=81 {end a group (\&{endgroup}), must be |semicolon+1|} +@d stop=82 {end a job (\&{end}, \&{dump}), must be |end_group+1|} +@y +@d lig_kern_token=76 + {the operators `\&{kern}' and `\.{=:}' and `\.{=:\char'174}, etc.} +@d assignment=77 {the operator `\.{:=}'} +@d skip_to=78 {the operation `\&{skipto}'} +@d bchar_label=79 {the operator `\.{\char'174\char'174:}'} +@d double_colon=80 {the operator `\.{::}'} +@d colon=81 {the operator `\.:'} +@# +@d comma=82 {the operator `\.,', must be |colon+1|} +@d end_of_statement==cur_cmd>comma +@d semicolon=83 {the operator `\.;', must be |comma+1|} +@d end_group=84 {end a group (\&{endgroup}), must be |semicolon+1|} +@d stop=85 {end a job (\&{end}, \&{dump}), must be |end_group+1|} +@z +@x module 190 +@d max_given_internal=warning_check +@y +@d boundary_char=41 {the right boundary character for ligatures} +@d max_given_internal=41 +@z +@x module 192 gets two new lines of code +@y +primitive("boundarychar",internal_quantity,boundary_char);@/ +@!@:boundary_char_}{\&{boundarychar} primitive@> +@z +@x and module 193 gets one too +@y +int_name[boundary_char]:="boundarychar"; +@z +@x and module 211 gets several +@y (to be inserted in appropriate places) +primitive("::",double_colon,0); +@!@::: }{\.{::} primitive@> +primitive("||:",bchar_label,0); +@!@:::: }{\.{\char'174\char'174:} primitive@> +primitive("skipto",skip_to,0);@/ +@!@:skip_to_}{\&{skipto} primitive@> +@z +@x as does module 212 +@y +bchar_label:print("||:"); +double_colon:print("::"); +skip_to:print("skipto"); +@z +@x module 1093 has new text (see TeX change 362 for module 545) and also this: +@d stop_bit(#)==lig_kern[#].b0 +@d next_char(#)==lig_kern[#].b1 +@d op_bit(#)==lig_kern[#].b2 +@y +@d skip_byte(#)==lig_kern[#].b0 +@d next_char(#)==lig_kern[#].b1 +@d op_byte(#)==lig_kern[#].b2 +@z +@x module 1096 gets a new definition +@y +@d undefined_label==lig_table_size {an undefined local label} +@z +@x ...and some changed declarations +@!char_remainder:array[eight_bits] of eight_bits; {the |remainder| byte} +@!header_byte:array[1..header_size] of -1..255; + {bytes of the \.{TFM} header, or $-1$ if unset} +@!lig_kern:array[0..lig_table_size] of four_quarters; {the ligature/kern table} +@!nl:0..lig_table_size; {the number of ligature/kern steps so far} +@!kern:array[eight_bits] of scaled; {distinct kerning amounts} +@!nk:0..256; {the number of distinct kerns so far} +@y +@!char_remainder:array[eight_bits] of 0..lig_table_size; {the |remainder| byte} +@!header_byte:array[1..header_size] of -1..255; + {bytes of the \.{TFM} header, or $-1$ if unset} +@!lig_kern:array[0..lig_table_size] of four_quarters; {the ligature/kern table} +@!nl:0..32767-256; {the number of ligature/kern steps so far} +@!kern:array[0..max_kerns] of scaled; {distinct kerning amounts} +@!nk:0..max_kerns; {the number of distinct kerns so far} +@z +@x ...and some new declarations +@y +@!skip_table:array[eight_bits] of 0..lig_table_size; {local label status} +@!lk_started:boolean; {has there been a lig/kern step in this command yet?} +@!bchar:integer; {right boundary character} +@!bch_label:0..lig_table_size; {left boundary starting location} +@!ll,@!lll:0..lig_table_size; {registers used for lig/kern processing} +@!label_loc:array[0..256] of -1..lig_table_size; {lig/kern starting addresses} +@!label_char:array[1..256] of eight_bits; {characters for |label_loc|} +@!label_ptr:0..256; {highest position occupied in |label_loc|} +@z +@x module 1097 + end; +for k:=1 to header_size do header_byte[k]:=-1; +bc:=255; ec:=0; nl:=0; nk:=0; ne:=0; np:=0; +@y + skip_table[k]:=undefined_label; + end; +for k:=1 to header_size do header_byte[k]:=-1; +bc:=255; ec:=0; nl:=0; nk:=0; ne:=0; np:=0;@/ +internal[boundary_char]:=-unity; +bch_label:=undefined_label;@/ +label_loc[0]:=-1; label_ptr:=0; +@z +@x module 1104 +procedure set_tag(@!c:eight_bits;@!t:small_number;@!r:eight_bits); +begin if char_tag[c]=no_tag then + begin char_tag[c]:=t; char_remainder[c]:=r; +@y +procedure set_tag(@!c:halfword;@!t:small_number;@!r:halfword); +begin if char_tag[c]=no_tag then + begin char_tag[c]:=t; char_remainder[c]:=r; + if t=lig_tag then + begin incr(label_ptr); label_loc[label_ptr]:=r; label_char[label_ptr]:=c; + end; +@z +@x module 1105 +if (c>" ")and(c<128) then print(c) +@y +if (c>" ")and(c<127) then print(c) +else if c=256 then print("||") +@z +@x module 1106 +label continue; +var @!c,@!cc:eight_bits; {character codes} +@!k:0..256; {index into the |kern| array} +@y +label continue,done; +var @!c,@!cc:0..256; {character codes} +@!k:0..max_kerns; {index into the |kern| array} +@z +% also the previous code of module 1107 is inserted into 1106 +@x modules 1107--1111 are completely replaced +@y by the following new code: +@ @= +begin lk_started:=false; +continue: get_x_next; +if(cur_cmd=skip_to)and lk_started then + @; +if cur_cmd=bchar_label then + begin c:=256; cur_cmd:=colon;@+end +else begin back_input; c:=get_code;@+end; +if(cur_cmd=colon)or(cur_cmd=double_colon)then + @; +if cur_cmd=lig_kern_token then @ +else begin print_err("Illegal ligtable step"); +@.Illegal ligtable step@> + help1("I was looking for `=:' or `kern' here."); + back_error; next_char(nl):=qi(0); op_byte(nl):=qi(0); rem_byte(nl):=qi(0);@/ + skip_byte(nl):=stop_flag+1; {this specifies an unconditional stop} + end; +if nl=lig_table_size then overflow("ligtable size",lig_table_size); +@:METAFONT capacity exceeded ligtable size}{\quad ligtable size@> +incr(nl); +if cur_cmd=comma then goto continue; +if skip_byte(nl-1)= +primitive("=:",lig_kern_token,0); +@!@:=:_}{\.{=:} primitive@> +primitive("=:|",lig_kern_token,1); +@!@:=:/_}{\.{=:\char'174} primitive@> +primitive("=:|>",lig_kern_token,5); +@!@:=:/>_}{\.{=:\char'174>} primitive@> +primitive("|=:",lig_kern_token,2); +@!@:=:/_}{\.{\char'174=:} primitive@> +primitive("|=:>",lig_kern_token,6); +@!@:=:/>_}{\.{\char'174=:>} primitive@> +primitive("|=:|",lig_kern_token,3); +@!@:=:/_}{\.{\char'174=:\char'174} primitive@> +primitive("|=:|>",lig_kern_token,7); +@!@:=:/>_}{\.{\char'174=:\char'174>} primitive@> +primitive("|=:|>>",lig_kern_token,11); +@!@:=:/>_}{\.{\char'174=:\char'174>>} primitive@> +primitive("kern",lig_kern_token,128); +@!@:kern_}{\&{kern} primitive@> + +@ @= +lig_kern_token: case m of +0:print("=:"); +1:print("=:|"); +2:print("|=:"); +3:print("|=:|"); +5:print("=:|>"); +6:print("|=:>"); +7:print("|=:|>"); +11:print("|=:|>>"); +othercases print("kern") +endcases; + +@ Local labels are implemented by maintaining the |skip_table| array, +where |skip_table[c]| is either |undefined_label| or the address of the +most recent lig/kern instruction that skips to local label~|c|. In the +latter case, the |skip_byte| in that instruction will (temporarily) +be zero if there were no prior skips to this label, or it will be the +distance to the prior skip. + +We may need to cancel skips that span more than 127 lig/kern steps. + +@d cancel_skips(#)==ll:=#; + repeat lll:=qo(skip_byte(ll)); skip_byte(ll):=stop_flag; ll:=ll-lll; + until lll=0 +@d skip_error(#)==begin print_err("Too far to skip"); +@.Too far to skip@> + help1("At most 127 lig/kern steps can separate skipto1 from 1::."); + error; cancel_skips(#); + end + +@= +begin c:=get_code; +if nl-skip_table[c]>128 then {|skip_table[c]<= +begin if cur_cmd=colon then + if c=256 then bch_label:=nl + else set_tag(c,lig_tag,nl) +else if skip_table[c]128 then + begin skip_error(ll); goto continue; + end; + skip_byte(ll):=qi(nl-ll-1); ll:=ll-lll; + until lll=0; + end; +goto continue; +end +@x module 1112 +next_char(nl):=qi(c); op_bit(nl):=qi(cur_mod); stop_bit(nl):=qi(0); +if cur_mod=0 then rem_byte(nl):=qi(get_code) +@y +begin next_char(nl):=qi(c); skip_byte(nl):=qi(0); +if cur_mod<128 then {ligature op} + begin op_byte(nl):=qi(cur_mod); rem_byte(nl):=qi(get_code); + end +@z +@x ibid + begin if nk=256 then overflow("kern",256); +@:METAFONT capacity exceeded kern}{\quad kern@> + incr(nk); + end; + rem_byte(nl):=qi(k); + end +@y + begin if nk=max_kerns then overflow("kern",max_kerns); +@:METAFONT capacity exceeded kern}{\quad kern@> + incr(nk); + end; + op_byte(nl):=kern_flag+(k div 256); + rem_byte(nl):=qi((k mod 256)); + end; +lk_started:=true; +end +@z +@x module 1135 +tfm_two(6+lh+(ec-bc+1)+nw+nh+nd+ni+nl+nk+ne+np); + {this is the total number of file words that will be output} +tfm_two(lh); tfm_two(bc); tfm_two(ec); tfm_two(nw); tfm_two(nh); +tfm_two(nd); tfm_two(ni); tfm_two(nl); tfm_two(nk); tfm_two(ne); tfm_two(np); +@y +@; +tfm_two(6+lh+(ec-bc+1)+nw+nh+nd+ni+nl+lk_offset+nk+ne+np); + {this is the total number of file words that will be output} +tfm_two(lh); tfm_two(bc); tfm_two(ec); tfm_two(nw); tfm_two(nh); +tfm_two(nd); tfm_two(ni); tfm_two(nl+lk_offset); tfm_two(nk); tfm_two(ne); +tfm_two(np); +@z +% modules 1137&1138 are combined into a single module +% and so are modules 1140--1141, to make room for two new modules. +@x module 1136 is moved to after old module 1141 +@y and changed to the following code: +@ @= +if bch_label= +bchar:=round_unscaled(internal[boundary_char]); +if(bchar<0)or(bchar>255)then + begin bchar:=-1; lk_started:=false; lk_offset:=0;@+end +else begin lk_started:=true; lk_offset:=1;@+end; +@; +if bch_label= +k:=label_ptr; {pointer to the largest unallocated label} +if label_loc[k]+lk_offset>255 then + begin lk_offset:=0; lk_started:=false; {location 0 can do double duty} + repeat char_remainder[label_char[k]]:=lk_offset; + while label_loc[k-1]=label_loc[k] do + begin decr(k); char_remainder[label_char[k]]:=lk_offset; + end; + incr(lk_offset); decr(k); + until lk_offset+label_loc[k]<256; + {N.B.: |lk_offset=256| satisfies this when |k=0|} + end; +if lk_offset>0 then + while k>0 do + begin char_remainder[label_char[k]] + :=char_remainder[label_char[k]]+lk_offset; + decr(k); + end + +@ @= +for k:=0 to 255 do if skip_table[k] + cancel_skips(skip_table[k]); + end; +if lk_started then {|lk_offset=1| for the special |bchar|} + begin tfm_out(255); tfm_out(bchar); tfm_two(0); + end +else for k:=1 to lk_offset do {output the redirection specs} + begin ll:=label_loc[label_ptr]; + if bchar<0 then + begin tfm_out(254); tfm_out(0); + end + else begin tfm_out(255); tfm_out(bchar); + end; + tfm_two(ll+lk_offset); + repeat decr(label_ptr); + until label_loc[label_ptr]token_list then + @ +else begin lhs:=cur_exp; cur_path_type:=cur_mod;@/ + cur_type:=vacuous; get_x_next; scan_expression; + if cur_path_type=also_code then @ +@y +@!add_to_type:double_path_code..also_code; {modifier of \&{addto}} +begin get_x_next; var_flag:=thing_to_add; scan_primary; +if cur_type<>token_list then + @ +else begin lhs:=cur_exp; add_to_type:=cur_mod;@/ + cur_type:=vacuous; get_x_next; scan_expression; + if add_to_type=also_code then @ +@z +@x module 1064 +else begin lhs:=null; +@y +else begin lhs:=null; cur_path_type:=add_to_type; +@z + +554. Balance the parens showing on the terminal (for Lispers). +@x module 631 +@!in_open : 0..max_in_open; {the number of lines in the buffer, less one} +@y +@!in_open : 0..max_in_open; {the number of lines in the buffer, less one} +@!open_parens : 0..max_in_open; {the number of open text files} +@z +@x module 657 +in_open:=0; max_buf_stack:=0; +@y +in_open:=0; open_parens:=0; max_buf_stack:=0; +@z +@x module 681 + begin print_char(")"); force_eof:=false; + update_terminal; {show user that file has been read} +@y + begin print_char(")"); decr(open_parens); + update_terminal; {show user that file has been read} + force_eof:=false; +@z +@x module 793 +print_char("("); print(name); update_terminal; +@y +print_char("("); incr(open_parens); print(name); update_terminal; +@z +@x module 1209 +if job_name=0 then open_log_file; +@y +if job_name=0 then open_log_file; +while open_parens>0 do + begin print(" )"); decr(open_parens); + end; +@z + +-----------Here I draw the line with respect to further changes + +555. Don't try system area if an area was given (see tex82.bug number 312; +found by Jonathan Kew, May 1990) +@x + pack_file_name(cur_name,MF_area,cur_ext); + if a_open_in(cur_file) then goto done; +@y + if cur_area="" then + begin pack_file_name(cur_name,MF_area,cur_ext); + if a_open_in(cur_file) then goto done; + end; +@z + +556. Report correct line number when buffer overflows (CET, Jul 90). +@x module 794 +begin if not input_ln(cur_file,false) then do_nothing; +firm_up_the_line; +buffer[limit]:="%"; first:=limit+1; loc:=start; line:=1; +@y +begin line:=1; +if input_ln(cur_file,false) then do_nothing; +firm_up_the_line; +buffer[limit]:="%"; first:=limit+1; loc:=start; +@z + +557. (I sincerely hope that there won't be any more) diff --git a/info/digests/tex-implementors/tex.dif b/info/digests/tex-implementors/tex.dif new file mode 100644 index 0000000000..fe3c882a07 --- /dev/null +++ b/info/digests/tex-implementors/tex.dif @@ -0,0 +1,801 @@ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 + 8 % TeX is a trademark of the American Mathematical Society. + 9 % METAFONT is a tradement of Addison-Wesley Publishing Company. + 11 % Version 0 was released in September 1982 after it passed a variety of tests. +****** +File DRB0:[BELL.WEB]TEX.WEB;1 + 8 % Version 0 was released in September 1982 after it passed a variety of tests. +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 + 19 % Version 2.1 corrects anomalies in discretionary breaks (January 1987). + 20 % Version 2.2 corrects "(Please type...)" with null \endlinechar (April 1987). + 21 % Version 2.3 avoids incomplete page in premature termination (August 1987). + 22 % Version 2.4 fixes \noaligned rules in indented displays (August 1987). + 23 % Version 2.5 saves cur_order when expanding tokens (September 1987). + 24 % Version 2.6 adds 10sp slop when shipping leaders (November 1987). + 25 % Version 2.7 improves rounding of negative-width characters (November 1987). + 27 % A reward of $40.96 will be paid to the first finder of any remaining bug. + 28 % (This amount will double again in 1988.) + 30 % Although considerable effort has been expended to make the TeX program +****** +File DRB0:[BELL.WEB]TEX.WEB;1 + 17 % A reward of $10.24 will be paid to the first finder of any remaining bug. + 18 % (This amount will double again in 1986.) + 20 % Although considerable effort has been expended to make the TeX program +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 + 48 \chardef\%=`\% + 50 \def\(#1){} % this is used to make section names sort themselves better +****** +File DRB0:[BELL.WEB]TEX.WEB;1 + 39 \def\(#1){} % this is used to make section names sort themselves better +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 + 166 @d banner=='This is TeX, Version 2.7' {printed when \TeX\ starts} + 168 @ Different \PASCAL s have slightly different conventions, and the present +****** +File DRB0:[BELL.WEB]TEX.WEB;1 + 155 @d banner=='This is TeX, Version 2.0' {printed when \TeX\ starts} + 157 @ Different \PASCAL s have slightly different conventions, and the present +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 + 437 if max_in_open>=128 then bad:=6; + 439 @ Labels are given symbolic names by the following definitions, so that +****** +File DRB0:[BELL.WEB]TEX.WEB;1 + 427 @ Labels are given symbolic names by the following definitions, so that +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 + 779 The `\\{name}' parameter, which is of type `{\bf packed array + 780 $[\langle\\{any}\rangle]$ of \\{char}}', stands for the name of + 781 the external file that is being opened for input or output. +****** +File DRB0:[BELL.WEB]TEX.WEB;1 + 767 The `\\{name}' parameter, which is of type `\ignorespaces|packed + 768 array[@t\<\\{any}>@>] of text_char|', stands for the name of + 769 the external file that is being opened for input or output. +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 + 873 file into available positions of the buffer array and returns the value + 874 |true|, unless the file has already been entirely read, in which case it +****** +File DRB0:[BELL.WEB]TEX.WEB;1 + 861 field into available positions of the buffer array and returns the value + 862 |true|, unless the file has already been entirely read, in which case it +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 + 1734 when |get_token| is being used to delete a token, and/or if some fatal error + 1735 occurs while \TeX\ is trying to fix a non-fatal one. But such recursion + 1736 @^recursion@> + 1737 is never more than two levels deep. + 1739 @= +****** +File DRB0:[BELL.WEB]TEX.WEB;1 + 1722 when |get_token| is being used to delete a token, or if some fatal error + 1723 occurs while \TeX\ is trying to fix a non-fatal one. But such recursion + 1724 @^recursion@> + 1725 is never more than one level deep. + 1727 @= +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 + 2524 done, i.e., if |hi_mem_min=lo_mem_max+1|, we have to quit. + 2526 @p function get_avail : pointer; {single-word node allocation} +****** +File DRB0:[BELL.WEB]TEX.WEB;1 + 2512 done, i.e., if |hi_mem_min=low_mem_max+1|, we have to quit. + 2514 @p function get_avail : pointer; {single-word node allocation} +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 + 2674 if r=p then if rlink(p)<>p then + 2675 @; +****** +File DRB0:[BELL.WEB]TEX.WEB;1 + 2662 if r=p then if ((rlink(p)<>rover) or (llink(p)<>rover)) then + 2663 @; +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 + 2777 entries: The first of these has |font=font_base|, and its |link| points + 2778 to the second; + 2779 the second identifies the font and the character dimensions. + 2780 The saving feature about oriental characters is that most of them have + 2781 the same box dimensions. The |character| field of the first |char_node| + 2782 is a ``\\{charext}'' that distinguishes between graphic symbols whose + 2783 dimensions are identical for typesetting purposes. (See the \MF\ manual.) + 2784 Such an extension of \TeX\ would not be difficult; further details are + 2785 left to the reader. + 2787 In order to make sure that the |character| code fits in a quarterword, +****** +File DRB0:[BELL.WEB]TEX.WEB;1 + 2765 entries: The first of these would identify the font and the character + 2766 dimensions, and it would also link to the second, where the full halfword + 2767 |info| field would address the desired character. Such an extension of + 2768 \TeX\ would not be difficult; further details are left to the reader. + 2769 The saving feature about oriental characters is that most of them have + 2770 the same box dimensions. + 2772 In order to make sure that the |character| code fits in a quarterword, +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 + 2837 The |subtype| field is set to |min_quarterword|, since that's the desired + 2838 |span_count| value if this |hlist_node| is changed to an |unset_node|. +****** +File DRB0:[BELL.WEB]TEX.WEB;1 + 2822 The |subtype| field is set to |min_quarterword|, since that' the desired + 2823 |span_count| value if this |hlist_node| is changed to an |unset_node|. +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 + 3213 harmless to let |lig_trick| and |garbage| share the same location of |mem|. + 3215 @d zero_glue==mem_bot {specification for \.{0pt plus 0pt minus 0pt}} +****** +File DRB0:[BELL.WEB]TEX.WEB;1 + 3198 harmless to let |lig_trick|, |garbage|, and |backup_head| share the same + 3199 location of |mem|. + 3201 @d zero_glue==mem_bot {specification for \.{0pt plus 0pt minus 0pt}} +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 + 3290 {previous |mem_end|, |lo_mem_max|, and |hi_mem_min|} + 3291 @t\hskip1em@>@!panicking:boolean; {do we want to check memory constantly?} +****** +File DRB0:[BELL.WEB]TEX.WEB;1 + 3276 {previous |mem_end|, |lo_mem_max|,and |hi_mem_min|} + 3277 @t\hskip1em@>@!panicking:boolean; {do we want to check memory constantly?} +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 + 3441 begin while p>mem_min do + 3442 begin if is_char_node(p) then +****** +File DRB0:[BELL.WEB]TEX.WEB;1 + 3427 begin while p>null do + 3428 begin if is_char_node(p) then +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 + 3577 @p procedure show_node_list(@!p:integer); {prints a node list symbolically} + 3578 label exit; +****** +File DRB0:[BELL.WEB]TEX.WEB;1 + 3563 @p procedure show_node_list(@!p:pointer); {prints a node list symbolically} + 3564 label exit; +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 + 3587 while p>mem_min do + 3588 begin print_ln; print_current_string; {display the nesting history} +****** +File DRB0:[BELL.WEB]TEX.WEB;1 + 3573 while p>null do + 3574 begin print_ln; print_current_string; {display the nesting history} +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 + 3961 @d relax=0 {do nothing ( \.{\\relax} )} + 3962 @d left_brace=1 {beginning of a group ( \.\{ )} +****** +File DRB0:[BELL.WEB]TEX.WEB;1 + 3947 @d relax=0 { do nothing ( \.{\\relax} )} + 3948 @d left_brace=1 {beginning of a group ( \.\{ )} +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 + 4091 than |max_command| so that their special nature is easily discernible. + 4092 The ``expandable'' commands come first. +****** +File DRB0:[BELL.WEB]TEX.WEB;1 + 4077 than |max_command| so that their special nature is easily discernable. + 4078 The ``expandable'' commands come first. +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 + 4396 In the first region we have 128 equivalents for ``active characters'' that + 4397 act as control sequences, followed by 128 equivalents for single-character + 4398 control sequences. + 4400 Then comes region~2, which corresponds to the hash table that we will +****** +File DRB0:[BELL.WEB]TEX.WEB;1 + 4382 In the first region we have 128 equivalents for single-character control + 4383 sequences, followed by 128 equivalents for ``active characters'' that + 4384 act as control sequences. + 4386 Then comes region~2, which corresponds to the hash table that we will +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 + 6404 when a subfile ends. This variable has six possible values: + 6406 \yskip\hang|normal|, means that a subfile can safely end here without incident. +****** +File DRB0:[BELL.WEB]TEX.WEB;1 + 6390 when a subfile ends. This variable has five possible values: + 6392 \yskip\hang|normal|, means that a subfile can safely end here without incident. +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 + 7326 begin if (end_line_char<0)or(end_line_char>127) then incr(limit); + 7327 if limit=start then {previous line was empty} + 7328 print_nl("(Please type a command or say `\end')"); +****** +File DRB0:[BELL.WEB]TEX.WEB;1 + 7312 begin if limit=start then {previous line was empty} + 7313 print_nl("(Please type a command or say `\end')"); +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 + 7457 @!cvl_backup,@!radix_backup,@!co_backup:small_number; + 7458 {to save |cur_val_level|, etc.} + 7459 @!backup_backup:pointer; {to save |link(backup_head)|} +****** +File DRB0:[BELL.WEB]TEX.WEB;1 + 7442 @!cvl_backup,@!radix_backup:small_number; {to save |cur_val_level| and |radix|} + 7443 @!backup_backup:pointer; {to save |link(backup_head)|} +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 + 7462 co_backup:=cur_order; backup_backup:=link(backup_head); + 7463 if cur_cmd +****** +File DRB0:[BELL.WEB]TEX.WEB;1 + 7446 backup_backup:=link(backup_head); + 7447 if cur_cmd +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 + 7467 cur_order:=co_backup; link(backup_head):=backup_backup; + 7468 end; +****** +File DRB0:[BELL.WEB]TEX.WEB;1 + 7451 link(backup_head):=backup_backup; + 7452 end; +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 + 7730 top of\/ \TeX's input stack, so that |get_next| will proceed to read it + 7731 next. +****** +File DRB0:[BELL.WEB]TEX.WEB;1 + 7714 top of the \TeX's input stack, so that |get_next| will proceed to read it + 7715 next. +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 + 9432 if\/ \.{\\or} or \.{\\else} or \.{\\fi} occurs before the current \.{\\if} + 9433 condition has been evaluated, \.{\\relax} will be inserted. +****** +File DRB0:[BELL.WEB]TEX.WEB;1 + 9416 if \.{\\or} or \.{\\else} or \.{\\fi} occurs before the current \.{\\if} + 9417 condition has been evaluated, \.{\\relax} will be inserted. +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +10225 is not explicitly repeated in \.{DVI} format. +10227 \yskip\hang|header[0]| is a 32-bit check sum that \TeX\ will copy into +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +10209 is not explicitly repeated in \.{DVI} format. Extensions of \TeX\ for +10210 oriental languages should be able to identify oriental fonts by means +10211 of this additional header information. +10212 @^oriental characters@>@^Chinese characters@>@^Japanese characters@> +10214 \yskip\hang|header[0]| is a 32-bit check sum that \TeX\ will copy into +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +10575 ``at'' size~|s|. If |s|~is negative, it's the negative of a scale factor +10576 to be applied to the design size; |s=-1000| is the normal case. +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +10562 ``at'' size~|s|. If |s|~is negative, its the negative of a scale factor +10563 to be applied to the design size; |s=-1000| is the normal case. +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +10608 done: if file_opened then b_close(tfm_file); +10609 read_font_info:=g; +10610 end; +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +10595 done: b_close(tfm_file); read_font_info:=g; +10596 end; +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +10787 quantity by the integer~|z|, which is known to be less than $2^{27}$. +10788 If $|z|<2^{23}$, the individual multiplications $b\cdot z$, +10789 $c\cdot z$, $d\cdot z$ cannot overflow; otherwise we will divide |z| by 2, +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +10773 quantity by the integer~|z|, which is known to be less than $2^{27}$. Let +10774 $\alpha=16z$. If $|z|<2^{23}$, the individual multiplications $b\cdot z$, +10775 $c\cdot z$, $d\cdot z$ cannot overflow; otherwise we will divide |z| by 2, +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +10794 if $a=0$, or the same quantity minus $\alpha=2^{4+e}z^\prime$ if $a=255$. +10795 This calculation must be done exactly, in order to guarantee portability +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +10780 if $a=0$, or the same quantity minus $\alpha$ if $a=255$. +10781 This calculation must be done exactly, in order to guarantee portability +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +10815 begin alpha:=16; +10816 while z>=@'40000000 do +10817 begin z:=z div 2; alpha:=alpha+alpha; +10818 end; +10819 beta:=256 div alpha; alpha:=alpha*z; +10820 end +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +10801 begin alpha:=16*z; beta:=16; +10802 while z>=@'40000000 do +10803 begin z:=z div 2; beta:=beta div 2; +10804 end; +10805 end +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +10891 @.Missing font identifier@> +10892 help2("I was looking for a control sequence whose")@/ +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +10876 @.Undefined font code@> +10877 help2("I was looking for a control sequence whose")@/ +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +11513 doing_leaders:=false; dead_cycles:=0; cur_s:=-1; +11515 @ The \.{DVI} bytes are output to a buffer instead of being written directly +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +11498 doing_leaders:=false; dead_cycles:=0; +11500 @ The \.{DVI} bytes are output to a buffer instead of being written directly +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +11937 @!cur_s:integer; {current depth of output box nesting, initially $-1$} +11939 @ @= +11940 dvi_h:=0; dvi_v:=0; cur_h:=h_offset; dvi_f:=null_font; +11941 ensure_dvi_open; +11942 if total_pages=0 then +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +11922 @!cur_s:integer; {current depth of output box nesting} +11924 @ @= +11925 dvi_h:=0; dvi_v:=0; cur_h:=h_offset; dvi_f:=null_font; +11926 cur_s:=-1; ensure_dvi_open; +11927 if total_pages=0 then +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +12019 if c>=qi(128) then dvi_out(set1); +12020 dvi_out(qo(c));@/ +12021 cur_h:=cur_h+char_width(f)(char_info(f)(c)); +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +12004 if c +12375 help2("The page just created is more than 18 feet tall or")@/ +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +12358 help2("The page just created is more than 18 feet tall or")@/ +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +12381 @.The following...deleted@> +12382 show_box(p); +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +12364 show_box(p); +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +12396 while cur_s>-1 do +12397 begin if cur_s>0 then dvi_out(pop) +12398 else begin dvi_out(eop); incr(total_pages); +12399 end; +12400 decr(cur_s); +12401 end; +12402 if total_pages=0 then print_nl("No pages of output.") +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +12378 if total_pages=0 then print_nl("No pages of output.") +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +12586 because it is a highly negative number. +12588 @= +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +12562 becase it is a highly negative number. +12564 @= +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +13218 the current string would be `\.{.\^.\_/}' if |p| points to the |ord_noad| for +13219 |x| in the (ridiculous) formula +13220 `\.{\$\\sqrt\{a\^\{\\mathinner\{b\_\{c\\over x+y\}\}\}\}\$}'. +13222 @= +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +13194 the current string would be `\.{.(.[/}' if |p| points to the |ord_noad| for +13195 |x| in the (ridiculous) formula `\.{\$\\sqrt\{a\^\{\{b\_\{c\\over x+y\} +13196 \}\}\}\$}'. +13198 @= +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +13668 their limits above and below. It takes a given box~|b| and +13669 changes it so that the new box is centered in a box of width~|w|. +13670 The centering is done by putting \.{\\hss} glue at the left and right +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +13644 their limits above and below. It takes a given hlist box |b| and +13645 changes it so that the new box is centered in a box of width |w|. +13646 The centering is done by putting \.{\\hss} glue at the left and right +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +15406 q:=link(head); s:=head; +15407 while q<>null do +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +15382 q:=link(head); +15383 while q<>null do +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +15413 s:=q; q:=link(q); +15414 end +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +15389 q:=link(q); +15390 end +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +15420 if o<>0 then +15421 begin r:=link(q); link(q):=null; q:=hpack(q,natural); +15422 shift_amount(q):=o; link(q):=r; link(s):=q; +15423 end; +15424 end +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +15396 end +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +15729 @!pass_number:halfword; {the number of passive nodes allocated on this pass} +15731 @ The active list also contains ``delta'' nodes that help the algorithm +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +15701 @!pass_number:pointer; {the number of passive nodes allocated on this pass} +15703 @ The active list also contains ``delta'' nodes that help the algorithm +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +15924 @!v:pointer; {points to a glue specification or a node ahead of |cur_p|} +15925 @!t:integer; {node count, if |cur_p| is a discretionary node} +15926 @!f:internal_font_number; {used in character width calculation} +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +15896 @!v:pointer; {points to a glue specification} +15897 @!t:quarterword; {replacement count, if |cur_p| is a discretionary node} +15898 @!f:internal_font_number; {used in character width calculation} +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +16048 s:=cur_p; +16049 if break_type>unhyphenated then if cur_p<>null then +16050 @; +16051 while s<>null do +16052 begin if is_char_node(s) then goto done; +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +16020 if (break_type=unhyphenated)or(cur_p=null) then +16021 begin s:=cur_p; +16022 while s<>null do +16023 begin if is_char_node(s) then goto done; +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +16062 done: end +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +16033 end +16034 else @; +16035 done: end +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +16077 plus $l_1$, so the length from |cur_p| to |cur_p| should be $\gamma+l_0+l_1-l$, +16078 minus the length of nodes that will be discarded after the discretionary break. +16080 The value of $l_0$ need not be computed, since |line_break| will put +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +16050 plus $l_1$, so the length from |cur_p| to |cur_p| should be $\gamma+l_0+l_1-l$. +16052 The value of $l_0$ need not be computed, since |line_break| will put +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +16087 begin t:=replace_count(cur_p); v:=cur_p; s:=post_break(cur_p); +16088 while t>0 do +16089 begin decr(t); v:=link(v); +16090 @; +16091 end; +16092 while s<>null do +16093 begin @; +16095 s:=link(s); +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +16059 begin t:=replace_count(cur_p); s:=cur_p; +16060 while t>0 do +16061 begin decr(t); s:=link(s); +16062 @; +16063 end; +16064 s:=post_break(cur_p); +16065 while s<>null do +16066 begin @; +16067 s:=link(s); +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +16098 if t=0 then s:=link(v); {more nodes may also be discardable after the break} +16099 end +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +16070 end +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +16104 @= +16105 if is_char_node(v) then +16106 begin f:=font(v); +16107 break_width[1]:=break_width[1]-char_width(f)(char_info(f)(character(v))); +16108 end +16109 else case type(v) of +16110 ligature_node: begin f:=font(lig_char(v));@/ +16111 break_width[1]:=@|break_width[1]- +16112 char_width(f)(char_info(f)(character(lig_char(v)))); +16113 end; +16114 hlist_node,vlist_node,rule_node,kern_node: +16115 break_width[1]:=break_width[1]-width(v); +16116 othercases confusion("disc1") +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +16075 @= +16076 if is_char_node(s) then +16077 begin f:=font(s); +16078 break_width[1]:=break_width[1]-char_width(f)(char_info(f)(character(s))); +16079 end +16080 else case type(s) of +16081 ligature_node: begin f:=font(lig_char(s));@/ +16082 break_width[1]:=@|break_width[1]- +16083 char_width(f)(char_info(f)(character(lig_char(s)))); +16084 end; +16085 hlist_node,vlist_node,rule_node,kern_node: +16086 break_width[1]:=break_width[1]-width(s); +16087 othercases confusion("disc1") +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +16130 hlist_node,vlist_node,rule_node:break_width[1]:=break_width[1]+width(s); +16131 kern_node: if (t=0)and(subtype(s)<>acc_kern) then t:=-1 {discardable} +16132 else break_width[1]:=break_width[1]+width(s); +16133 othercases confusion("disc2") +16134 @:this can't happen disc2}{\quad disc2@> +16135 endcases; +16136 incr(t) +16138 @ We use the fact that |type(active)<>delta_node|. +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +16101 hlist_node,vlist_node,rule_node,kern_node: +16102 break_width[1]:=break_width[1]+width(s); +16103 othercases confusion("disc2") +16104 @:this can't happen disc2}{\quad disc2@> +16105 endcases +16107 @ We use the fact that |type(active)<>delta_node|. +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +16154 else begin q:=get_node(delta_node_size); link(q):=r; type(q):=delta_node;@/ +16155 subtype(q):=0; {the |subtype| is not used} +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +16123 else begin q:=get_node(delta_node_size); link(q):=r; type(q):=delta_node; +16124 subtype(q):=0; {the |subtype| is not used} +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +16168 begin q:=get_node(delta_node_size); link(q):=r; type(q):=delta_node;@/ +16169 subtype(q):=0; {the |subtype| is not used} +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +16137 begin q:=get_node(delta_node_size); link(q):=r; type(q):=delta_node; +16138 subtype(q):=0; {the |subtype| is not used} +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +16846 |disc_break:=true|@> +16847 else if (type(q)=math_node)or(type(q)=kern_node) then width(q):=0; +16848 end +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +16815 |disc_break:=true|@>; +16816 if not is_char_node(q) then +16817 if (type(q)=math_node)or(type(q)=kern_node) then width(q):=0; +16818 end +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +17175 $\.a\,\.b\,\.-\,\.{c\!d}\,\.{e\!f}$ and $\.a\,\.{b\!c}\,\.{d\!e}\,\.f$. +17176 Thus the insertion of a hyphen might cause effects to ripple arbitrarily +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +17145 $\.a\,\.{b\!c}\,\.{d\!e}\,\.f$ and $\.a\,\.b\,\.-\,\.{c\!d}\,\.{e\!f}$. +17146 Thus the insertion of a hyphen might cause effects to ripple arbitrarily +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +17378 using an algorithm due to Frank~M. Liang. +17379 @^Liang, Franklin Mark@> +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +17348 using an algorithm due to Frank M. Liang. +17349 @^Liang, Franklin Mark@> +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +17901 |trie_max>z|, since |h=z-c|. It follows that location |trie_max| will +17902 never be occupied in |trie|, and we will have |trie_max>=trie_link(z)|. +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +17871 |trie_max>z|, since |h=z+c|. It follows that location |trie_max| will +17872 never be occupied in |trie|, and we will have |trie_max>=trie_link(z)|. +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +18667 @!b,@!c:integer; {badness and cost of current page} +18668 @!pi:integer; {penalty to be added to the badness} +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +18637 @!b,c:integer; {badness and cost of current page} +18638 @!pi:integer; {penalty to be added to the badness} +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +18959 @!prev_p:pointer; {predecessor of |p|} +18960 @!n:min_quarterword..255; {insertion box number} +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +18929 @!prev_p:pointer; {precedessor of |p|} +18930 @!n:min_quarterword..255; {insertion box number} +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +19465 width(p):=font_info[k].sc; {that's |space(f)|} +19466 stretch(p):=font_info[k+1].sc; {and |space_stretch(f)|} +19467 shrink(p):=font_info[k+2].sc; {and |space_shrink(f)|} +19468 font_glue[f]:=p; +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +19435 width(p):=font_info[k].sc; +19436 stretch(p):=font_info[k+1].sc; +19437 shrink(p):=font_info[k+2].sc; +19438 font_glue[f]:=p; +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +22014 count_def_code: define(p,assign_int,count_base+cur_val); +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +21984 char_def_code: define(p,char_given,cur_val); +21985 math_char_def_code: define(p,math_given,cur_val); +21986 count_def_code: define(p,assign_int,count_base+cur_val); +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +22659 ("Pretend that you're Hercule Poirot: Examine all clues,")@/ +22660 @^Poirot, Hercule@> +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +22631 ("Pretend that you're Hercule Poirot, examine all clues,")@/ +22632 @^Poirot, Hercule@> +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +23377 This program doesn't bother to close the input files that may still be open. +23379 @= +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +23349 @= +************ +************ +File DRB0:[BELL.WEB]TEX.WEB;2 +23633 @d write_stream(#) == info(#+1) {stream number (0 to 17)} +23634 @d open_name(#) == link(#+1) {string number of file name to open} +****** +File DRB0:[BELL.WEB]TEX.WEB;1 +23603 @d write_stream(#) == info(#+1) {stream number (0 to 16)} +23604 @d open_name(#) == link(#+1) {string number of file name to open} +************ + +Number of difference sections found: 74 +Number of difference records found: 162 + +DIFFERENCES /IGNORE=(SPACING,TRAILING_SPACES,BLANK_LINES)/WIDTH=132/MERGED=1/OUTPUT=DRB0:[BELL.WEB]TEX.DIF;1- + DRB0:[BELL.WEB]TEX.WEB;2- + DRB0:[BELL.WEB]TEX.WEB;1 diff --git a/info/digests/tex-implementors/tex82.bug b/info/digests/tex-implementors/tex82.bug new file mode 100644 index 0000000000..e76dd9b9cc --- /dev/null +++ b/info/digests/tex-implementors/tex82.bug @@ -0,0 +1,8180 @@ +This file has been updated periodically ever since TeX82 was born; +it has been summarized in "The errors of TeX," Software Practice & +Experience, July 1989. Entries are in chronological order; +thus the most recent news (including all bugfixes made since +that article was published) appears at the bottom of the file. + +[Add 519 to these entry numbers to get the corresponding number in +the published article. The article also translates all module +numbers to their final form; what you are about to read is +"authentic source material" from the early days before TeX converged.] + +------------------------------------------------------------------------------- + +First updates to the TeX82 listing published in September, 1982. +(These changes were included in the original Version 0 of TeX, but they +were discovered after the listing went to press.) + +1. Module 943, line 6 (bug discovered 9/28) +change "if cur_cmd=char_num then" to + if (cur_cmd=letter) or (cur_cmd=other_char) then r:=qi(cur_chr) + else if cur_cmd=char_num then + +2. "pause" changed to "pausing" and "pause_code" to "pausing code", throughout. + +3. Module 719, lines 8 and 11 (bug discovered 9/28) +insert "rule_save:=overfull_rule; overfull_rule:=0;" after "save_ptr-2;" +insert "overfull_rule:=rule_save;" before "q:=p+list_offset;" +and insert a declaration of "overfull_rule: scaled" in module 716. + +4. Module 1128, lines 6 and following (bug discovered 9/28) +change "while n<>0 do" to "loop" +change "goto done" to + begin scan_left_brace; new_save_level(false_group); + goto done; + end +change "... return 1130>;" to + ... return 1130> + else if n=0 then + begin new_save_level(case_group); goto done; + end; +and change "done: ... (false_group);" to "done:". + +5. Module 182, line 10 (suggestion by DRF on 9/30) +change "0.0" to "?.?" + +6. Module 682, new definition of math_spacing (decision of 10/2) +"0234000122*4000133**3**344*0400400*000000234000111*4111112341011" + +7. Module 684, new code for case "4" (decision of 10/2) +"4": if cur_style0 then decr(h) else h:=trie_op_hash_size; + +11. Module 457 line 3 (typo discovered 10/9/82) +change `\.!' to `\.\&' + +12. Module 1245 line 8 (bug fixed 10/9/82, discovered by MMD) +insert the following between "begin" and "if": +if format_ident<>0 then initialize; {erase preloaded format} + +** Version 0.1 incorporates the above changes. + +13. This is an extension to the language, put in to satisfy people who +objected to the fact that \write (and \openout and \closeout) only +caused action after being deferred to the next \shipout. Some applications +call for immediate output, hence a new feature: \immediate followed by +\openout or \write or \closeout causes the output action to take place +without delay. For example, \immediate\write{x} is equivalent to +\shipout\vbox{\write{x}} except that the latter also puts an empty +page into the DVI file. + +The extension requires the following new code: +13a. Insert `\immediate' after `\closeout' in module 1248. +13b. Define immediate_code=4 and include the following in module 1252: + primitive("immediate",extension,immediate_code); +13c. Include the following in module 1254: + immediate_code:print_esc("immediate"); +13d. And, in module 1256: + immediate_code:@; +13e. Finally, there's a new module inserted after old module 1280. +Here is the WEB coding for this module: + +@ The presence of `\.{\\immediate}' causes the |do_extension| procedure +to descend to one level of recursion. Nothing happens unless \.{\\immediate} +is followed by `\.{\\openout}', `\.{\\write}', or `\.{\\closeout}'. +@^recursion@> + +@= +begin get_nc_token; +if (cur_cmd=extension)and(cur_chr<=close_node) then + begin p:=tail; do_extension; {append a whatsit node} + out_what(tail); {do the action immediately} + flush_node_list(tail); tail:=p; link(p):=null; + end +else back_input; +end; + +** Version 0.2 incorporates the above changes. + +14. Like change 11, this one doesn't affect the program, it just improves +the documentation: Insert the following definitions in module 106: +define set_glue_ratio_zero(#) == #:=0.0 {assign representation of zero ratio} +define set_glue_ratio_one(#) == #:=1.0 {assign representation of unit ratio} + +These macros are now introduced in a dozen or so future modules, thereby +eliminating most of the system-dependent changes needed elsewhere for ratios. +(Note: I also changed 0 to 0.0 in two places of module 182, where a glue_ratio +comparision was being made.) + +15. Change of module 576 (discovered by HWT, 10/14/82) +"hd:quarterword" should be "hd:eight_bits". +(The same error occurs in module 522, but in that module the remedy is +simply to delete the declaration of hd, since this variable is no longer used.) + +16. A most embarrassing bug (discovered by DRF, 10/14/82) +Replace module 531 by: + +@ A mild optimization of the output is performed by the |dvi_pop| +routine, which issues a |pop| unless it is possible to cancel a +`|push| |pop|' pair. The parameter to |dvi_pop| is the byte address +following the old |push| that matches the new |pop|. + +@p procedure dvi_pop(@!l:integer); +begin if (l=dvi_offset+dvi_ptr)and(dvi_ptr>0) then decr(dvi_ptr) +else dvi_out(pop); +end; + +Now we need to make a few changes to subsequent modules: +16a. In 549, after "incr(cur_s)", insert + if cur_s>0 then dvi_out(push); +and before "decr(cur_s)", insert + if cur_s>0 then dvi_pop(save_loc); + +16b. Delete "dvi_out(push);" and "dvi_pop;" from modules 553, 558, 562, 567. + +16c. Change module 559 just as in 16a. + +17. Module 605, line 6 (discovered 10/15/82) +The test should be "prev_depth>ignore_depth" + +** Version 0.3 incorporates the above changes. + +18. Module 11 (noticed by WLS, 10/16/82) +Delete the definition of align_size (it's harmless but never used) + +19. (This change and the next cause major changes to the TRIP output; +file TRIP.LOG and its relatives are being kept up to date on area [tug,dek].) +The change avoids error messages when vpackage is called during output. +Such messages can occur when there was no error, because the page is being +boxed without the \skip glue from its insertions; so they should be omitted. +The user who really wants such messages can still get them by saying +"\setbox255=\vbox to 1ht255{\unbox255}". +In module 903, insert the followng before the declaration of "wait": + save_vbadness:integer; {saved value of |vbadness|} + save_vfuzz: scaled; {saved value of |vfuzz|} +Then in module 924, insert + save_vbadness:=vbadness; vbadness:=inf_bad; + save_vfuzz:=vfuzz; vfuzz:=max_dimen; {inhibit error messages} +before the call on vpackage, and + vbadness:=save_vbadness; vfuzz:=save_vfuzz; +after. + +20. Module 917 computes |page_size| improperly. (Noticed 10/21/82) +Delete the statement "page_so_far[1]:=page_so_far[1]+width(q);" +and change the preceding statement to: + page_size:=page_size-h-width(q); +(The comment about page_so_far in the first paragraph of module 895 is +correct; I mistakenly introduced a bug in module 917 some months after +writing the first draft of the code, believing that I was making the +algorithm more elegant or something.) + +** Version 0.4 incorporates the above changes. + +21. Since TeX82 applied to (the "woven" documentation) TEX.TEX uses +about 11500 words of variable-size memory, I'm increasing hi_mem_size +(in module 12) from 12000 to 13000. Actually, I recommend using considerably +larger values for mem_max and hi_mem_size, whenever possible. + +22. Addition of the \boxmaxdepth parameter (10/22/82): +This involves renumbering hfuzz_code through dimen_pars, in module 234, +to numbers 9 through 18; inserting the lines + @d box_max_depth_code=8 {maximum depth of explicit vboxes} + @d box_max_depth==dimen_par(box_max_depth_code) + box_max_depth_code:print_esc("boxmaxdepth"); +to module 234 and + primitive("boxmaxdepth",assign_dimen,box_max_depth_code); +to module 235; and changing the call on vpack in module 996 to + vpackage(link(head),saved(2),saved(1),box_max_depth); + +** Version 0.5 incorporates the above changes. + +23. Module 1224, line 4 (bug found by GMK/HWT on 10/26/82) +change "(k+x>eqtb_size)" to "(k+x>eqtb_size+1)" + +24. Module 247, line 13 (bug found 10/26/82) +(bug was reflected in TRIP.LOG but not noticed) +change "ch_code(p)" to "ch_code(p-single_base)" + +25. Module 670, line 18 (bug found 10/27/82) +interchange the statements "fetch(...)" and "math_type(...):=..." +(since the fetch routine sometimes has a side-effect of changing math_type) + A major change (Version 0.6) made on October 28: +The following list of changes counts as "number 26" on the list. +Fonts now have identifiers instead of code numbers; the "\:" primitive +has disappeared; and there are associated new features for "\the". + +a. In module 11, delete bad_font_code. +b. In modules 170 and 172, delete print_esc(":"), and change + `print_int(font_code' to `sprint_cs(font_ident'. +c. In module 205, the comment for set_font is revised. +d. In module 217, there are now five locations for control sequences + that are perpetually defined; undefined_control_sequence + is therefore defined to be frozen_control_sequence+5. +e. In module 248, sprint_cs is now included among . +f. Delete the primitive ":" in modules 250 and 251. +g. Add to module 376: +h. In module 377, seven levels are now distinguished; we define + font_val=4, ident_val=5, tok_val=6. +i. In module 380, delete the previous cases for def_family and set_font, + and the following takes the place of case assign_toks: + assign_toks,def_family,set_font,def_font: ; +j. Module 382 (which now has a new name) has this new ending: + else if cur_cmd=assign_toks then scanned_result(equiv(m))(tok_val) + else +k. Module 389 becomes + = + if cur_cmd=set_font then scanned_result(cur_chr)(font_val) + else if cur_cmd=def_font then + scanned_result(font_ident[cur_font])(ident_val) + else begin scan_four_bit_int; + scanned_result(font_ident[equiv(m+cur_val)])(ident_val); + end +l. In module 393, the relation `<>tok_val' becomes `<=mu_val'. +m. In module 426, the relation `=tok_val' becomes '>=ident_val'. + Also add a new case to the case statement: + font_val: begin print(font_name[cur_val]); + if font_size[cur_val]<>font_dsize[cur_val] then + begin print(" at "); print_scaled(font_size[cur_val]); + print("pt"); + end; + end; +n. The body of module 427 becomes: + begin p:=temp_head; link(p):=null; + if cur_val_level=ident_val then store_new_token(cs_token_flag+cur_val) + else if cur_val<>null then + begin r:=link(cur_val); {do not copy the reference count} + while r<>null do + begin store_new_token(info(r)); r:=link(r); + end; + end; + the_toks:=p; + end +o. In module 480, delete user_font_code; there's a new comment: + When the user defines \font\f, say, TeX assigns an internal number + to the user's font \f. For example, if this internal number is 13, + we will have font_ident[13]=p and equiv(p)=13, where p is the eqtb + location of the control sequence \f. +p. In module 481, delete the declaration of font_number, and + replace the declaration of font_code by + font_ident:array[internal_font_number] of pointer; +q. New stuff in module 483 (also delete references to font_number, font_code): + define bad_font_ident=frozen_control_sequence+4 {denotes a null font} + font_name[undefined_font]:="nullfont"; + font_ident[undefined_font]:=bad_font_ident; + text(bad_font_ident):="nullfont"; eq_level(bad_font_ident):=level_one; + eq_type(bad_font_ident):=set_font; + equiv(bad_font_ident):=undefined_font; +r. In module 490, parameter u is new of type pointer, and the + read_font_info subroutine is changed to a function that + returns an internal_font_number. There's a new local variable + g:internal_font_namber; {the number to return} + and we set g:=undefined_font immediately upon entering read_font_info. + Also set read_font_info:=g just before exiting. +s. In module 491, print_int(u) becomes sprint_cs(u). +t. Delete the statements involving font_code and font_number in module 506, + and set g:=f at the end of that module. +u. The body of module 507 becomes: + = + procedure scan_font_ident; + var f:internal_font_number; + begin ; + if cur_cmd=set_font then f:=cur_chr + else begin print_nl("! Missing font identifier"); + help2("I was looking for a control sequence whose") + ("current meaning has been defined by \font."); + back_error; f:=undefined_font; + end; + end; +v. New beginning of module 508: + The following routine is used to implement `\texinfo f n'. + The boolean parameter writing is set true if the calling program + intends to change the parameter value. + = +and "scan_font_number" is changed to "scan_font_ident". +w. In module 509, "print_int(font_code" becomes "sprint_cs(font_ident". + Also "font code is defined" becomes "\font is loaded" in the help. +x. In module 940, the first line of help is changed to + "You have to specify a font identifier," +y. The set_font case in module 1138 reduces to + set_font: define(cur_font_loc,data,cur_chr); +z. In module 1153, delete all the complicated stuff starting with "scan_int" + and substitute simply this: + scan_font_ident; define(p,data,cur_val); + end; +aa. Change new_font to new_font(a) in module 1169, and add parameter + (a:small_number) + in module 1170. Also add the label common_ending, and declare + variable u to have type pointer. The code beginning with "scan_int" + is changed to the following: + get_token; + if cs_ptr=0 then + ; + u:=cs_ptr; scan_optional_equals; scan_file_name; + ; + ; + f:=read_font_info(u,cur_name,cur_area,s); + common_ending: define(u,set_font,f); font_ident[f]:=u; + exit:end; +bb. New module 1172: + When the user gives a new identifier to a font that was previously + loaded, the new value becomes the font_ident of record. + Font names `xyz' and `XYZ' are considered to be different. + = + for f:=font_base+1 to font_ptr do + if [the test previously in module 1174] then goto common_ending +cc. New module 1173: + = + begin print_nl("! A font identifier must be a control sequence"); + help2("You should say, e.g., `\font\f=fontfilename'.") + ("(I'm going to ignore the \font command you just gave.)"); + back_error; return; + end +dd. New module 1174: + = + set_font:begin print("select font "); print(font_name[chr_code]); + if font_size[chr_code]<>font_dsize[chr_code] then + begin print(" at "); print_scaled(font_size[chr_code]); + print("pt"); + end; + end; +ee. Delete the comment at the beginning of module 1227, and delete the + loop for k:=0 to bad_font_code-1, and delete dump_int(undefined_font). +ff. Delete the repeat loop in module 1228. +gg. Change font_code to font_ident in module 1229, and change + print_int(font_code to sprint_int(font_ident. +hh. In module 1230, + begin undump(single_base)(undefined_control_sequence)(font_ident[k]); + undump_qqqq(font_check[k]); [and continue as before] + +The changes above have been incorporated into Version 0.6. + The ill-fated Version 0.7 + +27. (Here's a change that I retracted shortly after making it, since I +discovered that the source was flaky after all; and I also found a reliable +source [NBS Circular 570] confirming my original information. I include +the note here only for historical purposes...) + +"After years of searching, I've finally found a definitive definition of +the printer's point; and (unfortunately) my previous conjecture was wrong. +The truth is that 83pc=35cm, exactly; so I am changing TeX to conform. +This means some changes in the comments of modules 101 and 517, and the +following changes to the program: + +"27a. In modules 547 and 571, the appropriate DVI numbers are now: + dvi_four(109375); dvi_four(2039808); {conversion ratio for sp} +"27b. The guts of module 418 become: + if scan_keyword("in") then set_conversion(63246)(875) + else if scan_keyword("pc") then set_conversion(12)(1) + else if scan_keyword("cm") then set_conversion(996)(35) + else if scan_keyword("mm") then set_conversion(498)(175) + else if scan_keyword("bp") then set_conversion(10541)(10500) + else if scan_keyword("dd") then set_conversion(996)(931) + else if scan_keyword("cc") then set_conversion(11952)(931) + else..." + +*** Version 0.7 of TeX incorporated the changes above (82/10/30); +this version was withdrawn on 82/11/2. + Changes subsequent to Version 0.6 + +28. The experience with #27 did lead me to one improvement, thanks +to Chuck Bigelow, with respect to Didot points. (11/4/82) +Add the following comment to module 418: + According to the definitions here, $\rm2660\,dd\approx1000.33297\,mm$; + this agrees well with the value $\rm1000.333/,mm$ cited by Bosshard + in {\sl Technische Grundlagen zur Satzherstellung\/} (Bern, 1980). +And change two lines of the code there as follows: + else if scan_keyword("dd") then set_conversion(1238)(1157) + else if scan_keyword("cc") then set_conversion(14856)(1157) + +29. The new font material is made more robust by ensuring that \the\font +always returns a pointer to a control sequence whose command code is +set_font. (Change 11/4/82) + +29a. The code changed in 26aa is changed again, to the following: + ; + define(u,set_font,undefined_font); + scan_optional_equals; scan_file_name; + ; + ; + f:=read_font_info(u,cur_name,cur_area,s); + common_ending: equiv(u):=f; geq_define(hash_used,set_font,f); + font_ident[f]:=hash_used; + exit:end; +29b. Instead of 26cc, here's the new module 1173: + We reserve a special control sequence for the font identifier; + this one cannot be redefined by the user, so it is safe to + return it as a value of \the\font. + = + get_token; + if cs_ptr0 then eq_word_define(int_base+looseness_code,0); + if hanging_indent<>0 then + eq_word_define(dimen_base+hanging_indent_code,0); + if par_shape_ptr<>null then eq_define(par_shape_loc,shape_ref,null); + end; + +31. Module 403, replace line 5 (11/6/82): +if cur_tok+= + let: begin get_token; + if cs_ptr<>0 then + else begin print_nl + ("! You can use \let only with control sequences"); + help2("I'm not \let-ting anything change here,") + ("since I can only do things like `\let\a=b'."); + back_error; + end; + end; +33b. Module 1142 becomes: + = + begin p:=cs_ptr; + repeat get_token; + until cur_cmd<>spacer; + if cur_tok=other_token+"=" then + begin get_token; + if cur_cmd=spacer then get_token; + end; + if cur_cmd>=call then add_token_ref(cur_chr); + define(p,cur_cmd,cur_chr); + end + +34. This change helps you see an undefined control sequence +in certain unusual cases (discovered by JDH, 11/8/82): +Add the clause "(base_ptr=input_ptr) or" to module 294, line 2. + +35. Here's an improvement in the formula for demerits; previously +more weight was given to minimizing bad spacing on lines with penalties, +so that (slightly loose hyphenated line)(OK line) was considered worse +than (OK hyphenated line)(quite loose line). (fixed 11/8/82) +Change lines 2--7 of module 772 to the following: + d:=line_penalty+b; d:=d*d; + if pi<>0 then + if pi>0 then d:=d+pi*pi + else if pi>eject_penalty then d:=d-pi*pi; + +36. Minor change to save buffer space in non-INITEX (11/10/82): +Enclose the declaration of pool_file in module 50 by init...tini. + +37. Minor improvement in format for the context of error messages (11/13/82): +37a. Module 289, type "inserted" split into "backed_up=3", "inserted=4" +and the other type numbers increase: "macro=5", etc. +37b. In module 296, backed_up: if loc=null then print_nl("") + else print_nl(" "); + inserted: print_nl(" "); +37c. Minor changes to comments in modules 289 and 293. +37d. Change "inserted" to "backed_up" in module 294. +37e. Add definition "back_list(#)==begin_token_list(#,backed_up)" in module 305. +37f. In module 306, first test should be ">=backed_up", second "<=inserted". +37g. Change ins_list to back_list in modules 307, 318, 375, 1195. +37h. Add definition to module 308: + ins_error==begin back_error; token_type:=inserted; end +37i. Change back_error to ins_error in modules 362, 1040, 1046. +37j. Change "" to "" in module 973 help. + +38. Module 407, the error message is changed (11/11/82) to: +"! Missing number, treated as zero". + +39. Fix anomaly when hbadness or vbadness is small (11/11/82): +Module 593, line 2, "if (-x-total_shrink[normal]>hfuzz) or (hbadness<100)" +Module 603, line 2, "if (-x-total_shrink[normal]>vfuzz) or (vbadness<100)" + +40. Added the \tokens primitive (11/13/82): +In module 223, defined tokens_loc and tokens (analogous to every_par). +In module 225, defined the primitive. +In module 1146, changed the comment to include tokens_loc as a possibility. + +41. Change get_nc_token to get_token in module 374 (11/13/82). +(In particular \def\foo{...}\foo won't say "undefined c.s." now!) +(This change later retracted during debugging; it was found that +"endv" aborts the job, so this cure was worse than the disease. Then +it was re-established as part of the major change to conditionals, +because endv needed to be more robust anyway.) + +42. In module 699, we make \span expand in a preamble (11/13/82). +Change lines -7 through -3 to: + begin get_nc_token; goto reswitch; + end; + +43. Modules 321 and 322 have been altered for better efficiency (11/12/82) +and better exposition; the three conditions of module 322 are now +in separate if tests. + +44. Frozen control sequences are now unredefinable. (11/16/82) +A new procedure get_r_token has been introduced to give uniform error +messages for \def, \let, \read, \font, \mathchardef, and to make them +incapable of changing the frozen equivalents. + +Incidentally, get_nc_token is changed to get_x_token; and ch_code +becomes cat_code. + A major change (Version 0.8) made on November 14--16: +Conditional statements are taken from semantics to syntax. + +This change, which counts as number 45 on the list, made it necessary +to renumber the modules. And it was such a drastic change, the +differences can only be sketched here, using the old module numbers +for reference. A variety of other things were cleaned up because this +change made it more natural for them to be handled differently. + +45a. Module 158, inserted a permanently empty token list called null_list. +45b. Module 204, deleted if_test, case_branch, else_code, convert; + inserted end_cs_name. +45c. Module 206, inserted if_test, fi_or_else, cs_name, convert, and + end_template (the latter comes after long_outer_call). +45d. Module 217, there are now nine frozen control sequences; also null_cs. +45e. Modules 247 and 248, must be able to print a null control sequence. +45f. Module 268 (leave_transparent_group) disappears; comments in the + previous modules also are appropriately simplified. +45g. Module 273, delete endv_token. +45h. Modules 277 and 278, delete references to endv (it no longer appears). +45i. After module 281, a procedure show_cur_cmd_chr takes the + code for tracing commands from module 937. +45j. Module 317 now forbids \outer control sequences when skipping, + and inserts \fi in front of them, for error recovery. +45k. Module 334 now uses null_cs if carriage-return is an escape. +45l. Module 343 no longer has endv test. +45m. Module 344, major extensions to expand_calls make it several modules + longer. It saves global variables like cur_val. It changes + end_template to endv. It processes cs_name and convert. + It processes if_test by calling the "conditional" procedure. + It processes fi_or_else by checking their legality, and (if legal) + updating the if stack. +45n. Module 373 (pass_block) disappears. +45o. After module 400, radix and cur_val and cur_val_level are initialized. +45p. Module 428 changes so that conv_toks is a procedure rather than a + function; this procedure is invoked by expand_calls. +45q. Modules 436 and 1032, delete reference to conv_toks. +45r. After module 443, the entire part 48 moves to this part of the program, + and the parts are renumbered accordingly. \case is changed to + \ifcase, and it resides under the if_test command. + New routines are inserted to maintain a linked stack that records + the current state of conditionals. There's a procedure + pass_text that skips text while looking for \fi or \else or \or + on level zero with respect to \if...\fi nesting. The previous + routines for skip control via handle_right_brace are eliminated, + and the new ones are somewhat simpler. The new \ifcat is mostly + combined with the old \if; they no longer ignore spaces. + The scanner_status is set to normal while processing \ifx. + \ifx will consider \a to equal 0 after \let\a=0. +45s. Modules 701, 707: endv_token is replaced by a token for a frozen + control sequence whose command code end_template makes it behave + like an outer_call. After expand_calls, it is converted to another + frozen control sequence, whose command code is endv. This two-step + facilitates error recovery, instead of giving a fatal error stop. +45t. Module 874, remove "pass_block(1); goto done". +45u. After module 1047, routine for end_cs_name prints an error message. +45v. Module 1049, get_nc_token becomes get_token. (else $\ifmmode fails) +45w. Module 1202 gets another case (end_template). +45x. Module 1243, new warning is printed if the if stack isn't empty. + Changes after version 0.8 + +46. Declare c : ascii_code in module 825 (noted by DRF, 11/21/82) + +47. Module 776 lines 4-6 (suggested by DRF, 11/21/82) +threshold:=pretolerance; +if threshold>=0 then + begin stat if tracing_stats>2 then + begin begin_diagnostic; print_nl("@@firstpass"); + end; tats + second_pass:=false; + end +else begin threshold:=tolerance; second_pass:=true; + end; + +48. Protection for DVI files (added 11/16/82) +Replace lines 2 and 3 of module 570 by: + ; +Move the statement "dead_cycles:=0" from module 570 to module 568. +Declare "label done;" in module 568. +And add the following new module after 570: + +@ Sometimes the user will generate a huge page because other error messages +are being ignored. Such pages are not output to the \.{dvi} file, since they +may confuse the printing software. + +@= +if (height(p)>max_dimen)or(depth(p)>max_dimen)or(width(p)>max_dimen) then + begin print_nl("! Huge page cannot be shipped out"); + help2("The page just created is more than 18 feet tall or")@/ + ("more than 18 feet wide, so I suspect something went wrong."); + error; + if tracing_output=0 then + begin begin_diagnostic; + print_nl("The following box has been deleted:"); + show_box(p); + end_diagnostic(true); + end; + goto done; + end; +if height(p)+depth(p)>max_v then max_v:=height(p)+depth(p); +if width(p)>max_h then max_h:=width(p) + +49. New features \everymath and \everydisplay (12/2/82). +Make changes analogous to those for "\tokens" (see change 40). +Put the following just before the end of module 1050: + if every_math<>null then begin_token_list(every_math,every_math_text); +And put the following just before the end of module 1056: + if every_display<>null then + begin_token_list(every_display,every_display_text); + +50. New feature \futurelet (12/2/82): +Module 1141 changes again. (Also, "let" and "futurelet" share cmd code "let".) +let: begin n:=cur_chr; + get_r_token; p:=cs_ptr; + if n=normal then + begin repeat get_token; + until cur_cmd<>spacer; + if cur_tok=other_token+"=" then + begin get_token; + if cur_cmd=spacer then get_token; + end; + end + else begin get_token; q:=cur_tok; get_token; back_input; + cur_tok:=q; back_input; {look ahead, then back up} + end; {|back_input| doesn't affect |cur_cmd|, |cur_chr|} +and continue with "if cur_cmd>=call", as before. + +*** The changes above have been incorporated into version 0.9 of TeX. + Changes after version 0.9 + +51. new \endinput primitive (suggested by FY, 12/7/82): +\input and \endinput both use the same command code. The cases in module +955 are deleted and replaced by those in module 965 (which disappears), +because \input is now allowed in any mode. The code for any_mode(input) +is "if cur_chr=0 then start_input else force_eof:=true", and it moves from +module 952 to just before module 1197. The global variable force_eof +is initially false, and module 340 becomes (after first:=start;) + if not force_eof then + begin if input_ln.... else force_eof:=true; + end; + if force_eof then begin print_char(")"); force_eof:=false;... + +52. Module 1005, line 4 (12/8/82) +change "if align_state<0" to "if (mode<0)or(align_state<0)" +(This avoids embarrassing case where TeX says "type a command or say \end" +but when you type \end it says "You can't use \end in restricted horiz mode".) + +53. Patch to the new code for \csname (12/21/82) +After eq_type(cs_ptr):=relax, also say equiv(cs_ptr):=256. +(This corrects a bug that would appear only if \csname occurs right +after a file name.) + +54. Change 47 introduced a bug when tracingonline=0 (12/20/82) +when omitting firstpass, also do "if tracing_stats>2 then begin_diagnostic;" + +55. \hskip -1pt plus 2pt was parsed as \hskip -(1pt plus 2pt)! (12/20/82) +In module 421, before line -4, insert the following: + if negative then + begin cur_val:=-cur_val; negative:=false; + end; +But then realize that "negative" is always false on line -2; simplify. + +56. Cosmetic change to paragraph statistics (12/23/82) +tight_fit..very_loose_fit codes have been renumbered very_loose_fit..tight_fit. + +57. Module 729 changes to make TeX language more consistent (12/23/82): +else if type(tail)<>glue_node then tail_append(new_penalty(inf_penalty)) +else begin type(tail):=penalty_node; delete_glue_ref(glue_ptr(tail)); + flush_node_list(leader_ptr(tail)); penalty(tail):=inf_penalty; + +58. Commas are allowed as alternates to radix points. (12/23/82) +define continental_point_token=other_token+"," {decimal point, Eurostyle} +in module 400, and insert the following twice in 409: + if cur_tok=continental_point_token then cur_tok:=point_token; + +59. \hangindent becomes a normal parameter. (12/23/82) +This simplifies the code in obvious ways; for example, module 1148 disappears. +The command code hang_indent goes away too; what was previously called +hanging_indent is then renamed hang_indent. + +60. \prevgraf becomes accessible. (12/23/82) +This involves renaming the "after" field "pg_field" in the nest array; +making a new command code set_prev_graf; +including the following loop into scan_the: + nest[nest_ptr]:=cur_list; p:=nest_ptr; + while abs(nest[p].mode_field)<>vmode do decr(p); + scanned_result(nest[p].pg_field)(int_val); +and including the following active procedure for any_mode(set_prev_graf): + procedure change_prev_graf; + var p:0..nest_size; {index into |nest|} + begin nest[nest_ptr]:=cur_list; p:=nest_ptr; + while abs(nest[p].mode_field)<>vmode do decr(p); + scan_optional_equals; scan_int; + if cur_val<0 then + begin print_nl("! Bad \prevgraf"); + help1("I allow only nonnegative values here."); + int_error(cur_val); + end + else begin nest[p].pg_field:=cur_val; cur_list:=nest[nest_ptr]; + end; + end; + +61. \clubpenalty is split off from \widowpenalty. (12/23/82) + +62. Bad bug in module 1005 (12/24/82) +(must not go to reswitch if \par is a macro!) +Instead of setting cur_cmd and cur_chr and goto reswitch, just back_input +and set token_type:=inserted. + +63. \openin not to prompt if file not present (12/25/82) +Change lines -4 and -3 of module 1183 to: + if a_open_in(read_file[n]) then read_open[n]:=just_open + else read_open[n]:=closed; + +64. New \jobname primitive (12/25/82) +It is added to the "convert" command in the obvious way. +In conv_toks, the relevant code is + if job_name=0 then open_log_file +before "selector" is changed and + print(job_name) +after. + +65. Better error recovery for math-only things (12/25/82): +In module 952, don't goto reswitch after insert_dollar_sign. +In module 954, first back_input, then set cur_tok, and +don't bother to set cur_chr or cur_cmd; ins_error instead of back_error. + +66. Module 1163, line 3, insert "scan_optional_equals" (12/25/82). +Also make \the\parshape allowed. + +67. The location where an \if begins is stacked (12/26/82) +so that a better error message can be given for \end while \if is incomplete. +This means two-word nodes instead of one-word nodes in the if stack. + +68. Change 30 is extended to \insert, \vadjust, \valign, \output (12/26/82) +The one-time-only paragraph parameters are now cleared by a +subroutine called normal_paragraph; hang_after is also set to 1. +The essential change being made now is to call normal_paragraph in modules +704, 932, 1009, and 1076. + +69. \pagetotal and \pagegoal are added (12/27/82) +The changes are analogous to, but simpler than, those for \prevgraf. + +70. Tracing of page-optimization calculations (12/27/82) +A bunch of print commands are added to modules 897, 914, and 918, +activated if tracing_pages>0. Also, \tracingparagraphs is separated +from \tracingstats. + +**** The changes above have been incorporated into version 0.91 of TeX + +71. The build_page procedure is broken in two parts (Dec 31, 1982) +by making module 919 into a procedure called fire_up. + +72. \ifeven1\else is made legal by introducing if_code (Dec 31, 1982) +This improves part of the code in change 45; if_limit has a specific +value that recovers automatically from a former syntax error. + +73. Improvement to alignments when columns don't occur (Dec 31, 1982) +Delete module 711; and where it was used in module 708, say this: + begin fin_col:=true; return; + end; +Also, in module 717, replace the statement "width(q):=0" by +"" +where that new module has the following code: + begin width(q):=0; r:=link(q); s:=glue_ptr(r); + if s<>zero_glue then + begin add_glue_rel(zero_glue); delete_glue_ref(s); + glue_ptr(r):=zero_glue; + end; + end + +74. Better error message in overfull alignment (Dec 31, 1982) +In module 717, don't set both height and width; set the height zero. +Then in module 719, switch width to height if necessary. (People didn't +understand the previous error messages, and I couldn't blame them.) + +*** The changes above have been incorporated into version 0.92 of TeX82 +*** (which was the last version of 1982, completed 11:59pm on December 31) + The first changes after 1982 + +75. Modules 961 and 962 should be one module. (Jan 3, 1983) +Also, the absolute constant 100 is replaced, and the test becomes + if ((page_head=page_tail)and(head=tail)and(dead_cycles=0))or + (dead_cycles>max_dead_cycles) then + +76. Surprise bug: module 1010. (Jan 3, 1983) +The case "if head<>tail" needs an else clause: else pop_nest. +Also remove the "" in that module. + +77. Improvement to change 22 (Jan 4, 1983) +In module 996, use box_max_depth from inside the \vbox: + @!d:scaled; {maximum depth} + begin d:=box_max_depth; unsave;... vpackage(...,d); + +78. \groupbegin and \groupend changed to \begingroup and \endgroup (Jan 4, 83) + +79. \deadcycles made accessible (Jan 4, 83) + +80. New calculations for split insertions (Jan 4, 83) +In module 918, we now work with natural width, and add in the page depth too: +The line "else w:=x_over_n..." is changed to + else begin w:=page_goal-page_total-page_depth; + if count(n)<>1000 then w:=x_over_n(w,count(n))*1000; + end; +(Note that cur_page_height and cur_page_depth and page_size have been +renamed page_total, page_depth, and page_goal, in accordance with new syntax.) + +*** The changes above have been incorporated into Version 0.93 + +81. Old bug finally unearthed by PHY (Jan 6, 1983) +insert "incompleat_node:=null;" after "push_nest;" in module 1097. + +82. Extension of change 69: \pageshrink, etc. added (Jan 6, 1983) + +83. \floatingpenalty and \insertpenalties added (Jan 6, 1983) +Also, the insertion nodes now have a new format, so that the values of +\floatingpenalty, \splittopskip, and \splitmaxdepth can be stored with +each insertion; this requires the obvious changes in several places: +a) Module 136, ins_node has fields float,depth,height,ins_ptr,split_top_ptr +b) Module 184, these fields are displayed +c) Module 198, ins_node case, also delete_glue_ref(split_top_ptr(p)) +d) Module 202, ins_node case, also add_glue_ref(split_top_ptr(p)) +e) Modules 226-228, new integer parameter \floatingpenalty +f) Module 883, add parameter d to vert_break subroutine +g) Module 885, use d instead of split_max_depth +h) Module 890, argument split_max_depth to call of vert_break +i) Module 894, change width to height (better name) +j) Module 900, initialize insert_penalties here, not in 901 +k) Module 914, cost to be awful_bad if insert_penalties>=10000 +l) Module 916, add float(p) to insert_penalties if type(r)<>inserting +m) Module 916, subtract page_depth from delta +n) Module 918, subtract page_shrink from delta +o) Module 918, argument depth(p) to call of vert_break +p) Module 921, insert_penalties:=0, save split_top_skip before calling 925 +q) Module 921, restore split_top_skip before calling 924 +r) Module 928, set split_top_skip:=split_top_ptr(p) before prune_page_top +s) Module 929, after q:=p, incr(insert_penalties) +t) Module 929, before free_node, delete_glue_ref(split_top_ptr(p)) +u) Module 933, clear insert_penalties before calling 934 +v) Module 978, more local variables needed +w) Module 1010, build the newfangled ins_node + +84. Scanner goes to new_line when is category 13 (Jan 7, 1983) +Insert state:=new_line in module 323 just before the reference to module 339; +and delete "state:=new_line;" from modules 328 and 330 (and their names). + +85. Distinguish between user \kern and font \kern (Jan 9, 1983) +The nontrivial parts of this are to change "type(s)<>kern_node" to +"(type(s)<>kern_node)or(subtype(s)<>normal)" in modules 809 and 810; +and to say "kern_node: if subtype(s)=explicit then goto done4" in module 812. +The \kern primitive now has "explicit" instead of "normal" in 967. + +86. "ignorespace" becomes "ignorespaces" (Jan 9, 1983) + +87. Don't omit a blank space after \def, \message, \mark, etc. (Jan 9, 1983) + is removed from modules 431, 848, 874. +"info(r):=space_token;" and "link(r):=get_avail; r:=link(r);" removed from 1278. + +*** The above changes appear in Version 0.94. + Version 0.95 + +88. New active characters in math mode (Jan 12, 1983) +In module 1062, add a label "restart" and change lines -3 and -2 as follows: +fam(p):=(c div 256) mod 16; +if c>=var_code then + if fam(p)<8 then fam(p):=cur_fam + else begin ; goto restart; + end; +In module 1064, the body of the procedure becomes +begin if c>='4000 then else ; end +And there's a new module: += +begin cs_ptr:=(c mod 128)+active_base; +cur_cmd:=eq_type(cs_ptr); cur_chr:=equiv(cs_ptr); x_token; back_input; +end + +89. Surprise bug: $1-$ treated the - as binary (Jan 15, 1983) +New module = + if r_type=bin_noad then type(r):=ord_noad +is called in module 649 before the call of 678, and in module 651 +in the place where that code already appears. + +90. Another oversight (Jan 15, 1983) +Add "space_factor:=1000;" after "push_nest" in modules 1027, 1029 + +91. And a more embarrassing one (Jan 16, 1983) +I forgot "spotless:=false;" at the beginning of the procedure in module 80. +But while fixing this, I decided to make it more general since IBMers want +a return code at the end of the job. So there's a history variable that has +four values: spotless, warning_issued, error_message_issued, fatal_error_stop. +a) module 75: declare history, define spotless etc. +b) module 76: initialize history:=spotless +c) module 80: if history= + begin print_nl("! Unbalanced \output routine"); + help2("Your sneaky output routine has fewer real {'s than }'s.")@/ + ("I can't handle that very well; good luck."); error; + repeat get_token; + until loc=null; + end +In module 1278, replace the call on confusion by a call of: + @ @= + begin print_nl("! Unbalanced \write command"); + help2("On this page there's a \write with fewer real {'s than }'s.")@/ + ("I can't handle that very well; good luck."); error; + repeat get_token; + until cur_tok=end_write_token; + end + +93. String overflow clobbered the log file (Jan 18, 1983) +Also, "confusion" before log file open would cause problems. Also start_input +calling open_log_file calling prompt_file_name calling fatal_error! +To fix these anomalies, open_log_file no longer calls prompt_file_name, +if interaction0 then selector:=term_and_log else selector:=term_only; +if interaction=batch_mode then decr(selector); +if job_name=0 then open_log_file; +end; + +94. \ifeof\fi loops infinitely (Jan 18, discovered by Lamport) +Change 72 converted such a \fi to \fi. Now it is converted to \relax\fi. + +95. \limitswitch changed to \displaylimits et al. (Jan 18, 1983) +[Incidentally, this fixes a bug in the former positioning of \int\limitswitch] +a) module 608: subtype of Op can be normal, limits, or no_limits. +b) 620: display the subtype if not normal +c) 667: new logic decides limits before looking at the operand (and the operand + is now called the nucleus); the italic correction is removed only if + it should not be put back +d) 1069: subtype(tail):=cur_chr + +96. Minor changes to math in unusual cases (Jan 19, 1983) +a:delete "if height(y)<=0 then height(y):=default_rule_thickness" in module 658 +b:move "if thickness(q)=default..." from module 664 to module 661 +c:delete module 1081, that error message isn't worth the bother +d:in module 1062, char_num case, c:=math_code(cur_val) (if cur_val<128) +e:in module 1064, a similar change + +97. Bad spacing from change 6 is corrected (Jan 19, 1983) +underline, overline, radical, vcenter, and accent noads now revert to type +Ord instead of type Inner. +{...} produces type Ord also. +There's a new primitive \mathinner. +The new_noad function now produces an ord_noad (change its calls accordingly). +And the default is changed in module 679 to t:=ord_noad; the fraction_noad +case sets t:=inner_noad, and the (inner_noad,ord_noad) cases swap places. + +98. New \mathchoice primitive (Jan 19, 1983) +a) module 204: new command +b) 254: math_choice_group +c) 614: style node three words long, so a choice node can be converted to it +d) 614a: choice node has four subfields: display_mlist, text_mlits, etc. +e) 1081a: routines to build a choice_node like 1027-1029 build discretionaries + +99. \input moves to syntax from semantics (Jan 19, 1983) +a) 204, 206: renumber commands +b) When input is to be expanded, if name_in_progress then insert_relax +c) 459,464: name_in_pr:=true; begin_name;...end_name; name_in_pr:=false; +d) 406,461: declare name_in_progress, a global boolean initially false + +100. \chardef joins \mathchardef (Jan 19, 1983) +a) 204: math_only becomes math_given; add new command char_given +b) 205: new command char_def +c) 250,251: new primitive char_def +d) 380: char_given,math_given yield integer after \the +e) 401: char_given,math_given yield integer in context of integer +f) 936,943: char_given treated like other_char +g) 1062,1064: same, if cur_chr<128, else assume math_code(x)=x +h) 1143,1144: char_def is analogous to math_char_def + +101. \unbox becomes \unhbox,\unvbox; also add \unhcopy (Jan 19, 1983) +Module 1020 changes in the obvious way. + +102. \spacefactor, \pagetotal, etc. move to prefixed_command (Jan 20, 1983) + +103. \hrule in horizontal mode, \vrule in vertical mode: switch modes (Jan 20) + +104. \globaldefs parameter, affects prefixed_command (Jan 20, 1983) + +105. After looking at frequency counts, some optimizations made (Jan 21, 1983) +a) "fast_get_avail" and "fast_store_new_token" introduced to speed up the loops +in modules 360 and 431. +b) some procedure call overhead eliminated in begin_token_list, end_token_list, +back_input, and flush_node_list. +c) a few if tests changed from "if a and b then" to "if a then if b then". + +106. Changes for space efficiency in math constructions (Jan 22, 1983) +a) In module 1102, mlist_penalties:=(mode>0) +b) The following code is inserted before "free_node" in module 639 (rebox): + if (is_char_node(p))and(link(p)=null) then + begin f:=font(p); v:=char_width(f)(char_info(f)(character(p))); + if v<>width(b) then link(p):=new_kern(width(b)-v); + end; +c) A new module is called just before clean_box exits: += +q:=list_ptr(x); +if is_char_node(q) then + begin r:=link(q); + if r<>null then if link(r)=null then if type(r)=kern_node then + begin free_node(r,small_node_size); link(q):=null; + end; + end + +107. Oversight in rebox routine (module 639) corrected (Jan 22, 1983) +if type(b)=vlist_node then b:=hpack(b,natural); + +108. Module 217 clobbers eqtb[bad_font_ident] set in change 26q (Jan 22, 1983) +Decided to fix this by making \nullfont a primitive. +This means the procedure missing_font can be deleted, and the test for +undefined font can be removed from the inner loop. +(This reflects a rather dramatic change from TeX80, where +a missing font was a fatal "Whoa" error!) +Note: I thought I could delete module 646, but realized that it still provides +a useful error message. The dump/undump routines (cf. change 26ee) now +dump the null_font information too, as its parameters can be changed. + +109. End of program now lists all incomplete \ifs (Jan 24, 1983) + +110. Alignment preamble setup to allow \halign\lb (Jan 29, 1983) +The statement "align_state:=-1000000;" is inserted near the beginning +of module 695 (and the comment about align_state=-999999 is deleted). +The constant -999999 is changed to -1000000 in modules 700 and 701. + +111. Forgot to test is_char_node(r) (Jan 30, 1983) +in the code of change 106c. +By coincidence, this was caught since somebody used font number 11 +in the second character of a list of length 2! + +112. Improved format for stats at end of run (suggested by DRF, Jan 30, 1983) +Module 1242 changes; nothing subtle. + +**** The changes above have been incorporated into version 0.95 + Version 0.96 + +113. space after one-symbol control sequences NOT to be ignored unless +the catcode of that symbol is letter or spacer. (Jan 30, 1983) +The name of module 334 changes slightly; the state is set based +on cat_code(cur_chr), shortly after label start_cs. +A new variable cat is introduced and set to cat_code(cur_chr) in modules +334 and 336. + +114. trailing spaces removed on all lines of input (Jan 30, 1983) +last_nonblank is added to input_ln routine (module 31) + +115. mmode+accent gives error but assumes math_accent (Feb 3, 1983) +This goes into math_ac procedure (module 1075); module 1035 is eliminated. + +116. \iftrue and \iffalse (Feb 5, 1983) +Simple addition of two new conditions. + +117. Bad calculation of size for \left and \right (Feb 6, 1983) +In module 680, the first assignment to delta should be + delta:=(delta1 div 500)*delimiter_factor. + +118. \delimitershortfall (new name) replaces \delimiterlimit. (Feb 12) + +119. \abovewithdelims.. to be equivalent to \above (Feb 12) +Module 1089 revised so that the delimiters are scanned before the dimension. + +120. Remove the kludgy math codes introduced in change 88 (Feb 12) +\fam becomes a normal integer parameter +and \mathcode stored with min_halfword added +and \mathcode allowed to be 32768 +and current family is substituted only when it's in range. +Also the initialization of mathcode for letters now specifies family 1. +(This implies a dozen or so obvious revisions.) + +121. Bug in module 1152: max spacefactor is 32767 (Feb 12) +also module 1013 gets a restricted range + +122. Octal output to be replaced by hexadecimal. (Feb 14) + +123. Forgot to include char_given in module 1037, re change 100 (Feb 14) + +124. vmode+valign,hmode+halign made legal transitions (Feb 17) + +125. \tracingrestores (Feb 18) +This involves a lot of new, rather tedious code that's interspersed with the +eqtb definitions (the body of a procedure called show_eqtb). + +126. New error message for hmode+hrule in -hmode. (Feb 25) +head_for_vmode now suggests \leaders in this case. [improves change 103] + +127. under/overfull boxes in alignment: Better message. (Feb 27) +par_begin_line becomes pack_begin_line, and it is set (negative) in +module 719, read in modules 590 and 601. + +128. New \xcr feature. (suggested by Lamport comments, Mar 4) +align_peek (module 702) ignores it, otherwise it acts like ordinary \cr. + +129. In stats, subtract out TeX's own string requirements (Mar 4) +(cf. change 112) +init_pool_ptr and init_str_ptr variables added in obvious way +(declared in module 39, set in module 1240, used in module 1242) + +130. \everyhbox and \everyvbox. (Mar 6) +The modifications are obvious; for example, module 1076 gets the statement + if every_vbox<>null then begin_token_list(every_vbox,every_vbox_text); +and a similar pair of statements goes into module 993. + +131. Precaution in module 1105 error recovery (March 9, 1983) +Change the first test to "if (a=null)or danger", in order to +avoid accessing math_quad when the symbol fonts aren't known to be present. + +132. Installed float and unfloat to aid portability (suggested by HWT, 3/7/83) + +133. \dispskip becomes \abovedisplayskip and \belowdisplayskip (3/9/83) +Also \dispaskip becomes \abovedisplayshortskip; \dispbskip similar. + +134. \romannumeral separated from \number (suggested by FY, March 10) +Obvious changes; print_roman_int now accepts negative input but gives +no output in such cases (the test in module 68 becomes "if n<=0 then return"). + +135. scan_keyword to ignore leading spaces (Mar 12) +In module 375, change "else begin" to +"else if (cur_cmd<>spacer)or(p<>backup_head) then begin". + +136. Update to change 112 (Mar 14) +Module 1242 now uses write and write_ln directly (saves space and time). + +137. Another change to page-break cost (suggested by Lamport, March 16) +Cf. change 83k above; the relevant lines of module 914 now read + if b=10000 then c:=awful_bad; +and a similar change (but without insert_penalties) occurs in module 887. + +**** The changes above have been incorporated into version 0.96 (March 16, 1983) + Version 0.97 + +138. \everyjob (suggested by FY, March 18) +Module 936: main_control inserts every_job as its first action. + +139. Improved printout of macro definitions (March 19) +In module 278, simply treat left_brace like right_brace. +(This corresponds to the way the manual describes parameter matching.) + +140. Omit blanks as non-delimited parameters (March 19) +In module 360, replace + else store_new_token(cur_tok); +by + else @; +Then define @ to be: +begin if cur_tok=space_token then + if info(r)<=end_match_token then + if info(r)>=match_token then goto continue; +store_new_token(cur_tok); +end + +141. Minor patch in module 386, catches mu_glue (March 21) +begin cur_val:=zero_glue; cur_val_level:=glue_val; +if not is_char_node(tail)and(mode<>0) then + begin if type(tail)=glue_node then + begin cur_val:=glue_ptr(tail); + if subtype(tail)=mu_glue then cur_val_level:=mu_val; + end; + end +else if (mode=vmode)and(tail=head)and(last_page_glue<>max_halfword) then + cur_val:=last_page_glue; +end + +142. Patch in module 699, \span expands only one level (March 21) +(See previous change #42.) The "get_x_token" in the code +while (cur_chr=span_code)and(cur_cmd=tab_mark) do get_x_token; +should be replaced by: + begin get_token; + if cur_cmd>max_command then + begin expand_calls; get_token; + end; + end + +143. Single # in \tokens, \message, etc. (March 22) +(The previous rule was really bad in connection with \uppercase, +or with \write when #'s had to be given four times!) +Module 437 should be prefaced with "if macro_def then". +And get_token should become get_x_token there, if xpand is true. + +144. Keyword "to" required in \read. (March 22) +This will avoid the common error of a missing space before the \cs. +Also the stream number can be out of range, for terminal input. +The stream number in a \write can be out of range too, for terminal output. +Modules 1145 and 1258 and 1280, etc., change in the obvious ways. + +145. \ifeven replaced by \ifodd (March 26) +This makes the language more consistent. + +146. Big surprise bug relating to \if\if aabc\fi (March 26) +(related to change 45; the possibility that cur_if might not be the +correct one when the conditional is evaluated was discovered today) +The main change is to add the change_if_limit procedure, and to add +the variable save_cond_ptr and the code that now depends on it. + +147. \if and \ifcat should tolerate primitives (March 28) + +148. "absent" becomes "void", a better word (March 28) + +149. Module 990: \lastbox to clear the shift_amount (March 28) +since I don't want to figure out what it means in all cases (\vsplit, etc) + +150. print_err("...") takes the place of print_nl("! ...") (DRF, March 29) +And wake_up_terminal is introduced in module 34, and used in modules +37, 70, 341, 441, 457, 463, 1210, 1240, 1246. + +151. \halign extended to periodic preambles (April 1) +Modules 688--690: cur_loop introduced, stacked/unstacked +Module 695: cur_loop initialized +Module 700: cur_loop set up +Module 708--709: cur_loop used and advanced + +152. \leaders to align by the smallest enclosing box. (April 1) +Module 549: new local variable left_edge, initialized to cur_h +Module 557: cur_h:=left_edge+leader_wd*((cur_h-left_edge) div leader_wd) +Module 559: new local variable top_edge, initialized to cur_v-height(this_box) +Module 566: analogous to 557 + +153. hyphenation after whatsits is OK (April 1) +In module 809, skip past whatsits + +154. \par in vertical mode should build_page (April 2) +vmode+par_end moves from 952 to 1005 + +155. Clear aux to zero in module 703 (April 2) + +156. Digits will switch families (April 4) +(initialize their math codes differently in module 225) + +157. Refinement to correction 83m (April 7) +the test for not splitting should be + if ((h<=0)or(h<=delta))and(height(p)+height(r)<=dimen(n)) then + +158. (re 128) \xcr renamed to \crcr, at Lamport's request. (April 8) + +159. Better error recovery in runaway preamble (April 11) +Module 319, aligning: set align_state:=-1000000 + +160. \read to get balanced braces (April 12) +Module 440 changed to look more like 431. +Module 443 gives error message if the \read goes off end of file. +Module 319 removes \outer from forbidden control sequence that is \read. + +161. Bug found by Jim Sterken (April 14) +Module 798 can make q a char_node, so module 794 needs this patch: + if not is_char_node(q) then +to be inserted just before "if (type(q)=math_node)..." + +162. \uppercase and \lowercase to apply to all characters (April 15) +module 1196 changes; also I put active_base before single_base in eqtb + +**** The changes above have been incorporated into version 0.97 (April 16, 1983) +**** except the part of 144 about \read-1 was forgotten and put in 0.98 later + Version 0.98 + +163. change small_number to 0..65 in module 814 (found by DRF, April 17) + +164. improved error recovery in module 1166 (suggested by DRF, April 17) +after error: repeat get_token; until cur_cmd=right_brace; {flush the patterns} + +165. improved \read from terminal (suggested by Todd Allen at Yale, May 1) +I had forgotten to implement the extended stream numbers in change 144. +Also, the prompt is now omitted if n<0. + +166. \write n writes only to the log file, if n<0. (May 18) + +167. Unified syntax for parameters and registers. (May 18) +a) Command code changes: def_font moved to before prefix; + register eliminated; set_register renamed register and + moved (with adv_register...div_register) to before prefix; + min_internal and max_internal defined. +b) scan_the renamed scan_something_internal, and it acts on cur_tok. +c) scan_int, scan_dimen, scan_glue simplified accordingly; instead of + testing for cur_cmd=the or cur_cmd=register, they now test + cur_cmd versus min_internal and max_internal. +d) ins_the is removed. +e) \minusthe is removed. Consequently "the_toks" needs no parameter. + +168. new parameters \hoffset, \voffset (May 18) + +169. \everycr (suggested by Spivak, installed May 24) + +170. \countdef, \dimendef, etc. (suggested by DRF long ago, installed May 25) +Straightforward change to internal representation of assign_int and similar +commands, so that the chr part is now a pointer to the eqtb location. + +171. \advance, \multiply, \divide (suggested by FY, installed May 25) + +172. \hyphenchar (May 25) +A new command assign_font_int is introduced, and incorporated into +scan_something_internal and prefixed_command in the usual way. +The hyphen_char array entries are initialized in modules 483 and 506, +allocated in 482, used in modules 809 [is hyphenation to be suppressed?], +828 [insert the hyphen character], 946 [insert discretionary node +following hyphen], 1027 [implementation of \-]. +hyphen_char[k] is dumped and undumped in modules 1229 and 1230. + +173. \skewchar (May 25) +Loaded and fetched with the same command code as \hyphenchar. +Module 659 gets a dozen more lines of program, to compute the skew. + +174. \noexpand (May 25) +This involves: introduction of no_expand and dont_expand command codes; +frozen_dont_expand as an internal marker; small change to get_next +when that marker is sensed; change to processing of \if and \ifcat; +implementation of no_expand in the expand_calls subroutine. +I also changed the name of expand_calls to "expand". + +175. \meaning (May 25) +This adds one case to the "convert" command. +print_meaning is a new subroutine, using code that was in show_whatever. + +176. "dm" and "vu" are out, ".5\hsize" is in (May 25) +Straightforward changes to module 416. + +177. \texinfo f n becomes \fontdimen n f (May 25) + +178. \afterassignment (suggested by ARK, May 27) + +179. \chardef\xx=5\xx shouldn't say that \xx is undefined (May 27) + +180. \relax to be ignored like spaces in math mode (May 28) +and in a few other places: +is now used in modules 379, 988, 994, 1062, 1070, 1134, 1179 +(i.e., scan_left_brace, scan_box, scan_math, scan_delimiter, prefixed_command, +do_assignments, and just after \leaders). + +181. improve \mathaccent wrt sub/superscripts (sugg by HWT, May 30) + +182. its_all_over: remove dead_cycles>max_dead_cycles (May 30) +Modules 961 and 962 are combined and simplified. + +*** The changes above were installed into version 0.98 on May 31, 1983 *** + Version 0.99 + +183. \mark and \insert and \vadjust allowed in restricted hmode (Jun 3) +also in math; this is a comparatively big change +[at present, \mark in a display causes TeX to crash with "can't happen"!] +modules 652 and 679: mark_node,ins_node,adjust_node now permitted +modules 576 and 578: t becomes a global variable adjust_tail +modules 802 and 1110: new calling sequence to get the adjustments +modules 254, 986, 993, 995, 996: adjusted_hbox_group for the new kind of hbox +modules 698--690: cur_head and cur_tail added to alignment stack +modules 703, 712, 715: adjustments gathered and appended during \halign + +184. \ht, \wd, and \dp (Jun 6) + +185. When displaying noads, use ^ and _ instead of ( and [ (Jun 6) + +186. A..F in hex constants could be otherchar as well as letter (Jun 6) + +187. Remove from module 417 (Jun 7) +(it was redundant code) + +188. \mkern .5\thinmuskip and \mkern\thinmuskip should be legal (Jun 7) + +189. 2.5\space\space\dimen0 should work (Jun 7) +previously it worked after "plus" or "minus" only! + +190. to allow also \font for current font (Jun 7) +"if cur_cmd=def_font then f:=cur_font else" added to module 507 + +191. \gdef not to be global when \globaldefs<0 (Jun 7) +"and (global_defs>=0)" added to module 1139 + +192. \advance\spaceskip by-\spaceskip should yield zero_glue (Jun 7) +the procedure trap_zero_glue is culled from module 1147 + +193. \show should work with any token (Jun 7) + +194. \tokens to become 256 registers (Jun 8) +\toks and \toksdef added in the straightforward way +(this affects mainly eqtb, scan_something_internal, prefixed_command) + +195. allow \indent in math mode (Jun 8) +also, \valign in math mode to give missing $ error +modules 1001 and 1043 disappear; 1004 is generalized slightly. + +196. remove redundant code (Jun 8) +In module 1044, there's no need to check cur_group and call off_save. +Similarly in module 1053. + +197. new_write_whatsit shouldn't allow \openout-1, \closeout-1 (Jun 8) +(simple change to module 1258) + +198. \lastbox should give error in math mode (Jun 8) +(simple change to module 990) + +199. \leaders not followed by proper glue should be back_error (Jun 9) +[I made the change; TRIP should test this error message!] + +200. Module 702, correction to beginning of \noalign (Jun 9) +if mode=-vmode then normal_paragraph; + +201. After alphabetic constant, expand the optional space (Jun 10) + +202. Set space_factor:=1000 after rule or constructing an accent (Jun 12) +That's in modules 964 and 1036. + +203. blunder in module 783 (caught by Jim Sterken, fixed Jun 14) +disc_width:=0 needs to be set before testing if s=null +(A real bug that existed since the beginning! It showed up on page 37 + of the September 1982 TRIP manual; my hand-checking was incomplete...) + +204. Change to optional spaces after (Jun 14) +The optional space will now be analogous to that after . + +205. Fix conflict between \output and \everydisplay (Jun 14) +In change 49, I should have inserted every_display before calling build_page. + +206. Overflow errors to be consistent with statistics reporting (Jun 17) +(See change 129.) + +207. \tracing switches to be all positive vs nonpositive (Jun 17) + +*** The changes above were installed into version 0.99 on June 19, 1983 *** + Version 0.999 + +208. \catcode`\%=14 to be done by INITEX (Jun 20) + +209. \par in vmode to clear parshape etc. (Jun 21) +Module 1005, which contains vmode+par_end, now calls normal_paragraph. + +210. Improvement to change 39 (Jun 21) +Module 593, overfull_rule not appended if solely due to hbadness + +211. Alignment bug allows glue_set to be less than -1! (Jun 21) +Modules 723 and 724 need to be patched. + +212. Correction to change 134 (found by Debby Clark, Jun 22) +Module 68: n to be declared integer, not nonnegative_integer. + +213. "by" to be optional (suggested by Lamport, Jun 22) +Module 1158 disappears + +214. Module 1235, slight change in format_ident message (Jun 24) + +215. New measures needed to thwart trickery (Jun 25) +Glue set values computed by \span could have been brought into +TeX's registers via, e.g., \valign and \vsplit; so the +"kern" idea of module 722 is insufficient and should be abandoned. +Extra boxes and glue are added; this has additional virtue +of perfect accuracy in alignment of vertical rules. +The main change is to introduce a new module after 722, in which s and t +are updated for spans, and to eliminate the "equivalent kern" code from 719 +(the corresponding glue calculations are now done in the new module). + +216. leaders to affect height/width of their boxes (Jun 25) +Module 583 splits into two parts (one for hpack, one for vpack). + +217. \unskip permitted a little more often (Jun 28) +Module 1018 reports error only if last_page_glue then . + +219. "scaled" feature added to \font input. + +220. \mathaccent still not working right? (Jul 2) +Change 181, I forgot to correct delta when box x changed. + +221. Remove confusion possible on file of length 1 (found by Lamport) +Correction suggested by DRF, July 2: introduce bypass_eoln + +222. Allow things like ^^b. (July 4) +This simplifies modules 332 and 335; also affects 48 and 49. +And (surprise) 58. + +223. \escapechar \defaulthyphenchar \defaultskewchar \endlinechar (July 4) +to make TeX less dependent on the character set +A lot of error messages are now broken up so that they use print_esc + +224. erstat added for file opening/closing (by DRF, July 7) +That's module 27. + +225. \tracingpages output to show total glue too (July 11) +Added a procedure called print_page_totals, used also by show_activities. +Broke modules 214 and 896 into two modules each. + +226. Guard against insertion into an hbox (July 11) +A new procedure ensure_vbox is called in modules 917 and 925. + +227. = allowed (July 11) + +228. \errhelp parameter added (July 11) + +229. get_preamble_token should look at global_defs (July 11) +Module 699 is patched. + +*** The above changes installed in preliminary version 0.999 on July 12, 1983, +but I decided later in the day to do a few more things: + +230. \string, \noexpand, \meaning to allow \outer (Todd Allen, July 12) + +231. \the to be an expandable control sequence (July 12) +Several things in the language are cleaned up: +a) \the\tenrm replaced by \fontname\tenrm [\fontname] +b) when expanding edef, etc., result of \the still expanded only only level +c) expansion after \def not inhibited, since \noexpand is now present +d) \the\the disallowed. + +232. \unhbox and \unhcopy allowed in math mode if the box is void (July 12) +Module 1020 is extended to handle this case. + +233. Value of default_rule was incorrectly rounded (July 16) +Module 424: default_rule=26214 {.39999 pt} + +234. \mathaccent still not right! (July 16) +I need to make the final height the max of (height of accented letter w/o +superscript, height of unaccented letter w superscript). + +235. \newlinechar parameter (July 16) +simple change to print subroutine + +236. boxes and rules to be allowed in discretionaries (sugg by HP man, July 16) +in fact this simply requires omitting of the prohibition (in module 1031) +and a few more cases equivalent to kern_node in modules 754, 755, 784. + +237. \tracingcommands to show all expandable tokens (July 16) + +238. \char to be allowed in \hyphenation list (July 16) +Module 848 changes in the obvious way. + +239. \aftergroup (July 16) +A new save_type. + +240. Curtail running dimensions inside alignments (sugg by ARK, July 16) +Module 720. + +241. Strange pattern data could cause PASCAL error (found July 17) +Put "if hc[1]=127 then hyf[0]:=0;" at beginning of module 878. + +242. hc codes for hyphenation are one lower (July 17) +e.g., hc[...]:=lc_code(...)-1. This makes code 127 impossible to match. + +243. whatsits also allowed after hyphenatable words (July 17) +Module 812. + +244. \/ makes an explicit kern (July 17) +"subtype(tail):=explicit" in module 1023. + +*** Version 0.999 installed July 17, 1983. +But later in the day I decided to do a few more things: + +245. Lowercase letters allowed in file names (July 18) +In module 452, omit the conversion to uppercase. + +246. "No output file" becomes "No pages of output." (July 18) +Module 571. + +247. QRS on error leads to confirmation message (sugg by ARK, July 18) +Module 84. + +*** The real version 0.999 finally installed July 18. + * Version 1.0 + +(Changes made after the Version 0.999 listing of TeX82) +(Henceforth the "final" module numbers are used) + +248. Module 1215, allow space in \read n to \cs (by FY, July 25, 1983) +@x patch in get_r_token routine +begin restart: get_token; +@y +begin restart: repeat get_token; +until cur_tok<>space_token; +@z + +249. Module 498, we must stack the current if type (FY, July 27) +@x patch in conditional routine +begin @;@+save_cond_ptr:=cond_ptr;@/ +@y +@!this_if:small_number; {type of this conditional} +begin @;@+save_cond_ptr:=cond_ptr;this_if:=cur_chr;@/ +@z +Also replace cur_if by this_if in modules 501, 503, 506. The following +patches do only what is necessary to make things work: +@x + print_cmd_chr(if_test,cur_if); +@y + print_cmd_chr(if_test,this_if); +@z +@x +if cur_if=if_int_code then scan_int@+else scan_normal_dimen; +@y +if this_if=if_int_code then scan_int@+else scan_normal_dimen; +@z +@x +if cur_if=if_char_code then b:=(n=cur_chr)@+else b:=(m=cur_cmd); +@y +if this_if=if_char_code then b:=(n=cur_chr)@+else b:=(m=cur_cmd); +@z + +250. Module 507, \ifx need not put a control sequence in hash table (July 29) +@x +get_token; n:=cs_ptr; p:=cur_cmd; q:=cur_chr; +get_token; if cur_cmd<>p then b:=false +@y +get_next; n:=cs_ptr; p:=cur_cmd; q:=cur_chr; +get_next; if cur_cmd<>p then b:=false +@z + +251. Module 86, message is lost (noticed by HWT, July 31) +@x +print("..."); print_ln; return; +@y +print("..."); print_ln; update_terminal; return; +@z + +252. Don't put empty at end of \input file! (Aug 1) +[This simplifies the rules and the program, and also gets around a bug +that occurred at the end of files with \endlinechar<0.] +@x Module 362: +@ An empty line is inserted at the end of the file, if the last line +wasn't already empty, because |input_ln| sets |last:=first| when +it discovers an |eof|. +@^empty line at end of file@> + +@= +begin incr(line); first:=start; +if not force_eof then + begin if input_ln(cur_file,true) then {not end of file} + firm_up_the_line {this sets |limit|} + else if limit<>start then firm_up_the_line + {if |pausing|, the user can add more lines} + else force_eof:=true; +@y +@ @= +begin incr(line); first:=start; +if not force_eof then + begin if input_ln(cur_file,true) then {not end of file} + firm_up_the_line {this sets |limit|} + else force_eof:=true; +@z + +*** The changes above went into Version 0.9999, which was widely distributed + +253. Ridiculous blunder made in change 146 (found by FY, August 16) +@x Correction to module 497 +else loop@+begin q:=cond_ptr; + if link(q)=p then + begin type(p):=l; return; + end; + if q=null then confusion("if"); +@:this can't happen if}{\quad if@> + q:=link(q); +@y +else begin q:=cond_ptr; + loop@+ begin if q=null then confusion("if"); +@:this can't happen if}{\quad if@> + if link(q)=p then + begin type(q):=l; return; + end; + q:=link(q); + end; +@z + +254. Minor amendment to stat(s) printing (cf. change 129) (August 16) +@x in module 1334 + wlog_ln(' ',str_ptr-init_str_ptr:1,' strings out of ', + max_strings-init_str_ptr:1);@/ +@y + wlog(' ',str_ptr-init_str_ptr:1,' string'); + if str_ptr<>init_str_ptr+1 then wlog('s'); + wlog_ln(' out of ', +@z + +255. Bug in \xleader computations (found by FY, August 18) +@x in module 592 +@!lq,@!lr:integer; {quantities used in calculations for leaders} +@y +@!lq,@!lr,@!lx:integer; {quantities used in calculations for leaders} +@z +@x in module 626 + begin edge:=cur_h+rule_wd; + @; + while cur_h+leader_wd<=edge do + @; +@y + begin edge:=cur_h+rule_wd; lx:=0; + @; + while cur_h+leader_wd<=edge do + @; +@z +@x in module 627 + leader_wd:=leader_wd+lx; +@y +@z +@x in module 628 +cur_h:=save_h+leader_wd; +@y +cur_h:=save_h+leader_wd+lx; +@z +@x in module 635 + begin edge:=cur_v+rule_ht; + @; + while cur_v+leader_ht<=edge do + @; +@y + begin edge:=cur_v+rule_ht; lx:=0; + @; + while cur_v+leader_ht<=edge do + @; +@z +@x in module 636 + leader_ht:=leader_ht+lx; +@y +@z +@x in module 637 +cur_v:=save_v-height(leader_box)+leader_ht; +@y +cur_v:=save_v-height(leader_box)+leader_ht+lx; +@z +Also insert the following in modules 619 and 629: +@!lx:scaled; {extra space between leader boxes} + +256. \/ should apply to ligatures! (August 20) +@x in module 1113 +var f:internal_font_number; {the font in the |char_node|} +begin if is_char_node(tail)and(tail<>head) then + begin f:=font(tail); + tail_append(new_kern(char_italic(f)(char_info(f)(character(tail))))); +@y +label exit; +var p:pointer; {|char_node| at the tail of the current list} +@!f:internal_font_number; {the font in the |char_node|} +begin if tail<>head then + begin if is_char_node(tail) then p:=tail + else if type(tail)=ligature_node then p:=lig_char(tail) + else return; + f:=font(p); + tail_append(new_kern(char_italic(f)(char_info(f)(character(p))))); +@z +@x later in that same module +end; +@y +exit: end; +@z + +257. Another debugging hack. (August 27) +@x module 1339 +15: begin font_in_short_display:=null_font; short_display(n); + end; +@y +15: begin font_in_short_display:=null_font; short_display(n); + end; +16: panicking:=not panicking; +@z + +258. Redundant code eliminated (August 27) +Module 531 needn't set and reset name_in_progress [but it's harmless]. + +259. Bug: \input shouldn't occur during font size spec (Spivak; fixed August 27) +@x module 1258 +@ @= +@y +@ @= +name_in_progress:=true; {this keeps |cur_name| from being changed} +@z +@x module 1258 +else s:=-1000 +@y +else s:=-1000; +name_in_progress:=false +@z + +260. \ifhbox and \ifvbox introduced. (August 27) +@x module 487 +@d ifx_code=10 { `\.{\\ifx}' } +@d if_eof_code=11 { `\.{\\ifeof}' } +@d if_true_code=12 { `\.{\\iftrue}' } +@d if_false_code=13 { `\.{\\iffalse}' } +@d if_case_code=14 { `\.{\\ifcase}' } +@y +@d if_hbox_code=10 { `\.{\\ifhbox}' } +@d if_vbox_code=11 { `\.{\\ifvbox}' } +@d ifx_code=12 { `\.{\\ifx}' } +@d if_eof_code=13 { `\.{\\ifeof}' } +@d if_true_code=14 { `\.{\\iftrue}' } +@d if_false_code=15 { `\.{\\iffalse}' } +@d if_case_code=16 { `\.{\\ifcase}' } +@z +@x +primitive("ifx",if_test,ifx_code); +@y +primitive("ifhbox",if_test,if_hbox_code); +@!@:if_hbox_}{\.{\\ifhbox} primitive@> +primitive("ifvbox",if_test,if_vbox_code); +@!@:if_vbox_}{\.{\\ifvbox} primitive@> +primitive("ifx",if_test,ifx_code); +@z +@x module 488 + ifx_code:print_esc("ifx"); +@y + if_hbox_code:print_esc("ifhbox"); + if_vbox_code:print_esc("ifvbox"); + ifx_code:print_esc("ifx"); +@z +@x module 501 +if_void_code: @; +@y +if_void_code, if_hbox_code, if_vbox_code: @; +@z +@x module 505 +@ @= +begin scan_eight_bit_int; b:=(box(cur_val)=null); +end +@y +@ @= +begin scan_eight_bit_int; p:=box(cur_val); +if this_if=if_void_code then b:=(p=null) +else if p=null then b:=false +else if this_if=if_hbox_code then b:=(type(p)=hlist_node) +else b:=(type(p)=vlist_node); +end + +261. Serious data structure error (found by Todd Allen, August 29) +@x module 478 (an error introduced in change 231) + q:=the_toks; link(p):=link(temp_head); p:=q; +@y + q:=the_toks; + if link(temp_head)<>null then + begin link(p):=link(temp_head); p:=q; + end; +@z + +262. Minor patch for efficiency (August 29) +@x module 466 + begin store_new_token(info(r)); r:=link(r); +@y + begin fast_store_new_token(info(r)); r:=link(r); +@z + +263. Minor patch to error message (August 29) +@module 579 + print(" has "); print_int(font_params[f]); + print(" fontdimen parameters"); +@.Font x has n fontdimen...@> +@y + print(" has only "); print_int(font_params[f]); + print(" fontdimen parameters"); +@.Font x has only...@> +@z + +*** The changes above comprise version 0.99999, used only at SAIL (August 29) + +264. funny blank spaces are showable (August 30) +@x module 298 +spacer: print("blank space"); +@y +spacer: chr_cmd("blank space "); +@z + +265. \newlinechar [change 235] should affect print_char too (August 31) +@x module 58 +procedure print_char(@!c:ascii_code); {prints a single character} +begin case selector of +term_and_log: begin wterm(xchr[c]); write(log_file,xchr[c]); + incr(term_offset); incr(file_offset); + if term_offset=max_print_line then + begin wterm_cr; term_offset:=0; + end; + if file_offset=max_print_line then + begin wlog_cr; file_offset:=0; + end; + end; +log_only: begin write(log_file,xchr[c]); incr(file_offset); + if file_offset=max_print_line then print_ln; + end; +term_only: begin wterm(xchr[c]); incr(term_offset); + if term_offset=max_print_line then print_ln; + end; +no_print: do_nothing; +pseudo: if tally then + if selector +@y +@z +@x module 265 +primitive("the",the,0); +@!@:the_}{\.{\\the} primitive@> +primitive("toks",toks_register,0); +@!@:toks_}{\.{\\toks} primitive@> +primitive("unskip",unskip,0);@/ +@!@:unskip_}{\.{\\unskip} primitive@> +@y +primitive("the",the,0);@/ +@!@:the_}{\.{\\the} primitive@> +primitive("toks",toks_register,0);@/ +@!@:toks_}{\.{\\toks} primitive@> +@z +@x module 266 +last_skip: print_esc("lastskip"); +@y +@z +@x module 266 +unskip: print_esc("unskip"); +@y +@z +@x module 413 +last_skip: @; +@y +last_item: @; +@z +@x module 416 [I also changed the comment] +primitive("dp",set_box_dimen,depth_offset); +@!@:dp_}{\.{\\dp} primitive@> +@y +primitive("dp",set_box_dimen,depth_offset); +@!@:dp_}{\.{\\dp} primitive@> +primitive("lastpenalty",last_item,int_val); +@!@:last_penalty_}{\.{\\lastpenalty} primitive@> +primitive("lastkern",last_item,dimen_val); +@!@:last_kern_}{\.{\\lastkern} primitive@> +primitive("lastskip",last_item,glue_val); +@!@:last_skip_}{\.{\\lastskip} primitive@> +@z +@x module 417 +else print_esc("dp"); +@y +else print_esc("dp"); +last_item: if chr_code=int_val then print_esc("lastpenalty") +else if chr_code=dimen_val then print_esc("lastkern") +else print_esc("lastskip"); +@z +@x module 424 +@ Here is where \.{\\lastskip} is implemented. The reference count will be +updated later. +@:last_skip_}{\.{\\lastskip} primitive@> + +@= +begin cur_val:=zero_glue; cur_val_level:=glue_val; +if not is_char_node(tail)and(mode<>0) then + begin if type(tail)=glue_node then + begin cur_val:=glue_ptr(tail); + if subtype(tail)=mu_glue then cur_val_level:=mu_val; + end; + end +else if (mode=vmode)and(tail=head)and(last_page_glue<>max_halfword) then + cur_val:=last_page_glue; +end +@y +@ Here is where \.{\\lastpenalty}, \.{\\lastkern}, and \.{\\lastskip} are +implemented. The reference count for \.{\\lastskip} will be updated later. + +@= +begin if cur_chr=glue_val then cur_val:=zero_glue@+else cur_val:=0; +cur_val_level:=cur_chr; +if not is_char_node(tail)and(mode<>0) then + case cur_chr of + int_val: if type(tail)=penalty_node then cur_val:=penalty(tail); + dimen_val: if type(tail)=kern_node then cur_val:=width(tail); + glue_val: if type(tail)=glue_node then + begin cur_val:=glue_ptr(tail); + if subtype(tail)=mu_glue then cur_val_level:=mu_val; + end; + end {there are no other cases} +else if (mode=vmode)and(tail=head) then + case cur_chr of + int_val: cur_val:=last_penalty; + dimen_val: cur_val:=last_kern; + glue_val: if last_glue<>max_halfword then cur_val:=last_glue; + end; {there are no other cases} +end +@z +@x module 982 [also the comment changes] +@!last_page_glue:pointer; {used to implement \.{\\lastskip}} +@y +@!last_glue:pointer; {used to implement \.{\\lastskip}} +@!last_penalty:integer; {used to implement \.{\\lastpenalty}} +@!last_kern:scaled; {used to implement \.{\\lastkern}} +@z +@x module 991 +last_page_glue:=max_halfword; +@y +last_glue:=max_halfword; last_penalty:=0; last_kern:=0; +@z +@x module 994 +@; +@y +@; +@z +@x module 996 +@ @= +if last_page_glue<>max_halfword then delete_glue_ref(last_page_glue); +if type(p)=glue_node then + begin last_page_glue:=glue_ptr(p); add_glue_ref(last_page_glue); + end +else last_page_glue:=max_halfword +@y +@ @= +if last_glue<>max_halfword then delete_glue_ref(last_glue); +last_penalty:=0; last_kern:=0; +if type(p)=glue_node then + begin last_glue:=glue_ptr(p); add_glue_ref(last_glue); + end +else begin last_glue:=max_halfword; + if type(p)=penalty_node then last_penalty:=penalty(p) + else if type(p)=kern_node then last_kern:=width(p); + end +@z +@x module 1017 +if last_page_glue<>max_halfword then delete_glue_ref(last_page_glue); +@; {this sets |last_page_glue:=max_halfword|} +@y +if last_glue<>max_halfword then delete_glue_ref(last_glue); +@; {this sets |last_glue:=max_halfword|} +@z +@x module 1048 +vmode+vmove,hmode+hmove,mmode+hmove,any_mode(last_skip), +@y +vmode+vmove,hmode+hmove,mmode+hmove,any_mode(last_item), +@z +@x module 1104 +any_mode(unskip): delete_skip; +@y +any_mode(remove_item): delete_last; +@z +@x module 1105 +procedure delete_skip; +var p:pointer; {runs through the current list} +begin if (mode=vmode)and(tail=head) then + @ +else begin if not is_char_node(tail) then if type(tail)=glue_node then +@y +procedure delete_last; +var p:pointer; {runs through the current list} +begin if (mode=vmode)and(tail=head) then + @ +else begin if not is_char_node(tail) then if type(tail)=cur_chr then +@z +@x module 1106 +@ @= +begin if last_page_glue<>max_halfword then + begin you_cant; + help2("Sorry...I'm usually unable to take things from the current")@/ + ("page. Try `I\vskip-\lastskip' instead."); error; +@y +@ @= +begin if (cur_chr<>glue_node)or(last_glue<>max_halfword) then + begin you_cant; + help2("Sorry...I'm usually unable to take things from the current")@/ + ("page. Try `I\vskip-\lastskip' instead."); + if cur_chr=kern_node then help_line[0]:= + ("page. Try `I\kern-\lastkern' instead.") + else if cur_chr<>glue_node then help_line[0]:=@| + ("page. Perhaps you can make the output routine do it."); + error; +@z +@x module 1107 +primitive("unhbox",un_hbox,box_code);@/ +@y +primitive("unpenalty",remove_item,penalty_node);@/ +@!@:un_penalty_}{\.{\\unpenalty} primitive@> +primitive("unkern",remove_item,kern_node);@/ +@!@:un_kern_}{\.{\\unkern} primitive@> +primitive("unskip",remove_item,glue_node);@/ +@!@:un_skip_}{\.{\\unskip} primitive@> +primitive("unhbox",un_hbox,box_code);@/ +@z +@x module 1108 +un_hbox: if chr_code=copy_code then print_esc("unhcopy") +@y +remove_item: if chr_code=glue_node then print_esc("unskip") + else if chr_code=kern_node then print_esc("unkern") + else print_esc("unpenalty"); +un_hbox: if chr_code=copy_code then print_esc("unhcopy") +@z + +*** The above changes installed in version 0.999999 (September 5, 1983) + +267. Undo change 29: it was overkill and not needed (Sep 17) +@x module 1257 +label exit, common_ending; +var u:pointer; {user's font identifier} +@!s:scaled; {stated ``at'' size, or negative of scaled magnification} +@!f:internal_font_number; {runs through existing fonts} +begin if job_name=0 then open_log_file; + {avoid confusing \.{texput} with the font name} +@; +define(u,set_font,null_font); scan_optional_equals; scan_file_name; +@; +@; +f:=read_font_info(u,cur_name,cur_area,s); +common_ending: equiv(u):=f; geq_define(hash_used,set_font,f); +font_ident[f]:=hash_used; +exit:end; +@y +label common_ending; +var u:pointer; {user's font identifier} +@!s:scaled; {stated ``at'' size, or negative of scaled magnification} +@!f:internal_font_number; {runs through existing fonts} +begin if job_name=0 then open_log_file; + {avoid confusing \.{texput} with the font name} +get_r_token; u:=cs_ptr; +define(u,set_font,null_font); scan_optional_equals; scan_file_name; +@; +@; +f:=read_font_info(u,cur_name,cur_area,s); +common_ending: equiv(u):=f; font_ident[f]:=u; +end; +@z +@x module 1260 +@ We reserve a special control sequence for the font identifier; this one +cannot be redefined by the user, so it is safe to return it as a value of +\.{\\the\\font}. + +@= +get_r_token; +if cs_ptr + help2("You should say, e.g., `\font\ffn=fontfilename'.")@/ + ("(I'm going to ignore the \font command you just gave.)"); + back_error; return; + end; +repeat if hash_is_full then overflow("hash size",hash_size); +@:TeX capacity exceeded hash size}{\quad hash size@> +decr(hash_used); +until text(hash_used)=0; {search for an empty location in |hash|} +u:=cs_ptr; text(hash_used):=text(u); {copy the name} +@!stat incr(cs_count);@+tats@;@/ +@y +@z +Note: Since module 1260 has disappeared, module 1258 has been split into two. + +268. Minor change to diagnostic output format (September 18) +@x module 211 [print_mode] + 2:print("displayed math"); +@y + 2:print("display math"); +@z + +269. Kerns inserted for accents must be explicit (September 20) +@x module 1123 +@!p,@!q: pointer; {character and box nodes} +@y +@!p,@!q,@!r:pointer; {character, box, and kern nodes} +@z +@x module 1125 +link(tail):=new_kern(delta); link(link(tail)):=p; +link(p):=new_kern(-a-delta); tail:=link(p); p:=q; +@y +r:=new_kern(delta); subtype(r):=explicit; link(tail):=r; link(r):=p; +tail:=new_kern(-a-delta); subtype(tail):=explicit; link(p):=tail; p:=q; +@z + +270. "log" changed to "transcript" in a few output messages (Sep 26) +@x module 535 +prompt_file_name("log file name",".log"); +@y +prompt_file_name("transcript file name",".log"); +@z +@x module 1293 + ("lists on your terminal as well as on the log file."); +@y + ("lists on your terminal as well as in the transcript file."); +@z +@x module 1335 + print_nl("(see the log file for additional information)"); +@.see the log file...@> +@y + print_nl("(see the transcript file for additional information)"); +@.see the transcript file...@> +@z + +271. Uninitialized variable bug (found by Bernd Schulze, 1 Oct 83) +@x module 944 + begin if trie_op_ptr>=max_quarterword-1 then {overflow} + begin trie_op_ptr:=max_quarterword; + new_trie_op:=min_quarterword; return; +@y we allow one more trie op (OK since trie_op_hash_size is big enough) + begin if trie_op_ptr=max_quarterword then {overflow} + begin new_trie_op:=min_quarterword; return; +@z + +272. Spaces at end of lines ignored also in TEX.POOL (by DRF, 14 Oct 83) +@x module 52 + begin if eoln(pool_file) then bad_pool('! TEX.POOL line too short.'); +@.TEX.POOL line too short@> + read(pool_file,m); append_char(xord[m]); +@y + begin if eoln(pool_file) then m:=' '@+else read(pool_file,m); + append_char(xord[m]); +@z + +273. |history| updates (by DRF, 14 Oct 83) +@x module 77 +deletions_allowed:=true; history:=spotless; error_count:=0; +@y +deletions_allowed:=true; error_count:=0; {|history| is initialized elsewhere} +@z +@x module 1332 +@p begin {@!|start_here|} +@y +@p begin {@!|start_here|} +history:=fatal_error_stop; {in case we quit during initialization} +@z +@x ibid. +main_control; {come to life} +@y +history:=spotless; {ready to go!} +main_control; {come to life} +@z + +274. improved "runaway" messages (suggested by FY, October 18) +@x module 305 (the introductory comment is changed too) +@d aligning=4 {|scanner_status| when reading an alignment preamble} + +@= +@!scanner_status : normal..aligning; {can a subfile end now?} +@y +@d aligning=4 {|scanner_status| when reading an alignment preamble} +@d absorbing=5 {|scanner_status| when reading a balanced text} + +@= +@!scanner_status : normal..absorbing; {can a subfile end now?} +@z +@x module 306 (string space is also now conserved slightly) + defining: begin print("definition?"); p:=def_ref; + end; + matching: begin print("argument?"); p:=temp_head; + end; + aligning: begin print("preamble?"); p:=hold_head; + end; + end; {there are no other cases} + print_ln; show_token_list(link(p),null,error_line-10); +@y + defining: begin print("definition"); p:=def_ref; + end; + matching: begin print("argument"); p:=temp_head; + end; + aligning: begin print("preamble"); p:=hold_head; + end; + absorbing: begin print("text"); p:=def_ref; + end; + end; {there are no other cases} + print_char("?");print_ln; show_token_list(link(p),null,error_line-10); +@x module 339 (I also changed the module name) +end; {there are no other cases} +@y +absorbing:begin print("text"); info(p):=right_brace_token+"}"; + end; +end; {there are no other cases} +@z +@x module 473 +begin scanner_status:=defining; warning_index:=cs_ptr; +def_ref:=get_avail; info(def_ref):=null; +@y +begin if macro_def then scanner_status:=defining +@+else scanner_status:=absorbing; +warning_index:=cs_ptr; def_ref:=get_avail; info(def_ref):=null; +@z + +275. similar, but this corrects a real bug (found by FY, October 18) +@x module 1226 + cs_ptr:=q; + @; + if cur_cmd<>left_brace then @; + back_input; q:=scan_toks(false,false); +@y + @; + if cur_cmd<>left_brace then @; + back_input; cs_ptr:=q; q:=scan_toks(false,false); +@z + +276. Change #119 should have changed module 1090 too (by Barry Smith, Oct 24) +@x module 1183 [which was module 1090 at the time of change 119] +begin if c mod delimited_code=above_code then scan_normal_dimen; +if c>=delimited_code then + begin scan_delimiter(garbage,false); scan_delimiter(garbage,false); + end; +@y +begin if c>=delimited_code then + begin scan_delimiter(garbage,false); scan_delimiter(garbage,false); + end; +if c mod delimited_code=above_code then scan_normal_dimen; +@z + +277. Changes for efficiency, based on empirical frequency data (Nov 9) +@x module 45 [since the result is true almost always] +begin j:=str_start[s]; result:=false; +while jbuffer[k] then goto not_found; +@y +begin j:=str_start[s]; +while jbuffer[k] then + begin result:=false; goto not_found; + end; +@z +@x module 380 [many compilers don't handle "while true do" very well] +label done; +begin loop begin get_next; +@^inner loop@> + if cur_cmd<=max_command then goto done; + if cur_cmd>=call then + if cur_cmd +if cur_cmd<=max_command then goto done; +if cur_cmd>=call then + if cur_cmd0 then +@z +@x module 852 [avoid calling |badness| in most common case] +else begin b:=badness(line_width-cur_active_width[1],cur_active_width[2]); +@y +else begin if shortfall>7230584 then if cur_active_width[2]<1663497 then + begin b:=inf_bad; fit_class:=very_loose_fit; goto done1; + end; + b:=badness(shortfall,cur_active_width[2]); +@z +@x module 852, continued + else fit_class:=decent_fit; +@y + else fit_class:=decent_fit; + done1: +@z +@x module 853 [using |shortfall|, since we now have it] +begin if cur_active_width[1]-line_width>cur_active_width[6] then + b:=inf_bad+1 +else b:=badness(cur_active_width[1]-line_width,cur_active_width[6]); +@y +begin if -shortfall>cur_active_width[6] then b:=inf_bad+1 +else b:=badness(-shortfall,cur_active_width[6]); +@z + +278. Forgotten |error| call (noticed by Gabi Kuper, December 3, 1983) +@x module 500 + help1("I'm ignoring this; it doesn't match any \if."); +@y + help1("I'm ignoring this; it doesn't match any \if."); + error; +@z + +*** Version 1.0 released on December 3, 1983 incorporates all of the above. + Version 1.1 + +279. Problem with change 267 (found by Mike Urban, received 2 Feb 84) +(I had overlooked many problems, e.g. `{\font\a=x \global\a}\the\font' +and `\font\a=x \font\b=x \let\b=\undefined \the\a', etc. +The remedy involves removal of the font_ident array, so there's a +sprinkling of corrections in lots of modules. But basically the change +is quite conservative, so it shouldn't spawn any new bugs (it says here).) + +@x module 174 (removing a reference to |font_ident|) + else sprint_cs(font_ident[font(p)]); +@y + else @; +@z +@x module 176 (removing a reference to |font_ident|) + else sprint_cs(font_ident[font(p)]); +@y + else @; +@z +@x module 222 (redefining and expanding the `frozen' area) +@d frozen_null_font=frozen_control_sequence+9 {permanent `\.{\\nullfont}'} +@d frozen_dont_expand=frozen_control_sequence+10 + {permanent `\.{\\notexpanded:}'} +@d undefined_control_sequence=frozen_control_sequence+11 {dummy location} +@y +@d frozen_dont_expand=frozen_control_sequence+9 + {permanent `\.{\\notexpanded:}'} +@d frozen_null_font=frozen_control_sequence+10 + {permanent `\.{\\nullfont}'} +@d font_id_base=frozen_null_font-font_base + {begins table of 257 permanent font identifiers} +@d undefined_control_sequence=frozen_null_font+257 {dummy location} +@z +@x module 234 (removing a reference to |font_ident|, awkwardly) +print_char("="); sprint_cs(font_ident[equiv(n)]); +@y +print_char("=");@/ +print_esc(hash[font_id_base+equiv(n)].rh); + {that's |text(font_id_base+equiv(n))|} +@z +@x module 256 (adding a new macro, font_id_text) +@d hash_is_full == (hash_used=hash_base) {test if all positions are occupied} +@y +@d hash_is_full == (hash_used=hash_base) {test if all positions are occupied} +@d font_id_text(#) == text(font_id_base+#) {a frozen font identifier's name} +@z +@x module 262 (relaxing a former restriction) +else if (text(p)<128)or(text(p)>=str_ptr) then print_esc("NONEXISTENT.") +@y +else if (text(p)<0)or(text(p)>=str_ptr) then print_esc("NONEXISTENT.") +@z +@x module 267 (pick up the changes from 174 and 176) +@!@^Single-character primitives@> +@y +@!@^Single-character primitives@> + +Meanwhile, this is a convenient place to catch up on something we were unable +to do before the hash table was defined: + +@= +print_esc(font_id_text(font(p))) +@z +@x module 415 (removing another reference to font_ident) + scanned_result(font_ident[cur_val])(ident_val); +@y + scanned_result(font_id_base+cur_val)(ident_val); +@z +@x module 548 (change to the comment only) +to the user's font~\.{\\f}. For example, if this internal number is 13, +we will have |font_ident[13]=p| and |equiv(p)=13|, where |p| is the |eqtb| +location of the control sequence~\.{\\f}. +@y +to the user's font~\.{\\f}. Adding this number to |font_id_base| gives the +|eqtb| location of a ``frozen'' control sequence that will always select +the font. +@z +@x module 549 (deleting the declaration of font_ident) +@!font_ident:array[internal_font_number] of pointer; {the most recent user + font identifier corresponding to an internal font number} +@y +@z +@x module 552 (deleting an unnecessary initialization of font_ident) +font_ident[null_font]:=frozen_null_font; +@y +@z +@x module 579 (removing another reference to font_ident) + begin print_err("Font "); sprint_cs(font_ident[f]); +@y + begin print_err("Font "); print_esc(font_id_text(f)); +@z +@x module 1257 (this is the real change!) +begin if job_name=0 then open_log_file; + {avoid confusing \.{texput} with the font name} +get_r_token; u:=cs_ptr; +define(u,set_font,null_font); scan_optional_equals; scan_file_name; +@; +@; +f:=read_font_info(u,cur_name,cur_area,s); +common_ending: equiv(u):=f; font_ident[f]:=u; +@y +@!t:str_number; {name for the frozen font identifier} +@!old_setting:0..max_selector; {holds |selector| setting} +begin if job_name=0 then open_log_file; + {avoid confusing \.{texput} with the font name} +get_r_token; u:=cs_ptr; +if u>=hash_base then t:=text(u) +else if u>=single_base then + if u=null_cs then t:="FONT"@+else t:=u-single_base +else begin old_setting:=selector; selector:=new_string; + print("FONT"); print(u-active_base); selector:=old_setting; +@.FONTx@> + str_room(1); t:=make_string; + end; +define(u,set_font,null_font); scan_optional_equals; scan_file_name; +@; +@; +f:=read_font_info(u,cur_name,cur_area,s); +common_ending: equiv(u):=f; eqtb[font_id_base+f]:=eqtb[u]; font_id_text(f):=t; +@z +@x module 1260 (change to the comment only) +the new value becomes the |font_ident| of record. Font names `\.{xyz}' and +@y +the new name becomes the font identifier of record. Font names `\.{xyz}' and +@z +@x module 1322 (no need to dump font_ident) +begin dump_int(font_ident[k]); +dump_qqqq(font_check[k]); +@y +begin dump_qqqq(font_check[k]); +@z +@x module 1322 (or to print from it) +print_nl("\font"); sprint_cs(font_ident[k]); print_char("="); +@y +print_nl("\font"); print_esc(font_id_text(k)); print_char("="); +@z +@x module 1323 (or to undump it) +begin undump(active_base)(undefined_control_sequence)(font_ident[k]); +undump_qqqq(font_check[k]);@/ +@y +begin undump_qqqq(font_check[k]);@/ +@z + +280. Double interrupt possibility (found by Clint Cuzzo, received 9 Feb 84) +@x module 1031 +if interrupt>0 then if OK_to_interrupt then + begin back_input; pause_for_instructions; goto big_switch; +@y +if interrupt<>0 then if OK_to_interrupt then + begin back_input; check_interrupt; goto big_switch; +@z + +281. Improve spacing in $(A,<)$. (12 Feb 84) +@x module 764 +"0234000122*4000133**3**344*0400400*000000234000111*4111112341011" +@y +"0234000122*4000133**3**344*0400400*000000234000111*1111112341011" +@z + +282. Bad goto! (diagnosis by Clint Cuzzo and George O'Connor, recd 13 Feb 84) +@x module 344 (here we simply change the name of module 346) +any_state_plus(invalid_char): @; +@y +any_state_plus(invalid_char): @; +@z +@x module 346 (because clear_for_error_prompt might make state=token_list) +goto switch; +@y +goto restart; +@z + +283. String pool economy (suggested by DRF, 13 Feb 84) +@x module 537 +@; +@y +if name=str_ptr-1 then {we can conserve string pool space now} + begin flush_string; name:=cur_name; + end; +@; +@z + +284. Nicer scaled output (suggested by METAFONT development, 26 Feb 84) +@x module 103 +be reproduced exactly. [{\sl Proof:\/} If round$(x)=\lfloor +x+{1\over2}\rfloor$ and if $\alpha<1$, it is not difficult to verify that +round$(\alpha\,\hbox{round}( \alpha^{-1}n))=n$ for all integers |n|. In +our case $\alpha=2^{16}/10^5$.] + +@p procedure print_scaled(@!s:scaled); {prints scaled real, rounded to five + digits} +begin if s<0 then + begin print_char("-"); negate(s); {print the sign, if negative} + end; +print_int(s div unity); {print the integer part} +s:=((s mod unity) * 3125 + 1024) div 2048; + {now |0<=s<100000| is the fraction part} +print_char("."); +repeat print_char("0"+(s div 10000)); s:=10*(s mod 10000); +until s=0; +end; +@y +be reproduced exactly; the ``simplest'' such decimal number is output, +but there is always at least one digit following the decimal point. + +The invariant relation in the \&{repeat} loop is that a sequence of +decimal digits yet to be printed will yield the original number if and only if +they form a fraction~$f$ in the range $s-\delta\L10\cdot2^{16}funity then s:=s+@'100000-(delta div 2); {round the last digit} +print_char("0"+(s div unity)); s:=10*(s mod unity); delta:=delta*10; +until s<=delta; +end; +@z + +*** Those six changes account for version 1.1 (February 29, 1984). +*** And we put the following change in too, at the last minute: + +285. ".00000762939453126pt" didn't round correctly! (March 2, 1984) +@x module 452 + if k<16 then {digits for |k>=16| cannot affect the result} +@y (Note, I also changed the comment in module 102: 16 -> 17) + if k<17 then {digits for |k>=17| cannot affect the result} +@z + +*** Note: I changed "cs_ptr" to "cur_cs", since the name change is more +indicative of the fact that this variable makes a trio with cur_cmd +and cur_chr. The TEX.WEB source changed 78 times, as a result, but +none of the author's change files were affected. +(But note: "save_cs_ptr" was not changed to "save_cur_cs", because +of a name conflict.) + +*** And the following two were slipped in at the last second: + +286. loophole permitted get_next recursion (March 16, 1984) +@x module 336 + begin @; +@y + begin deletions_allowed:=false; + @; +@z +@x ibid + end; +@y + deletions_allowed:=true; + end; +@z [the changes to deletions_allowed in module 338 can now be removed] + +287. terminal not open when the program starts bad (March 24, 1984) +@x module 1332 +initialize; {set global variables to their starting values} +@@; +if bad>0 then + begin wake_up_terminal; + wterm('Ouch---my internal constants have been', + ' clobbered!---case ',bad:1); +@.Ouch...clobbered@> + goto final_end; + end; +@y +@@; +if bad>0 then + begin t_open_out; + wterm('Ouch---my internal constants have been', + ' clobbered!---case ',bad:1); +@.Ouch...clobbered@> + goto final_end; + end; +initialize; {set global variables to their starting values} +@z + +*** Note: "Cosmetic" changes were also made in module 363 ("print_ln" +moved to after "wake_up_terminal") and in some commentary. + +*** Another last-minute correction: +288. \patterns{xxx...xxxdxxxdxxx} anomaly found by JRD (Mar 27, 1984) +@x module 962 +else begin hyf[k]:=cur_chr-"0"; digit_sensed:=true; +@y +else begin hyf[k]:=cur_chr-"0"; + if k<63 then digit_sensed:=true; +@z + +*** Yoicks, yet ANOTHER: +289. a whole case of copy_node_list forgotten (Apr 11, 1984) +@x module 206 +othercases confusion("copying") +@y +adjust_node: begin r:=get_node(small_node_size); + adjust_ptr(r):=copy_node_list(adjust_ptr(p)); + end; {|words=1=small_node_size-1|} +othercases confusion("copying") +@z + +*** And "finally"... +290. uninitialized variables could be accessed (found by Nick Briggs, June 11) +@x module 552 +font_size[null_font]:=0; font_dsize[null_font]:=0; +@y +font_size[null_font]:=0; font_dsize[null_font]:=0; +char_base[null_font]:=0; width_base[null_font]:=0; +height_base[null_font]:=0; depth_base[null_font]:=0; +italic_base[null_font]:=0; lig_kern_base[null_font]:=0; +kern_base[null_font]:=0; exten_base[null_font]:=0; +@z (actual values are immaterial except for debugging safeguards) + +291. same, cf. modules 355 and 389 (Nick Briggs, June 11) +@x module 331 +scanner_status:=normal; first:=1; +@y +for first:=0 to buf_size do buffer[first]:=0; +scanner_status:=normal; warning_index:=null; first:=1; +@z (error was harmless except that it might trigger debugging checks) + +292. missing ligature/kern (found by JRD, June 21) +@x module 1036 + if (cur_cmd=letter)or(cur_cmd=other_char) then r:=qi(cur_chr) +@y + if (cur_cmd=letter)or(cur_cmd=other_char)or(cur_cmd=char_given) then + r:=qi(cur_chr) +@z + +293. quarterword constraint is made explicit (July 4) +@x module 111 +if (buf_size>max_halfword) then bad:=18; +@y +if buf_size>max_halfword then bad:=18; +if max_quarterword-min_quarterword<255 then bad:=19; +@z + +294. trivial optimization made for consistency with MF (July 7) +@x module 363 +if (pausing>0)and(interaction>nonstop_mode) then +@y +if pausing>0 then if interaction>nonstop_mode then +@z + +295. \tracingmacros>1 for more diagnostics (July 8) +@x module 323 + if t=macro then param_start:=param_ptr@+else loc:=link(p); +@y + if t=macro then param_start:=param_ptr + else begin loc:=link(p); + if tracing_macros>1 then + begin begin_diagnostic; print_nl(""); + case t of + mark_text:print_esc("mark"); + write_text:print_esc("write"); + othercases print_cmd_chr(assign_toks,t-output_text+output_routine_loc) + endcases;@/ + print("->"); token_show(p); end_diagnostic(false); + end; + end; +@z + +*** The changes above were incorporated in Version 1.1, released July 9, 1984. + Version 1.2 + +296. "see the transcript file" on offline show commands. (July 27, 1984) +@x module 1293 +@ @d show_error==@;@/ + if interaction0 then + begin@t@>@;@/ + help3("This isn't an error message; I'm just \showing something.") + @t\4\4@>@/ + ("Type `I\show...' to show more (e.g., \show\cs,")@/ + ("\showthe\count10, \showbox255, \showlists)."); + end + else begin@t@>@;@/ + help5("This isn't an error message; I'm just \showing something.") + @t\4\4@>@/ + ("Type `I\show...' to show more (e.g., \show\cs,")@/ + ("\showthe\count10, \showbox255, \showlists).")@/ + ("And type `I\tracingonline=1\show...' to show boxes and")@/ + ("lists on your terminal as well as in the transcript file."); + end; + error + +@= +procedure show_whatever; +var p:pointer; {tail of a token list to show} +begin case cur_chr of +show_code: @; +show_box_code: @; +show_the_code: @; +othercases @ +endcases; +end; +@y +@ @= +procedure show_whatever; +label common_ending; +var p:pointer; {tail of a token list to show} +begin case cur_chr of +show_lists: begin begin_diagnostic; show_activities; + end; +show_box_code: @; +show_code: @; +othercases @ +endcases;@/ +@; +common_ending: if interaction0 then + begin@t@>@;@/ + help3("This isn't an error message; I'm just \showing something.")@/ + ("Type `I\show...' to show more (e.g., \show\cs,")@/ + ("\showthe\count10, \showbox255, \showlists)."); + end +else begin@t@>@;@/ + help5("This isn't an error message; I'm just \showing something.") + ("Type `I\show...' to show more (e.g., \show\cs,")@/ + ("\showthe\count10, \showbox255, \showlists).")@/ + ("And type `I\tracingonline=1\show...' to show boxes and")@/ + ("lists on your terminal as well as in the transcript file."); + end; +error; +end; +@z +@x module 1294 +@ @= +begin get_token; print_nl("> "); +if cur_cs<>0 then + begin sprint_cs(cur_cs); print_char("="); + end; +print_meaning; show_error; +@y +@ @= +begin get_token; print_nl("> "); +if cur_cs<>0 then + begin sprint_cs(cur_cs); print_char("="); + end; +print_meaning; goto common_ending; +@z +@x module 1296 +end_diagnostic(true); +print_err("OK"); +@.OK@> +show_error; +@y +@z +@x module 1297 +flush_list(link(temp_head)); show_error; +@y +flush_list(link(temp_head)); goto common_ending; +@z +@x module 1298 +@ @= +begin begin_diagnostic; show_activities; end_diagnostic(true); +print_err("OK"); +show_error; +@.OK@> +end +@y +@ @= +end_diagnostic(true); print_err("OK"); +@.OK@> +if selector=term_and_log then if tracing_online<=0 then + begin selector:=term_only; print(" (see the transcript file)"); + selector:=term_and_log; + end +@z + +297. allow `0' in response to error prompts (October 20, 1984) +@x module 84 +"1","2","3","4","5","6","7","8","9": if deletions_allowed then +@y +"0","1","2","3","4","5","6","7","8","9": if deletions_allowed then +@z + Versions 1.3 and 1.4 + +298. Dirty PASCAL (two quarterword 0's were read as a halfword) (25 Nov 84) +@x module 846 +print(" -> @@@@"); print_int(serial(prev_break(passive))); +@y +print(" -> @@@@"); +if prev_break(passive)=null then print_char("0") +else print_int(serial(prev_break(passive))); +@z + +299. Ditto! (25 Nov 84) +@x module 934 +label reswitch, exit, found, not_found; +@y +label reswitch, exit, found, not_found, done; +@z +@x module 939 +while info(p)>n-3 do {eliminate hyphens \TeX\ doesn't like} + begin q:=link(p); free_avail(p); p:=q; + end; +@; +@y +loop@+ begin if p=null then goto done; + if info(p); +@z + +300. Major change to memory management (25 Nov 84) +[The following changes have two main merits: (1) TeX should run faster on +virtual-memory systems when the jobs are small; (2) it should be possible +to use the same production version of TeX both for jobs with lots of macros +and few boxes as well as for jobs with lots of boxes and few macros, because +the boundary line between the two types of storage is now chosen dynamically.] +[The user is unaffected, except that there's only one "memory size" overflow +error now instead of two.] +[The TRIP test is now changed slightly: The correct settings of memory +size parameters are now mem_min=mem_bot=1, mem_top=mem_max=3000.] + +@x module 11 +@!mem_max=30000; {greatest index in \TeX's internal |mem| array; + must be strictly less than |max_halfword|} +@y +@!mem_max=30000; {greatest index in \TeX's internal |mem| array; + must be strictly less than |max_halfword|; + must be equal to |mem_top| in \.{INITEX}, otherwise |>=mem_top|} +@!mem_min=0; {smallest index in \TeX's internal |mem| array; + must be |min_halfword| or more; + must be equal to |mem_bot| in \.{INITEX}, otherwise |<=mem_bot|} +@z +@x module 12 +@d mem_base=0 {smallest index in the |mem| array; must not be less + than |min_halfword|} +@d hi_mem_base=13000 {smallest index in the single-word area of |mem|; + must be substantially larger than |mem_base| and smaller than |mem_max|} +@y +@d mem_bot=0 {smallest index in the |mem| array dumped by \.{INITEX}; + must not be less than |mem_min|} +@d mem_top==30000 {largest index in the |mem| array dumped by \.{INITEX}; + must be substantially larger than |mem_bot| + and not greater than |mem_max|} +@z +@x module 12 + about |(mem_max-hi_mem_base)/6|, but 2100 is already quite generous} +@y + about |(mem_max-mem_min)/10|, but 2100 is already quite generous} +@z +@x module 14 +if (hi_mem_basemem_max) then bad:=4; +@y +if mem_bot+1100>mem_top then bad:=4; +@z +@x module 111 +if (min_quarterword>0)or(max_quarterword<127) then bad:=11; +@y +init if (mem_min<>mem_bot)or(mem_max<>mem_top) then bad:=10;@+tini@;@/ +if (mem_min>mem_bot)or(mem_max0)or(max_quarterword<127) then bad:=11; +@z +@x module 111 +if (mem_base=max_halfword) then bad:=14; +@y +if (mem_min=max_halfword) then bad:=14; +@z +@x module 115 +value represents a null pointer. + +@d pointer==halfword {a flag or a location in |mem| or |eqtb|} +@d null==mem_base {the null pointer} +@y +value represents a null pointer. \TeX\ does not assume that |mem[null]| exists. + +@d pointer==halfword {a flag or a location in |mem| or |eqtb|} +@d null==min_halfword {the null pointer} +@z +@x module 116 +@ The |mem| array is divided once and for all into two regions that are +allocated separately. Locations less than |hi_mem_base| are used for storing +@y +@ The |mem| array is divided into two regions that are allocated separately, +but the dividing line between these two regions is not fixed; they grow +together until finding their ``natural'' size in a particular job. +Locations less than or equal to |lo_mem_max| are used for storing +@z +@x module 116 +relevant size when a node is freed. The remaining region of |mem| is +allocated in single words using a conventional \.{AVAIL} stack. + +Incidentally, it would be feasible to construct implementations of \TeX\ that +are based on 16-bit words instead of 32-bit words, for machines having +comparatively small memories. In such cases it might be desirable to have +two parallel arrays for the upper part of memory, called say \\{mem\_link}|[p]| +and \\{mem\_info}|[p]|, +since the single-word region in the present implementation +consists entirely of |memory_word| items of type |two_halves|. +@^small computers@> +@y +relevant size when a node is freed. Locations greater than or equal to +|hi_mem_min| are used for storing one-word records; a conventional +\.{AVAIL} stack is used for allocation in this region. + +Locations of |mem| between |mem_bot| and |mem_top| may be dumped as part +of preloaded format files, by the \.{INITEX} preprocessor. +@.INITEX@> +Production versions of \TeX\ may extend the memory at both ends in order to +provide more space; locations between |mem_min| and |mem_bot| are always +used for variable-size nodes, and locations between |mem_top| and |mem_max| +are always used for single-word nodes. + +The key pointers that govern |mem| allocation have a prescribed order: +$$\hbox{|null<=mem_min<=mem_bot + end; +@y +else begin decr(hi_mem_min); p:=hi_mem_min; + if hi_mem_min<=lo_mem_max then + begin runaway; {if memory is exhausted, display possible runaway text} + overflow("main memory size",mem_max+1-mem_min); + {quit; all one-word nodes are busy} +@:TeX capacity exceeded main memory size}{\quad main memory size@> + end; + end; +@z +@x module 125 +label found,exit; +@y +label found,exit,restart; +@z +@x module 125 +begin p:=rover; {start at some free node in the ring} +@y +begin restart: p:=rover; {start at some free node in the ring} +@z +@x module 125 +overflow("box memory size",hi_mem_base-mem_base); + {sorry, nothing satisfactory is left} +@:TeX capacity exceeded box memory size}{\quad box memory size@> +found: link(r):=null; {this node is now nonempty} +@!stat var_used:=var_used+s; {maintain usage statistics} +if var_used>max_var_used then max_var_used:=var_used; +@y +if lo_mem_max+2; +overflow("main memory size",mem_max+1-mem_min); + {sorry, nothing satisfactory is left} +@:TeX capacity exceeded main memory size}{\quad main memory size@> +found: link(r):=null; {this node is now nonempty} +@!stat var_used:=var_used+s; {maintain usage statistics} +@z +@x modules 126--127 +@ Empirical tests show that the routine in this section performs a +|remove_node| operation about 0.75 times per allocation, on the average, +after which it finds that |r>p+1| about 95\% of the time. + +@= +q:=p+node_size(p); {find the physical successor} +@^inner loop@> +while is_empty(q) do @; +r:=q-s; +if r>p+1 then @; +if r=p then if ((rlink(p)<>rover) or (llink(p)<>rover)) then + @; +node_size(p):=q-p {reset the size in case it grew} + +@ @= +begin t:=rlink(q); +@^inner loop@> +if q=rover then rover:=t; +llink(t):=llink(q); rlink(llink(q)):=t;@/ +q:=q+node_size(q); +end +@y +@ The lower part of |mem| grows by 1000 words at a time, unless +we are very close to going under. When it grows, we simply link +a new node into the available-space list. This method of controlled +growth helps to keep the |mem| usage consecutive when \TeX\ is +implemented on ``virtual memory'' systems. +@^virtual memory@> + +@= +begin if lo_mem_max+1000p+1| about 95\% of the time. + +@= +q:=p+node_size(p); {find the physical successor} +@^inner loop@> +while is_empty(q) do {merge node |p| with node |q|} + begin t:=rlink(q); + if q=rover then rover:=t; + llink(t):=llink(q); rlink(llink(q)):=t;@/ + q:=q+node_size(q); + end; +r:=q-s; +if r>p+1 then @; +if r=p then if ((rlink(p)<>rover) or (llink(p)<>rover)) then + @; +node_size(p):=q-p {reset the size in case it grew} +@z +% module 129 no longer refers to remove_node; I don't recall when it changed! +@x module 134 +@d is_char_node(#) == (#>hi_mem_base) +@y +@d is_char_node(#) == (#>=hi_mem_min) +@z +@x module 162 +example, locations |mem_base| to |mem_base+3| are always used to store the +specification for glue that is `\.{0pt plus 0pt minus 0pt}'. The +following macro definitions accomplish the static allocation by giving +symbolic names to the fixed positions. Dynamic allocation of variable-size +nodes is restricted to locations |first_mem| through |(hi_mem_base-1)|, +and single-word nodes are dynamically allocated in locations |second_mem| +through |mem_max|, inclusive. It is harmless to let |lig_trick|, |garbage|, +and |backup_head| share the same location of |mem|. + +@d zero_glue==mem_base {specification for \.{0pt plus 0pt minus 0pt}} +@y +example, locations |mem_bot| to |mem_bot+3| are always used to store the +specification for glue that is `\.{0pt plus 0pt minus 0pt}'. The +following macro definitions accomplish the static allocation by giving +symbolic names to the fixed positions. Static variable-size nodes appear +in locations |mem_bot| through |lo_mem_stat_max|, and static single-word nodes +appear in locations |hi_mem_stat_min| through |mem_top|, inclusive. It is +harmless to let |lig_trick|, |garbage|, and |backup_head| share the same +location of |mem|. + +@d zero_glue==mem_bot {specification for \.{0pt plus 0pt minus 0pt}} +@z +@x module 162 +@d first_mem==fil_neg_glue+glue_spec_size {first dynamically allocatable word + in the variable-size |mem|} +@# +@d page_ins_head==hi_mem_base {list of insertion data for current page} +@d contrib_head==hi_mem_base+1 {vlist of items not yet on current page} +@d page_head==hi_mem_base+2 {vlist for current page} +@d temp_head==hi_mem_base+3 {head of a temporary list of some kind} +@d hold_head==hi_mem_base+4 {head of a temporary list of another kind} +@d adjust_head==hi_mem_base+5 {head of adjustment list returned by |hpack|} +@d active==hi_mem_base+6 {head of active list in |line_break|, needs two words} +@d align_head==hi_mem_base+8 {head of preamble list for alignments} +@d end_span==hi_mem_base+9 {tail of spanned-width lists} +@d omit_template==hi_mem_base+10 {a constant token list} +@d null_list==hi_mem_base+11 {permanently empty list} +@d lig_trick==hi_mem_base+12 {a ligature masquerading as a |char_node|} +@d garbage==hi_mem_base+12 {used for scrap information} +@d backup_head==hi_mem_base+13 {head of token list built by |scan_keyword|} +@d second_mem==hi_mem_base+14 {first dynamically allocatable word in + the one-word |mem|} +@y +@d lo_mem_stat_max==fil_neg_glue+glue_spec_size-1 {largest statically + allocated word in the variable-size |mem|} +@# +@d page_ins_head==mem_top {list of insertion data for current page} +@d contrib_head==mem_top-1 {vlist of items not yet on current page} +@d page_head==mem_top-2 {vlist for current page} +@d temp_head==mem_top-3 {head of a temporary list of some kind} +@d hold_head==mem_top-4 {head of a temporary list of another kind} +@d adjust_head==mem_top-5 {head of adjustment list returned by |hpack|} +@d active==mem_top-6 {head of active list in |line_break|, needs two words} +@d align_head==mem_top-8 {head of preamble list for alignments} +@d end_span==mem_top-9 {tail of spanned-width lists} +@d omit_template==mem_top-10 {a constant token list} +@d null_list==mem_top-11 {permanently empty list} +@d lig_trick==mem_top-12 {a ligature masquerading as a |char_node|} +@d garbage==mem_top-12 {used for scrap information} +@d backup_head==mem_top-13 {head of token list built by |scan_keyword|} +@d hi_mem_stat_min==mem_top-13 {smallest statically allocated word in + the one-word |mem|} +@z +@x module 164 +for k:=mem_base+1 to first_mem-1 do mem[k].sc:=0; + {all glue dimensions are zeroed} +@^data structure assumptions@> +k:=mem_base;@+while k +k:=mem_bot;@+while k<=lo_mem_stat_max do + {set first words of glue specifications} +@z +@x module 164 +rover:=first_mem; link(rover):=empty_flag; {now initialize the dynamic memory} +node_size(rover):=hi_mem_base-rover; {which is one big available node} +llink(rover):=rover; rlink(rover):=rover;@/ +link(hi_mem_base):=null; info(hi_mem_base):=null; +for k:=hi_mem_base+1 to second_mem-1 do + mem[k]:=mem[hi_mem_base];{clear list heads} +@; +avail:=null; mem_end:=second_mem-1; {initialize the one-word memory} +var_used:=first_mem-mem_base; dyn_used:=second_mem-hi_mem_base; +max_var_used:=var_used; {initialize statistics} +@y +rover:=lo_mem_stat_max+1; +link(rover):=empty_flag; {now initialize the dynamic memory} +node_size(rover):=1000; {which is a 1000-word available node} +llink(rover):=rover; rlink(rover):=rover;@/ +lo_mem_max:=rover+1000; link(lo_mem_max):=null; info(lo_mem_max):=null;@/ +for k:=hi_mem_stat_min to mem_top do + mem[k]:=mem[lo_mem_max]; {clear list heads} +@; +avail:=null; mem_end:=mem_top; +hi_mem_min:=hi_mem_stat_min; {initialize the one-word memory} +var_used:=lo_mem_stat_max+1-mem_bot; dyn_used:=mem_top+1-hi_mem_stat_min; + {initialize statistics} +@z +@x module 165 +@t\hskip1em@>@!was_mem_end: pointer; {previous |mem_end|} +@y +@t\hskip1em@>@!was_mem_end,@!was_lo_max,@!was_hi_min: pointer; + {previous |mem_end|, |lo_mem_max|,and |hi_mem_min|} +@z +@x module 166 +@!debug was_mem_end:=mem_base; {indicate that everything was previously free} +@y +@!debug was_mem_end:=mem_min; {indicate that everything was previously free} +was_lo_max:=mem_min; was_hi_min:=mem_max; +@z +@x module 167 +begin for p:=mem_base to mem_end do free[p]:=false; {you can probably + do this faster} +@y +begin for p:=mem_min to lo_mem_max do free[p]:=false; {you can probably + do this faster} +for p:=hi_mem_min to mem_end do free[p]:=false; {ditto} +@z +@x module 167 +for p:=0 to mem_end do was_free[p]:=free[p]; {|was_free:=free| might be faster} +was_mem_end:=mem_end; +@y +for p:=mem_min to lo_mem_max do was_free[p]:=free[p]; +for p:=hi_mem_min to mem_end do was_free[p]:=free[p]; + {|was_free:=free| might be faster} +was_mem_end:=mem_end; was_lo_max:=lo_mem_max; was_hi_min:=hi_mem_min; +@z +@x module 168 + begin if (p>mem_end)or(pmem_end)or(p=hi_mem_base)or(p=hi_mem_base)or(rlink(p)hi_mem_base)or@| (llink(rlink(p))<>p) then clobbered:=true; +@y +repeat if (p>=lo_mem_max)or(p=lo_mem_max)or(rlink(p)lo_mem_max)or@| (llink(rlink(p))<>p) then clobbered:=true; +@z +@x module 170 +p:=mem_base; +while p<=hi_mem_base do {node |p| should not be empty} +@y +p:=mem_min; +while p<=lo_mem_max do {node |p| should not be empty} +@z +@x module 170 + while (p<=hi_mem_base) and not free[p] do incr(p); + while (p<=hi_mem_base) and free[p] do incr(p); +@y + while (p<=lo_mem_max) and not free[p] do incr(p); + while (p<=lo_mem_max) and free[p] do incr(p); +@z +@x module 171 +for p:=mem_base to mem_end do + if not free[p] and ((p>was_mem_end) or was_free[p]) then +@y +for p:=mem_min to lo_mem_max do + if not free[p] and ((p>was_lo_max) or was_free[p]) then + begin print_char(" "); print_int(p); + end; +for p:=hi_mem_min to mem_end do + if not free[p] and + ((pwas_mem_end) or was_free[p]) then +@z +@x module 172 +begin for q:=mem_base to mem_end do +@y +begin for q:=mem_min to lo_mem_max do +@z +@x module 172 +@; +@y +for q:=hi_mem_min to mem_end do + begin if link(q)=p then + begin print_nl("LINK("); print_int(q); print_char(")"); + end; + if info(q)=p then + begin print_nl("INFO("); print_int(q); print_char(")"); + end; + end; +@; +@z +@x module 176 +if (pmem_end) then print_esc("CLOBBERED.") +@y +if (pmem_end) then print_esc("CLOBBERED.") +@z +@x module 178 +begin if (p=hi_mem_base) then print_char("*") +@y +begin if (p=lo_mem_max) then print_char("*") +@z +@x module 293 +if (pmem_end) then +@y +if (pmem_end) then +@z +@x module 639 + print_int(dyn_used); print("; max so far: "); + print_int(max_var_used); print_char("&"); + print_int(mem_end+1-hi_mem_base); print_ln; +@y + print_int(dyn_used); print("; still untouched: "); + print_int(hi_mem_min-lo_mem_max-1); print_ln; +@z +@x module 857 +begin save_link:=link(cur_p); {this is OK even if |cur_p=null|} +link(cur_p):=null; print_nl(""); short_display(link(printed_node)); +link(cur_p):=save_link; printed_node:=cur_p; +@y +begin print_nl(""); +if cur_p=null then short_display(link(printed_node)) +else begin save_link:=link(cur_p); + link(cur_p):=null; print_nl(""); short_display(link(printed_node)); + link(cur_p):=save_link; + end; +printed_node:=cur_p; +@z +@x module 1249 +if 2*max_halfwordhi_mem_base then goto bad_fmt; +@y +if x<>mem_bot then goto bad_fmt; +undump_int(x); +if x<>mem_top then goto bad_fmt; +@z +@x module 1311 +dump_int(rover); +p:=mem_base; q:=rover; x:=0; +@y +dump_int(lo_mem_max); dump_int(rover); +p:=mem_bot; q:=rover; x:=0; +@z +@x module 1311 +var_used:=var_used+hi_mem_base-p; dyn_used:=mem_end+1-hi_mem_base;@/ +dump_int(mem_end); dump_int(avail); +for k:=p to mem_end do dump_wd(mem[k]); +x:=x+mem_end+1-p; +@y +var_used:=var_used+lo_mem_max-p; dyn_used:=mem_end+1-hi_mem_min;@/ +for k:=p to lo_mem_max do dump_wd(mem[k]); +x:=x+lo_mem_max+1-p; +dump_int(hi_mem_min); dump_int(avail); +for k:=hi_mem_min to mem_end do dump_wd(mem[k]); +x:=x+mem_end+1-hi_mem_min; +@z +@x module 1312 +undump(min_halfword)(hi_mem_base)(rover); +p:=mem_base; q:=rover; x:=0; +repeat for k:=p to q+1 do undump_wd(mem[k]); +p:=q+node_size(q); +if (p>hi_mem_base)or((q>=rlink(q))and(rlink(q)<>rover)) then goto bad_fmt; +q:=rlink(q); +until q=rover; +undump_size(hi_mem_base)(mem_max)('mem max')(mem_end); +undump(null)(mem_end)(avail); +for k:=p to mem_end do undump_wd(mem[k]); +undump_int(var_used); undump_int(dyn_used); +max_var_used:=var_used +@y +undump(lo_mem_stat_max+1000)(hi_mem_stat_min-1)(lo_mem_max); +undump(lo_mem_stat_max+1)(lo_mem_max)(rover); +p:=mem_bot; q:=rover; x:=0; +repeat for k:=p to q+1 do undump_wd(mem[k]); +p:=q+node_size(q); +if (p>lo_mem_max)or((q>=rlink(q))and(rlink(q)<>rover)) then goto bad_fmt; +q:=rlink(q); +until q=rover; +for k:=p to lo_mem_max do undump_wd(mem[k]); +if mem_minmax_halfword!] +@x module 111 +if (mem_min=max_halfword) then bad:=14; +@y +if (mem_min=max_halfword)or@| + (mem_bot-mem_min>max_halfword+1) then bad:=14; +@z +@x module 125 +@!t:pointer; {temporary register} +@y +@!t:integer; {temporary register} +@z +@x module 125 +if lo_mem_max+2mem_bot+max_halfword then t:=mem_bot+max_halfword; +rlink(q):=rover; llink(q):=p; link(q):=empty_flag; node_size(q):=t-lo_mem_max;@/ +@z + +302. Improvement to missing-format-file error (DRF, 5 Jan 85) +@x module 524 +var j:0..buf_size; {the first space after the file name} +begin if buffer[loc]="&" then + begin incr(loc); j:=loc; buffer[last]:=" "; + while buffer[j]<>" " do incr(j); + pack_buffered_name(0,loc,j-1); {try first without the system file area} + if w_open_in(fmt_file) then + begin loc:=j; goto found; + end;@/ + pack_buffered_name(format_area_length,loc,j-1); + {now try the system format file area} + if w_open_in(fmt_file) then + begin loc:=j; goto found; + end; + wake_up_terminal; + wterm_ln('Sorry, I can''t find that format;',' will try PLAIN.'); +@.Sorry, I can't find...@> + end; + {now pull out all the stops: try for the system \.{PLAIN} file} +pack_buffered_name(format_default_length-format_ext_length,1,0); +if not w_open_in(fmt_file) then + begin wake_up_terminal; + wterm_ln('I can''t find the PLAIN format file!'); +@.I can't find PLAIN...@> +@.PLAIN@> + open_fmt_file:=false; return; + end; +found:open_fmt_file:=true; +@y +var j:0..buf_size; {the first space after the format file name} +begin j:=loc; +if buffer[loc]="&" then + begin incr(loc); j:=loc; buffer[last]:=" "; + while buffer[j]<>" " do incr(j); + pack_buffered_name(0,loc,j-1); {try first without the system file area} + if w_open_in(fmt_file) then goto found; + pack_buffered_name(format_area_length,loc,j-1); + {now try the system format file area} + if w_open_in(fmt_file) then goto found; + wake_up_terminal; + wterm_ln('Sorry, I can''t find that format;',' will try PLAIN.'); +@.Sorry, I can't find...@> + update_terminal; + end; + {now pull out all the stops: try for the system \.{PLAIN} file} +pack_buffered_name(format_default_length-format_ext_length,1,0); +if not w_open_in(fmt_file) then + begin wake_up_terminal; + wterm_ln('I can''t find the PLAIN format file!'); +@.I can't find PLAIN...@> +@.PLAIN@> + open_fmt_file:=false; return; + end; +found:loc:=j; open_fmt_file:=true; +@z + +303. Welcoming message appears sooner (DRF, Jan 7) +@x module 61 +else begin print(format_ident); print_ln; + end; +@y +else begin print(format_ident); print_ln; + end; +update_terminal; +@z + +304. Minor change to help message in "confusion" (Jan 23) +@x module 95 + help2("One of your earlier faux pas has wounded me deeply,")@/ + ("so I'm barely conscious. Please fix it and try again."); +@y + help2("One of your faux pas seems to have wounded me deeply...")@/ + ("in fact, I'm barely conscious. Please fix it and try again."); +@z + +305. Improved logic for `(see the transcript file...)' (Jan 23) +@x module 245 +if history=spotless then history:=warning_issued; +if (tracing_online<=0)and(selector=term_and_log) then decr(selector); +@y +if (tracing_online<=0)and(selector=term_and_log) then + begin decr(selector); + if history=spotless then history:=warning_issued; + end; +@z + +306. Change 291 violated standard PASCAL (CET1, Feb 18) +@x module 331 +for first:=0 to buf_size do buffer[first]:=0; +@y since some procedures `threaten' |first| globally [BS/6192 sec 6.8.3.9] +first:=buf_size; repeat buffer[first]:=0; decr(first); until first=0; +@z + +307. Nonexistent character could be output via ligature hyphenation (April 11) +@x module 582 (slight inefficiency removed while correcting this) +begin if (font_bc[f]<=c)and(font_ec[f]>=c) then +@y +begin if font_bc[f]<=c then if font_ec[f]>=c then +@z +@x module 892 (likewise) +@!hu:array[1..63] of ASCII_code; {like |hc|, before conversion to lowercase} +@y +@!hu:array[1..63] of ASCII_code; {like |hc|, before conversion to lowercase} +@!hyf_char:integer; {hyphen character of the relevant font} +@z +@x module 896 (likewise) +done2: if hyphen_char[hf]<0 then goto done1; +if hyphen_char[hf]>255 then goto done1; +@y +done2: hyf_char:=hyphen_char[hf]; +if hyf_char<0 then goto done1; +if hyf_char>255 then goto done1; +@z +@x module 912 and another local variable +@!c:ASCII_code; {character temporarily replaced by a hyphen} +@y +@!c:ASCII_code; {character temporarily replaced by a hyphen} +@!hyf_node:pointer; {the hyphen, if it exists} +@z +@x module 915 (this is the real bugfix) +minor_tail:=null; c:=hu[i+1]; hu[i+1]:=hyphen_char[hf]; +repeat l:=reconstitute(l+1,i+1); +if minor_tail=null then pre_break(r):=link(hold_head) +else link(minor_tail):=link(hold_head); +minor_tail:=link(hold_head); +if link(minor_tail)<>null then minor_tail:=link(minor_tail); +until l>i; +hu[i+1]:=c; {restore the character in the hyphen position} +decr(l); hyf[l]:=0 +@y +minor_tail:=null; hyf_node:=new_character(hf,hyf_char); +if hyf_node<>null then + begin incr(i); c:=hu[i]; hu[i]:=hyf_char; + end; +repeat l:=reconstitute(l+1,i); +if minor_tail=null then pre_break(r):=link(hold_head) +else link(minor_tail):=link(hold_head); +minor_tail:=link(hold_head); +if link(minor_tail)<>null then minor_tail:=link(minor_tail); +until l=i; +if hyf_node<>null then + begin hu[i]:=c; {restore the character in the hyphen position} + free_avail(hyf_node); decr(i); l:=i; + end; +hyf[i]:=0 +@z +@x module 918 +begin r:=new_disc; pre_break(r):=new_character(hf,hyphen_char[hf]); +@y +begin r:=new_disc; pre_break(r):=new_character(hf,hyf_char); +@z + +308. Improper memory usage computed by INITEX in change 300. (DRF, April 15) +@x module 162 +@d hi_mem_stat_min==mem_top-13 {smallest statically allocated word in + the one-word |mem|} +@y +@d hi_mem_stat_min==mem_top-13 {smallest statically allocated word in + the one-word |mem|} +@d hi_mem_stat_usage=14 {the number of one-word nodes always present} +@z +@x module 164 (text macro without parentheses strikes again!) +var_used:=lo_mem_stat_max+1-mem_bot; dyn_used:=mem_top+1-hi_mem_stat_min; +@y +var_used:=lo_mem_stat_max+1-mem_bot; dyn_used:=hi_mem_stat_usage; +@z + +309. A faster |flush_list| routine for the inner loop. (DRF, April 16) +@x module 123 +var q:pointer; {the successor of node |p|} +begin while p<>null do + begin q:=link(p); free_avail(p); p:=q; + end; +@y +var @!q,@!r:pointer; {list traversers} +begin if p<>null then + begin r:=p; + repeat q:=r; r:=link(r); @!stat decr(dyn_used);@+tats@/ + until r=null; {now |q| is the last node on the list} + link(q):=avail; avail:=p; + end; +@z + +310. Kern for accent positioning could disappear after a line break (April 17) +(Change 269 fixed only part of the problem!) +@x module 155 +@d explicit=1 {|subtype| of kern nodes from \.{\\kern} and \.{\\/} and accents} +@y +@d explicit=1 {|subtype| of kern nodes from \.{\\kern} and \.{\\/}} +@d acc_kern=2 {|subtype| of kern nodes from accents} +@z +@x module 191 +if subtype(p)<=explicit then + begin print_esc("kern"); + if subtype(p)=explicit then print_char(" "); + print_scaled(width(p)); +@y +if subtype(p)<>mu_glue then + begin print_esc("kern"); + if subtype(p)<>normal then print_char(" "); + print_scaled(width(p)); + if subtype(p)=acc_kern then print(" (for accent)"); +@.for accent@> +@z +@x module 837 + math_node,kern_node: break_width[1]:=break_width[1]-width(s); +@y + math_node,kern_node: if subtype(s)=acc_kern then goto done + else break_width[1]:=break_width[1]-width(s); +@z +@x module 879 + if non_discardable(q) then goto done1; +@y + if non_discardable(q) then goto done1; + if subtype(q)=acc_kern then if type(q)=kern_node then goto done1; +@z +@x module 1125 +r:=new_kern(delta); subtype(r):=explicit; link(tail):=r; link(r):=p; +tail:=new_kern(-a-delta); subtype(tail):=explicit; link(p):=tail; p:=q; +@y +r:=new_kern(delta); subtype(r):=acc_kern; link(tail):=r; link(r):=p; +tail:=new_kern(-a-delta); subtype(tail):=acc_kern; link(p):=tail; p:=q; +@z + +311. \lastbox and \unkern must not remove discretionary replacements (April 18) +(Change 236 introduced this bug!) +@x module 1079 +label exit; +var p:pointer; {runs through the current list} +@y +label exit, done; +var @!p,@!q:pointer; {run through the current list} +@!m:quarterword; {the length of a replacement list} +@z +@x modules 1080 and 1081 + @ +else begin if not is_char_node(tail) then + if (type(tail)=hlist_node)or(type(tail)=vlist_node) then + begin p:=head; cur_box:=tail; shift_amount(cur_box):=0; + while link(p)<>tail do p:=link(p); + tail:=p; link(p):=null; + end; + end; +end + +@ @= +begin you_cant; +help2("Sorry...I'm usually unable to take things from the current")@/ + ("page. This \lastbox will therefore be void."); error; +end +@y + begin you_cant; + help2("Sorry...I usually can't take things from the current page.")@/ + ("This \lastbox will therefore be void."); error; + end +else begin if not is_char_node(tail) then + if (type(tail)=hlist_node)or(type(tail)=vlist_node) then + @; + end; +end + +@ @= +begin q:=head; +repeat p:=q; +if not is_char_node(q) then if type(q)=disc_node then + begin for m:=1 to replace_count(q) do p:=link(p); + if p=tail then goto done; + end; +q:=link(p); +until q=tail; +cur_box:=tail; shift_amount(cur_box):=0; +tail:=p; link(p):=null; +done: end +@z +@x module 1105 +var p:pointer; {runs through the current list} +@y +label exit; +var @!p,@!q:pointer; {run through the current list} +@!m:quarterword; {the length of a replacement list} +@z +@x module 1105 + begin p:=head; + while link(p)<>tail do p:=link(p); + link(p):=null; flush_node_list(tail); tail:=p; + end; + end; +end; +@y + begin q:=head; + repeat p:=q; + if not is_char_node(q) then if type(q)=disc_node then + begin for m:=1 to replace_count(q) do p:=link(p); + if p=tail then return; + end; + q:=link(p); + until q=tail; + link(p):=null; flush_node_list(tail); tail:=p; + end; + end; +exit:end; +@z +@x module 1106 + help2("Sorry...I'm usually unable to take things from the current")@/ + ("page. Try `I\vskip-\lastskip' instead."); + if cur_chr=kern_node then help_line[0]:= + ("page. Try `I\kern-\lastkern' instead.") + else if cur_chr<>glue_node then help_line[0]:=@| + ("page. Perhaps you can make the output routine do it."); +@y + help2("Sorry...I usually can't take things from the current page.")@/ + ("Try `I\vskip-\lastskip' instead."); + if cur_chr=kern_node then help_line[0]:= + ("Try `I\kern-\lastkern' instead.") + else if cur_chr<>glue_node then help_line[0]:=@| + ("Perhaps you can make the output routine do it."); +@z +@x module 1120 +if n<128 then replace_count(tail):=n +@y +if n<=max_quarterword then replace_count(tail):=n +@z + + +*** Note by DEK, 18 Apr 1985 +(The code for version 1.3 has been published by Addison-Wesley under the +title "TeX: The Program". It was phototypeset on our APS, but does not +contain changes > 300. Some of those changes have been made in versions +of TeX called 1.3; but the exact definition of version 1.3 is somewhat +vague. Version 1.4 was released on April 18, 1985, after +making change 311. At present I believe Version 1.4 will be identical +to Version 2.0 except perhaps for things like index entries in the +documentation and slightly revised help messages. Version 2.0 will +coincide with the publication of Volume 1 of Computers and Typesetting, +which will come out when METAFONT and Computer Modern are both finished.) + Version 1.5 +312. if nonstandard area specified, don't try TEX_area too. (DRF, 26 Apr 85) +@x module 537 + pack_file_name(cur_name,TEX_area,cur_ext); + if a_open_in(cur_file) then goto done; +@y + if cur_area="" then + begin pack_file_name(cur_name,TEX_area,cur_ext); + if a_open_in(cur_file) then goto done; + end; +@z + +313. length of \write need no longer be limited (cf 235). (NBT, 30 Apr 85) +@x module 1370 +show_token_list(link(def_ref),null,buf_size-10); print_ln; +@y +show_token_list(link(def_ref),null,10000000); print_ln; +@z + +314. bug introduced in #300, just lucky it didn't cause trouble (CET1, 8 May 85) +@x module 162 +@d active==mem_top-6 {head of active list in |line_break|, needs two words} +@y +@d active==mem_top-7 {head of active list in |line_break|, needs two words} +@z + +315. Missing eoln after last typeout (Gropp, 11 May 85) +@x module 1332 + wterm('Ouch---my internal constants have been', +@y + wterm_ln('Ouch---my internal constants have been', +@z + +316. Redundancy (CET1, 17 May 85) +[Change 287 was apparently introduced because of a faulty assumption, +although its change to the calling of "initialize" was valid.] +@x module 1332 + begin t_open_out; + wterm_ln('Ouch---my internal constants have been', + ' clobbered!---case ',bad:1); +@y + begin wterm_ln('Ouch---my internal constants have been clobbered!', + '---case ',bad:1); +@z + +317. batchmode to see if log file couldn't be opened (DRF, 22 May 85) +@x module 92 +if interaction=batch_mode then decr(selector); +if job_name=0 then open_log_file; +@y +if job_name=0 then open_log_file; +if interaction=batch_mode then decr(selector); +@z + +318. If the string pool overflows while reading the command line... (22 May 85) +[This bug was first found in METAFONT, when it could occur more easily] +@x module 525 +begin str_room(name_length); +for k:=1 to name_length do append_char(xord[name_of_file[k]]); +make_name_string:=make_string; +@y +begin if (pool_ptr+name_length>pool_size)or(str_ptr=max_strings) then + make_name_string:="?" +else begin for k:=1 to name_length do append_char(xord[name_of_file[k]]); + make_name_string:=make_string; + end; +@z + +319. Bug in \edef\foo{\iffalse\fi\the\toks0} (found by Dan Brotsky, 7 Aug 85) +@x module 478 + if cur_cmd<>the then goto done2; + q:=the_toks; + if link(temp_head)<>null then + begin link(p):=link(temp_head); p:=q; + end; +@y + if cur_cmd<=max_command then goto done2; + if cur_cmd<>the then expand + else begin q:=the_toks; + if link(temp_head)<>null then + begin link(p):=link(temp_head); p:=q; + end; + end; +@z + +*** Version 1.5 was released on August 7, 1985. + +320. Lowercase `plain' for consistency with the manual +@x module 521 +TEX_format_default:='TeXformats:PLAIN.fmt'; +@.TeXformats@> +@.PLAIN@> +@y +TEX_format_default:='TeXformats:plain.fmt'; +@.TeXformats@> +@.plain@> +@z (index entries also changed to lowercase in modules 524, 1331) + +321. Terminal woken up by \show and \showthe (November 27, 1985) +@x module 1294 +begin get_token; print_nl("> "); +@y +begin get_token; +if interaction=error_stop_mode then wake_up_terminal; +print_nl("> "); +@z +@x module 1297 +begin p:=the_toks; print_nl("> "); token_show(temp_head); +@y +begin p:=the_toks; +if interaction=error_stop_mode then wake_up_terminal; +print_nl("> "); token_show(temp_head); +@z + Changes subsequent to `Version 2.0' as published in C&T, Volume B: + +322. Trivial change to a help message. +@x module 1283 + ("Pretend that you're Hercule Poirot, examine all clues,")@/ +@y + ("Pretend that you're Hercule Poirot: Examine all clues,")@/ +@z + +323. Precaution since |index| can be as high as |max_in_open|. (DRF) +@x module 14 +if hash_prime>hash_size then bad:=5; +@y +if hash_prime>hash_size then bad:=5; +if max_in_open>=128 then bad:=6; +@z + +324. \kern clobbered at end of pre-break list in discretionary break. +@x module 881 + |disc_break:=true|@>; + if not is_char_node(q) then + if (type(q)=math_node)or(type(q)=kern_node) then width(q):=0; +@y + |disc_break:=true|@> + else if (type(q)=math_node)or(type(q)=kern_node) then width(q):=0; +@z + +325. width after discretionary didn't take account of discarded nodes. +@x module 830 (slight redefinition) +@!t:quarterword; {replacement count, if |cur_p| is a discretionary node} +@y +@!t:integer; {node count, if |cur_p| is a discretionary node} +@z +@x module 837 (slight rearrangement) +if (break_type=unhyphenated)or(cur_p=null) then + begin s:=cur_p; + while s<>null do + begin if is_char_node(s) then goto done; + case type(s) of + glue_node:@; + penalty_node: do_nothing; + math_node,kern_node: if subtype(s)=acc_kern then goto done + else break_width[1]:=break_width[1]-width(s); + othercases goto done + endcases;@/ + s:=link(s); + end; + end +else @; +@y +s:=cur_p; +if break_type>unhyphenated then if cur_p<>null then + @; +while s<>null do + begin if is_char_node(s) then goto done; + case type(s) of + glue_node:@; + penalty_node: do_nothing; + math_node,kern_node: if subtype(s)=acc_kern then goto done + else break_width[1]:=break_width[1]-width(s); + othercases goto done + endcases;@/ + s:=link(s); + end; +@z +@x module 840 (this is the main change to fix the bug) +begin t:=replace_count(cur_p); s:=cur_p; +while t>0 do + begin decr(t); s:=link(s); + @; + end; +s:=post_break(cur_p); +while s<>null do + begin @; +@y +begin t:=replace_count(cur_p); v:=cur_p; s:=post_break(cur_p); +while t>0 do + begin decr(t); v:=link(v); + @; + end; +while s<>null do + begin @; +@z +@x module 840, continued +break_width[1]:=break_width[1]+disc_width; +@y +break_width[1]:=break_width[1]+disc_width; +if t=0 then s:=link(v); {more nodes may also be discardable after the break} +@z +@x module 841 (here we just change |s| to |v|) +@= +if is_char_node(s) then + begin f:=font(s); + break_width[1]:=break_width[1]-char_width(f)(char_info(f)(character(s))); + end +else case type(s) of + ligature_node: begin f:=font(lig_char(s));@/ + break_width[1]:=@|break_width[1]- + char_width(f)(char_info(f)(character(lig_char(s)))); + end; + hlist_node,vlist_node,rule_node,kern_node: + break_width[1]:=break_width[1]-width(s); +@y +@= +if is_char_node(v) then + begin f:=font(v); + break_width[1]:=break_width[1]-char_width(f)(char_info(f)(character(v))); + end +else case type(v) of + ligature_node: begin f:=font(lig_char(v));@/ + break_width[1]:=@|break_width[1]- + char_width(f)(char_info(f)(character(lig_char(v)))); + end; + hlist_node,vlist_node,rule_node,kern_node: + break_width[1]:=break_width[1]-width(v); +@z +@x module 842 + hlist_node,vlist_node,rule_node,kern_node: + break_width[1]:=break_width[1]+width(s); + othercases confusion("disc2") +@:this can't happen disc2}{\quad disc2@> + endcases +@y + hlist_node,vlist_node,rule_node:break_width[1]:=break_width[1]+width(s); + kern_node: if (t=0)and(subtype(s)<>acc_kern) then t:=-1 {discardable} + else break_width[1]:=break_width[1]+width(s); + othercases confusion("disc2") +@:this can't happen disc2}{\quad disc2@> + endcases; +incr(t) +@z + +*** Version 2.1 was released on January 26, 1987. + +326. Removal of redundant code (found by Pat Monardo, 5 Feb 87) +@x module 1224 [this change need not be made, since it has no effect] + char_def_code: define(p,char_given,cur_val); + math_char_def_code: define(p,math_given,cur_val); +@y the cases cannot occur, so we simply don't list them +@z + +327. More robustness is needed when debugging (Ronaldo Am\'a, 14 Apr 87) +@x module 174 +begin while p>null do +@y maybe mem_min>null (but nodes shouldn't be put in location mem_min exactly) +begin while p>mem_min do +@z +@x module 182 +@p procedure show_node_list(@!p:pointer); {prints a node list symbolically} +@y +@p procedure show_node_list(@!p:integer); {prints a node list symbolically} +@z +@x module 182, continued +while p>null do +@y +while p>mem_min do +@z + +328. Storage allocation can be more elegant and efficient (4/21/87) +@x module 127 +if r=p then if ((rlink(p)<>rover) or (llink(p)<>rover)) then +@y +if r=p then if rlink(p)<>p then +@z + +329. Miscalculation of empty-line condition (April 22, 1987) +@x module 360 + begin if limit=start then {previous line was empty} +@y + begin if (end_line_char<0)or(end_line_char>127) then incr(limit); + if limit=start then {previous line was empty} +@z + +330. A case where we don't have to assume system bookkeeping (April 28, 1987) +@x module 560 +done: b_close(tfm_file); read_font_info:=g; +@y [suggested by Jim Sterken] +done: if file_opened then b_close(tfm_file); +read_font_info:=g; +@z [this was not a bug, according to the comment in module 28] + +331. jump_out must fix unfinished output (Found by Klaus Gunterman, 3 Aug 87) +@x module 593 +doing_leaders:=false; dead_cycles:=0; +@y +doing_leaders:=false; dead_cycles:=0; cur_s:=-1; +@z +@x module 617 +cur_s:=-1; ensure_dvi_open; +@y +ensure_dvi_open; +@z +@x module 640 +dvi_out(eop); incr(total_pages); +@y +dvi_out(eop); incr(total_pages); cur_s:=-1; +@z +@x module 642 +if total_pages=0 then print_nl("No pages of output.") +@y +while cur_s>-1 do + begin if cur_s>0 then dvi_out(pop) + else begin dvi_out(eop); incr(total_pages); + end; + decr(cur_s); + end; +if total_pages=0 then print_nl("No pages of output.") +@z + +332. \hangindent=1pt$$\halign{...\cr\noalign{\hrule}}$$ problem (19 Aug 87) +@x module 805 +q:=link(head); +@y +q:=link(head); s:=head; +@z +@x module 805, continued + q:=link(q); +@y + s:=q; q:=link(q); +@z +@x module 806 +if is_running(depth(q)) then depth(q):=depth(p); +@y +if is_running(depth(q)) then depth(q):=depth(p); +if o<>0 then + begin r:=link(q); link(q):=null; q:=hpack(q,natural); + shift_amount(q):=o; link(q):=r; link(s):=q; + end; +@z + +333. \hskip 0pt plus 1fil\ifdim problem (found by Alan Guth, 20 Aug 87) +@x module 366 +@!cvl_backup,@!radix_backup:small_number; {to save |cur_val_level| and |radix|} +@y +@!cvl_backup,@!radix_backup,@!co_backup:small_number; + {to save |cur_val_level|, etc.} +@z +@x +backup_backup:=link(backup_head); +@y +co_backup:=cur_order; backup_backup:=link(backup_head); +@z +@x +link(backup_head):=backup_backup; +@y +cur_order:=co_backup; link(backup_head):=backup_backup; +@z + +334. leaders too sensitive near exact multiples (M. F. Bridgland, 9 Nov 87) +@x module 626 + begin edge:=cur_h+rule_wd; lx:=0; +@y + begin rule_wd:=rule_wd+10; {compensate for floating-point rounding} + edge:=cur_h+rule_wd; lx:=0; +@z +@x ibid + cur_h:=edge; goto next_p; +@y + cur_h:=edge-10; goto next_p; +@z +@x module 635 + begin edge:=cur_v+rule_ht; lx:=0; +@y + begin rule_ht:=rule_ht+10; {compensate for floating-point rounding} + edge:=cur_v+rule_ht; lx:=0; +@z +@x ibid + cur_v:=edge; goto next_p; +@y + cur_v:=edge-10; goto next_p; +@z + +335. Glitch in fixed-point multiplication of negatives (W.G. Sullivan, 17Nov87) +@x module 572 +begin alpha:=16*z; beta:=16; +while z>=@'40000000 do + begin z:=z div 2; beta:=beta div 2; + end; +@y +begin alpha:=16; +while z>=@'40000000 do + begin z:=z div 2; alpha:=alpha+alpha; + end; +beta:=256 div alpha; alpha:=alpha*z; +@z + +336. If there are no \patterns and some \lccode is 1 (Breitenlohner, 12Dec87) +@x module 952 +trie_link(0):=0; trie_char(0):=0; trie_op(0):=0; +@y +trie_link(0):=0; trie_char(0):=0; trie_op(0):=min_quarterword; +@z + +337. \csname might encounter undefined_cs in a group (Chris Thompson, 23Dec87) +@x module 372 + begin eqtb[cur_cs]:=eqtb[frozen_relax]; +@y + begin eq_define(cur_cs,relax,256); +@z + +338. \outer\def\a0{}\a\a shows temp_head list garbage (Silvio Levy, 20Apr88) +@x module 391 +repeat if (info(r)>match_token+127)or(info(r)match_token+127)or(info(r)str_start[str_ptr] do + begin decr(pool_ptr); str_pool[pool_ptr+l]:=str_pool[pool_ptr]; + end; {move current string up to make room for another} +for k:=j to j+l-1 do append_char(buffer[k]); +text(p):=make_string; pool_ptr:=pool_ptr+d; +@z + +340. Make patterns work when trie_min=0 (Peter Breitenlohner, 10May88) +@x module 951 +trie_max:=128; trie_min:=128; trie_link(0):=1; trie_taken[0]:=false; +@y +trie_max:=128; trie_min:=128; trie_link(0):=1; trie_taken[0]:=false; +trie_link(trie_size):=0; trie_back(0):=trie_size; {wrap around} +@z +@x module 953 +begin c:=trie_c[p]; {we have |c>0|} +if c=ident_val then @ +else begin old_setting:=selector; selector:=new_string; +@y +@!b:pool_pointer; {base of temporary string} +begin get_x_token; scan_something_internal(tok_val,false); +if cur_val_level>=ident_val then @ +else begin old_setting:=selector; selector:=new_string; b:=pool_ptr; +@z +@x module 465, continued + selector:=old_setting; the_toks:=str_toks; +@y + selector:=old_setting; the_toks:=str_toks(b); +@z +@x module 470 +begin c:=cur_chr; @; +old_setting:=selector; selector:=new_string; +@; +selector:=old_setting; link(garbage):=str_toks; ins_list(link(temp_head)); +@y +@!b:pool_pointer; {base of temporary string} +begin c:=cur_chr; @; +old_setting:=selector; selector:=new_string; b:=pool_ptr; +@; +selector:=old_setting; link(garbage):=str_toks(b); ins_list(link(temp_head)); +@z + +343. **\input\romannumeral6 confusion bypassed (25May88) +@x module 525 +begin if (pool_ptr+name_length>pool_size)or(str_ptr=max_strings) then +@y +begin if (pool_ptr+name_length>pool_size)or(str_ptr=max_strings)or + (cur_length>0) then +@z + +344. Avoid negative dividend rounding upward (Chris Thompson, fixed 19Jun88) +@x module 126 +else t:=(lo_mem_max+hi_mem_min+2) div 2; {|lo_mem_max+2<=t=1998 then t:=lo_mem_max+1000 +@z + +346. An omission from change 333 (Tsunetoshi Hayashi, reported 20June88) +@x module 439 +cur_val:=0; cur_val_level:=int_val; radix:=0; +@y +cur_val:=0; cur_val_level:=int_val; radix:=0; cur_order:=0; +@z + +347. Avoid fatal_error after terminal eof (Tim Morgan, reported 25Oct88) +@x module 71 [serious problem occurred if this was called in open_log_file] +if not input_ln(term_in,true) then fatal_error("End of file on the terminal!"); +@y +if not input_ln(term_in,true) then t_open_in; +@z + +348. Force terminal output when open_log_file aborts (6Nov88) +@x module 535 + begin print_err("I can't write on file `"); +@y + begin selector:=term_only; print_err("I can't write on file `"); +@z + +349. By popular request, undo #347 and fix the bug a more complex way. +@x module 71 [this undoes change #347] +if not input_ln(term_in,true) then t_open_in; +@y +if not input_ln(term_in,true) then fatal_error("End of file on the terminal!"); +@z +@x module 92 [now we get to the new stuff] +begin if job_name>0 then selector:=term_and_log +@y +begin if log_opened then selector:=term_and_log +@z +@x module 93 + error; +@y + if log_opened then error; +@z +@x module 527 +@!job_name:str_number; {principal file name} +@y +@!job_name:str_number; {principal file name} +@!log_opened:boolean; {has the transcript file been opened?} +@z +@x module 528 +@=job_name:=0; name_in_progress:=false; +@y +@= +job_name:=0; name_in_progress:=false; log_opened:=false; +@z +@x module 534 +selector:=log_only; +@y +selector:=log_only; log_opened:=true; +@z +@x module 535 +begin if interaction + print_file_name(cur_name,cur_area,cur_ext); print("'.");@/ + job_name:=0; history:=fatal_error_stop; jump_out; + end; {abort the program without a log file} +@y +begin selector:=term_only; +@z +@x module 1265 [this change is optional, but it's a slight improvement] +if job_name<>0 then selector:=selector+2; +@y +if log_opened then selector:=selector+2; +@z +@x module 1333 +if job_name>0 then +@y +if log_opened then +@z +@x module 1334 +if job_name>0 then {the log file is open} +@y +if log_opened then +@z + +350. Forgotten update in error recovery (Breitenlohner, 20 Jan 89) +@x module 976 + glue_ptr(p):=r; +@y + glue_ptr(p):=r; q:=r; +@z +@x module 1004 + glue_ptr(p):=r; +@y + glue_ptr(p):=r; q:=r; +@z + +351. Avoid error \aftergroup\relax\dump (Mittelbach&Schoepf, 17 Feb 89) +@x module 280 +begin check_full_save_stack; +save_type(save_ptr):=insert_token; save_level(save_ptr):=level_zero; +save_index(save_ptr):=t; incr(save_ptr); +@y +begin if cur_level>level_one then + begin check_full_save_stack; + save_type(save_ptr):=insert_token; save_level(save_ptr):=level_zero; + save_index(save_ptr):=t; incr(save_ptr); + end; +@z + +352. Cosmetic change to validate comment in 115 (Breitenlohner, 20 Mar 89) +@x module 791 +begin q:=link(cur_align); +if (cur_align=null)or(q=null) then confusion("endv"); +@y +begin if cur_align=null then confusion("endv"); +q:=link(cur_align);@+if q=null then confusion("endv"); +@z + +353. $$\begingroup\halign{#\cr}$$ caused confusion (Mittelbach, 7 Jun 89) +@x module 1130 +mmode+halign: if privileged then init_align; +@y +mmode+halign: if privileged then + if cur_group=math_shift_group then init_align + else off_save; +@z + +354. Conflict in global array dig with .5\ifdim.6 (Mittelbach, 20 Jun 89) +@x module 450 +@!k:small_number; {number of digits in a decimal fraction} +@y +@!k,@!kk:small_number; {number of digits in a decimal fraction} +@!p,@!q:pointer; {top of decimal digit stack} +@z +@x module 452 +begin k:=0; get_token; {|point_token| is being re-scanned} +loop@+ begin get_x_token; + if (cur_tok>zero_token+9)or(cur_tok=17| cannot affect the result} + begin dig[k]:=cur_tok-zero_token; incr(k); + end; + end; +done1: f:=round_decimals(k); +@y +begin k:=0; p:=null; get_token; {|point_token| is being re-scanned} +loop@+ begin get_x_token; + if (cur_tok>zero_token+9)or(cur_tok=17| cannot affect the result} + begin q:=get_avail; link(q):=p; info(q):=cur_tok-zero_token; + p:=q; incr(k); + end; + end; +done1: for kk:=k downto 1 do + begin dig[kk-1]:=info(p); q:=p; p:=link(p); free_avail(q); + end; +f:=round_decimals(k); +@z + +355. String startup problems (Wayne Sullivan, 17 Jul 89) +@x module 31 (Warning: This affects most change files!) + overflow("buffer size",buf_size); +@:TeX capacity exceeded buffer size}{\quad buffer size@> +@y + @; +@z +@x module 35 +consist of the remainder of the command line, after the part that invoked +\TeX. +@y +consist of the remainder of the command line, after the part that invoked +\TeX. + +The first line is special also because it may be read before \TeX\ has +input a format file. In such cases, normal error messages cannot yet +be given. The following code uses concepts that will be explained later. + +@= +if format_ident=0 then + begin write_ln(term_out,'Buffer size exceeded!'); goto final_end; +@.Buffer size exceeded@> + end +else begin cur_input.loc_field:=first; cur_input.limit_field:=last-1; + overflow("buffer size",buf_size); +@:TeX capacity exceeded buffer size}{\quad buffer size@> + end +@z +@x module 1310 +k:=pool_ptr-4; undump_four_ASCII +@y +k:=pool_ptr-4; undump_four_ASCII; +init_str_ptr:=str_ptr; init_pool_ptr:=pool_ptr +@z +@x module 1332 +tini@/ +@y +init_str_ptr:=str_ptr; init_pool_ptr:=pool_ptr; fix_date_and_time; +tini@/ +@z +@x module 1332 +init_str_ptr:=str_ptr; init_pool_ptr:=pool_ptr;@/ +@y +@z + +356. Allow integer products to be 31 bits long (Mittelbach, 16 Aug 89) +@x module 105 +@p function nx_plus_y(@!n:integer;@!x,@!y:scaled):scaled; +begin if n<0 then + begin negate(x); negate(n); + end; +if n=0 then nx_plus_y:=y +else if ((x<=(@'7777777777-y) div n)and(-x<=(@'7777777777+y) div n)) then + nx_plus_y:=n*x+y +else begin arith_error:=true; nx_plus_y:=0; + end; +end; +@y +@d nx_plus_y(#)==mult_and_add(#,@'7777777777) +@d mult_integers(#)==mult_and_add(#,0,@'17777777777) + +@p function mult_and_add(@!n:integer;@!x,@!y,@!max_answer:scaled):scaled; +begin if n<0 then + begin negate(x); negate(n); + end; +if n=0 then mult_and_add:=y +else if ((x<=(max_answer-y) div n)and(-x<=(max_answer+y) div n)) then + mult_and_add:=n*x+y +else begin arith_error:=true; mult_and_add:=0; + end; +end; +@z +@x module 1240 + if q=multiply then cur_val:=nx_plus_y(eqtb[l].int,cur_val,0) +@y + if q=multiply then + if p=int_val then cur_val:=mult_integers(eqtb[l].int,cur_val) + else cur_val:=nx_plus_y(eqtb[l].int,cur_val,0) +@z + +357. Raise the maximum number of tokens normally shown (pointed out by +John Lavagnino in TeXhax on 19 May 89; corrected on 31 Aug 89). +@x module 295 +begin if p<>null then show_token_list(link(p),null,1000); +@y +begin if p<>null then show_token_list(link(p),null,10000000); +@z +@x module 1370 (this part of the change is cosmetic only) +show_token_list(link(def_ref),null,10000000); print_ln; +@y +token_show(def_ref); print_ln; +@z + +358. Like 353, but with $$\begingroup\eqno$$ (Mittelbach, 25 Jul 89) +@x module 1140 +mmode+eq_no: if privileged then start_eq_no; +@y +mmode+eq_no: if privileged then + if cur_group=math_shift_group then start_eq_no + else off_save; +@z + +359. Major extension to 8-bit character input. (These changes, and a few that +follow, were discussed during the 10th TUG meeting and installed during +the week of 10 Sep 1989. They bring the implementation of TeX82 up to date with +international developments and experience, and I believe they mark the +final development of this program into a completely stable system.) +Several changes to the documentation (not the program) are omitted here. +@x module 18 +@!ASCII_code=0..127; {seven-bit numbers} +@y +@!ASCII_code=0..255; {eight-bit numbers} +@z +@x module 19 +@d last_text_char=127 {ordinal number of the largest element of |text_char|} + +@= +@!i:0..last_text_char; +@y +@d last_text_char=255 {ordinal number of the largest element of |text_char|} + +@= +@!i:integer; +@z +@x module 21 +xchr[0]:=' '; xchr[@'177]:=' '; + {ASCII codes 0 and |@'177| do not appear in text} +@y +@z +@x module 23 +for i:=1 to @'37 do xchr[i]:=' '; +@y changing ' ' to chr(i) here will allow all 8-bit characters to get in +for i:=0 to @'37 do xchr[i]:=' '; +for i:=@'177 to @'377 do xchr[i]:=' '; +@z +@x module 24 +for i:=1 to @'176 do xord[xchr[i]]:=i; +@y +for i:=@'200 to @'377 do xord[xchr[i]]:=i; +for i:=0 to @'176 do xord[xchr[i]]:=i; +@z +@x module 38 +@= +@!pool_pointer = 0..pool_size; {for variables that point into |str_pool|} +@!str_number = 0..max_strings; {for variables that point into |str_start|} + +@ @= +@!str_pool:packed array[pool_pointer] of ASCII_code; {the characters} +@y [OK to make si(#)==#-128 and so(#)==#+128 (without parens) in change files] +Some \PASCAL\ compilers won't pack integers into a single byte unless the +integers lie in the range |-128..127|. To accommodate such systems +we access the string pool only via macros that can easily be redefined. + +@d si(#) == # {convert from |ASCII_code| to |packed_ASCII_code|} +@d so(#) == # {convert from |packed_ASCII_code| to |ASCII_code|} + +@= +@!pool_pointer = 0..pool_size; {for variables that point into |str_pool|} +@!str_number = 0..max_strings; {for variables that point into |str_start|} +@!packed_ASCII_code = 0..255; {elements of |str_pool| array} + +@ @= +@!str_pool:packed array[pool_pointer] of packed_ASCII_code; {the characters} +@z +@x module 42 +begin str_pool[pool_ptr]:=#; incr(pool_ptr); +@y +begin str_pool[pool_ptr]:=si(#); incr(pool_ptr); +@z +@x module 45 + begin if str_pool[j]<>buffer[k] then +@y + begin if so(str_pool[j])<>buffer[k] then +@z +@x module 47 +var k,@!l:0..127; {small indices or counters} +@y +var k,@!l:0..255; {small indices or counters} +@z +@x module 47 +@; +@y +@; +@z +@x module 48 +@ @= +for k:=0 to 127 do + begin if (@) then + begin append_char("^"); append_char("^"); + if k<@'100 then append_char(k+@'100) + else append_char(k-@'100); +@y +@ @d app_lc_hex(#)==l:=#; + if l<10 then append_char(l+"0)@+else append_char(l-10+"a") + +@= +for k:=0 to 255 do + begin if (@) then + begin append_char("^"); append_char("^"); + if k<@'100 then append_char(k+@'100) + else if k<@'200 then append_char(k-@'100) + else begin app_lc_hex(k div 16); app_lc_hex(k mod 16); + end; +@z +@x module 59 + begin print_char(str_pool[j]); incr(j); +@y + begin print_char(so(str_pool[j])); incr(j); +@z +@x modules 59 and 60 +else if s<128 then +@y +else if s<256 then +@z +@x module 60 + begin print(str_pool[j]); incr(j); +@y + begin print(so(str_pool[j])); incr(j); +@z +@x module 63 +if c>=0 then if c<128 then print(c); +@y +if c>=0 then if c<256 then print(c); +@z +@x module 68 +@ In certain situations, \TeX\ prints either a standard visible ASCII +character or its hexadecimal ASCII code. + +@p procedure print_ASCII(@!c:integer); {prints a character or its code} +begin if (c>=0) and (c<=127) then print(c) +else begin print_char("["); + if c<0 then print_int(c)@+else print_hex(c); + print_char("]"); + end; +end; +@y +@ Old versions of \TeX\ needed a procedure called |print_ASCII| whose function +is now subsumed by |print|. We retain the old name here as a possible aid to +future software arch\ae ologists. + +@d print_ASCII == print +@z +@x module 69 + begin print_char(str_pool[j]); n:=n-v; + end; + if n<=0 then return; {nonpositive input produces no output} + k:=j+2; u:=v div (str_pool[k-1]-"0"); + if str_pool[k-1]="2" then + begin k:=k+2; u:=u div (str_pool[k-1]-"0"); + end; + if n+u>=v then + begin print_char(str_pool[k]); n:=n+u; + end + else begin j:=j+2; v:=v div (str_pool[j-1]-"0"); +@y + begin print_char(so(str_pool[j])); n:=n-v; + end; + if n<=0 then return; {nonpositive input produces no output} + k:=j+2; u:=v div (so(str_pool[k-1])-"0"); + if str_pool[k-1]=si("2") then + begin k:=k+2; u:=u div (so(str_pool[k-1])-"0"); + end; + if n+u>=v then + begin print_char(so(str_pool[k])); n:=n+u; + end + else begin j:=j+2; v:=v div (so(str_pool[j-1])-"0"); +@z +@x module 70 + begin print_char(str_pool[j]); incr(j); +@y + begin print_char(so(str_pool[j])); incr(j); +@z +@x module 222 +@d single_base=active_base+128 {equivalents of one-letter control sequences} +@d null_cs=single_base+128 {equivalent of \.{\\csname\\endcsname}} +@y +@d single_base=active_base+256 {equivalents of one-character control sequences} +@d null_cs=single_base+256 {equivalent of \.{\\csname\\endcsname}} +@z +@x module 230 + {table of 128 command codes (the ``catcodes'')} +@d lc_code_base=cat_code_base+128 {table of 128 lowercase mappings} +@d uc_code_base=lc_code_base+128 {table of 128 uppercase mappings} +@d sf_code_base=uc_code_base+128 {table of 128 spacefactor mappings} +@d math_code_base=sf_code_base+128 {table of 128 math mode mappings} +@d int_base=math_code_base+128 {beginning of region 5} +@y + {table of 256 command codes (the ``catcodes'')} +@d lc_code_base=cat_code_base+256 {table of 256 lowercase mappings} +@d uc_code_base=lc_code_base+256 {table of 256 uppercase mappings} +@d sf_code_base=uc_code_base+256 {table of 256 spacefactor mappings} +@d math_code_base=sf_code_base+256 {table of 256 math mode mappings} +@d int_base=math_code_base+256 {beginning of region 5} +@z +@x module 232 +for k:=0 to 127 do +@y +for k:=0 to 255 do +@z +@x module 236 +@d del_code_base=count_base+256 {128 delimiter code mappings} +@d dimen_base=del_code_base+128 {beginning of region 6} +@y +@d del_code_base=count_base+256 {256 delimiter code mappings} +@d dimen_base=del_code_base+256 {beginning of region 6} +@z +@x module 240 +for k:=0 to 127 do del_code(k):=-1; +@y +for k:=0 to 255 do del_code(k):=-1; +@z +@x module 264 +begin if s<128 then cur_val:=s+single_base +@y +begin if s<256 then cur_val:=s+single_base +@z +@x ibid + for j:=0 to l-1 do buffer[j]:=str_pool[k+j]; +@y + for j:=0 to l-1 do buffer[j]:=so(str_pool[k+j]); +@z +@x module 289 +@d cs_token_flag==@'10000 {amount added to the |eqtb| location in a + token that stands for a control sequence; is a multiple of~256} +@y +@d cs_token_flag==@'7777 {amount added to the |eqtb| location in a + token that stands for a control sequence; is a multiple of~256, less~1} +@z +@x module 293 + if (info(p)<0)or(c>127) then print_esc("BAD.") +@y + if info(p)<0 then print_esc("BAD.") +@z +@x module 341 +@!cat:0..15; {|cat_code(cur_chr)|, usually} +@y +@!cat:0..15; {|cat_code(cur_chr)|, usually} +@!c,@!cc:ASCII_code; {constituents of a possible expanded code} +@!d:2..3; {number of excess characters in an expanded code} +@z +@x module 352 +@= +begin if (cur_chr=buffer[loc])and(loc="0")and(#<="9"))or((#>="a")and(#<="f"))) +@d hex_to_cur_chr== + if c<="9" then cur_chr:=c-"0" @+else cur_chr:=c-"a"+10; + if cc<="9" then cur_chr:=16*cur_chr+cc-"0" + else cur_chr:=16*cur_chr+cc-"a"+10 + +@= +begin if cur_chr=buffer[loc] then if loc2 then + begin hex_to_cur_chr; buffer[k-1]:=cur_chr; + end + else if c<@'100 then buffer[k-1]:=c+@'100 + else buffer[k-1]:=c-@'100; + limit:=limit-d; first:=first-d; + while k<=limit do + begin buffer[k]:=buffer[k+d]; incr(k); + end; + goto start_cs; + end; + end; +@z +@x module 360 +There is one more branch. +@y +There is one more branch. + +@d end_line_char_inactive == (end_line_char<0)or(end_line_char>255) +@z +@x ibid + if (end_line_char<0)or(end_line_char>127) then decr(limit) +@y + if end_line_char_inactive then decr(limit) +@z +@x modules 362 and 483 and 538 and 1337 +if (end_line_char<0)or(end_line_char>127) then decr(limit) +@y +if end_line_char_inactive then decr(limit) +@z +@x module 391 +if (info(r)>match_token+127)or(info(r)match_token+255)or(info(r)= +procedure scan_seven_bit_int; +begin scan_int; +if (cur_val<0)or(cur_val>127) then + begin print_err("Bad character code"); +@.Bad character code@> + help2("The numeric code for a character must be between 0 and 127.")@/ + ("I changed this one to zero."); int_error(cur_val); cur_val:=0; + end; +end; +@y +|scan_something_internal|. +@z (and I'll interchange modules 434 and 435) +@x module 442 +if cur_val>127 then +@y +if cur_val>255 then +@z +@x module 464 + begin t:=str_pool[k]; +@y + begin t:=so(str_pool[k]); +@z +@x module 506 (correction needed twice) +if (cur_cmd>active_char)or(cur_chr>127) then +@y +if (cur_cmd>active_char)or(cur_chr>255) then +@z +@x module 519 +for j:=str_start[a] to str_start[a+1]-1 do append_to_name(str_pool[j]); +for j:=str_start[n] to str_start[n+1]-1 do append_to_name(str_pool[j]); +for j:=str_start[e] to str_start[e+1]-1 do append_to_name(str_pool[j]); +@y +for j:=str_start[a] to str_start[a+1]-1 do append_to_name(so(str_pool[j])); +for j:=str_start[n] to str_start[n+1]-1 do append_to_name(so(str_pool[j])); +for j:=str_start[e] to str_start[e+1]-1 do append_to_name(so(str_pool[j])); +@z +@x module 526 +if (cur_cmd>active_char)or(cur_chr>127) then +@y +if (cur_cmd>active_char)or(cur_chr>255) then +@z +@x module 603 (change to be made twice) + dvi_out(str_pool[k]); +@y + dvi_out(so(str_pool[k])); +@z +@x module 617 + for s:=str_start[str_ptr] to pool_ptr-1 do dvi_out(str_pool[s]); +@y + for s:=str_start[str_ptr] to pool_ptr-1 do dvi_out(so(str_pool[s])); +@z +@x module 766 + begin case str_pool[r_type*8+t+magic_offset] of +@y + begin case so(str_pool[r_type*8+t+magic_offset]) of +@z +@x module 780 +@d span_code=128 {distinct from any character} +@d cr_code=129 {distinct from |span_code| and from any character} +@y +@d span_code=256 {distinct from any character} +@d cr_code=257 {distinct from |span_code| and from any character} +@z +@x module 815 +label done,done1,done2,done3,done4; +@y +label done,done1,done2,done3,done4,continue; +@z +@x module 896 + else if (type(s)=kern_node)and(subtype(s)=normal) then c:=128 + else if type(s)=whatsit_node then c:=128 + else goto done1; + if c<128 then if lc_code(c)<>0 then + if (lc_code(c)=c)or(uc_hyph>0) then goto done2 + else goto done1; + s:=link(s); +@y + else if (type(s)=kern_node)and(subtype(s)=normal) then goto continue + else if type(s)=whatsit_node then goto continue + else goto done1; + if lc_code(c)<>0 then + if (lc_code(c)=c)or(uc_hyph>0) then goto done2 + else goto done1; +continue: s:=link(s); +@z +@x module 897 + if c>=128 then goto done3; + if (lc_code(c)=0)or(hn=63) then goto done3; + hb:=s; incr(hn); hu[hn]:=c; hc[hn]:=lc_code(c)-1; +@y + if lc_code(c)=0 then goto done3; + if hn=63 then goto done3; + hb:=s; incr(hn); hu[hn]:=c; hc[hn]:=lc_code(c); +@z +@x module 898 +if c>=128 then goto done3; +if (lc_code(c)=0)or(j=63) then goto done3; +incr(j); hu[j]:=c; hc[j]:=lc_code(c)-1;@/ +@y +if lc_code(c)=0 then goto done3; +if j=63 then goto done3; +incr(j); hu[j]:=c; hc[j]:=lc_code(c);@/ +@z +@x module 923 +hc[0]:=127; hc[hn+1]:=127; hc[hn+2]:=128; {insert delimiters} +@y +hc[0]:=0; hc[hn+1]:=0; hc[hn+2]:=256; {insert delimiters} +@z +@x ibid + while hc[l]=trie_char(z) do +@y + while hc[l]=qo(trie_char(z)) do +@z +@x module 931 + repeat if str_pool[u]hc[j] then goto done; +@y + repeat if so(str_pool[u])hc[j] then goto done; +@z +@x module 937 +else begin if (cur_chr>127)or(lc_code(cur_chr)=0) then +@y +else begin if lc_code(cur_chr)=0 then +@z +@x ibid + begin incr(n); hc[n]:=lc_code(cur_chr)-1; +@y + begin incr(n); hc[n]:=lc_code(cur_chr); +@z +@x module 945 +@!init @!trie_c:packed array[trie_pointer] of ASCII_code; {characters to match} +@y +@!init @!trie_c:packed array[trie_pointer] of packed_ASCII_code; + {characters to match} +@z +% In modules 951--954, change "127" to "255" and "128" to "256" +@x module 952 +trie_link(0):=0; trie_char(0):=0; trie_op(0):=min_quarterword; +@y +trie_link(0):=0; trie_char(0):=min_quarterword; trie_op(0):=min_quarterword; +@z +@x module 953 +begin c:=trie_c[p]; +@y +begin c:=so(trie_c[p]); +@z +@x module 955 + begin if trie_link(h+trie_c[q])=0 then goto not_found; +@y + begin if trie_link(h+so(trie_c[q]))=0 then goto not_found; +@z +@x module 956 +repeat z:=h+trie_c[q]; trie_back(trie_link(z)):=trie_back(z); +@y +repeat z:=h+so(trie_c[q]); trie_back(trie_link(z)):=trie_back(z); +@z +@x module 959 + begin q:=trie_l[p]; c:=trie_c[p]; + trie_link(z+c):=trie_ref[q]; trie_char(z+c):=c; trie_op(z+c):=trie_o[p]; +@y + begin q:=trie_l[p]; c:=so(trie_c[p]); + trie_link(z+c):=trie_ref[q]; trie_char(z+c):=qi(c); trie_op(z+c):=trie_o[p]; +@z +@x module 962 + begin if cur_chr="." then cur_chr:=128 {edge-of-word delimiter} + else begin cur_chr:=lc_code(cur_chr); + if cur_chr=0 then + begin print_err("Nonletter"); +@.Nonletter@> + help1("(See Appendix H.)"); error; cur_chr:=128; + end; + end; + if k<63 then + begin incr(k); hc[k]:=cur_chr-1; hyf[k]:=0; digit_sensed:=false; + end; + end +else begin hyf[k]:=cur_chr-"0"; + if k<63 then digit_sensed:=true; + end +@y + begin if cur_chr="." then cur_chr:=0 {edge-of-word delimiter} + else begin cur_chr:=lc_code(cur_chr); + if cur_chr=0 then + begin print_err("Nonletter"); +@.Nonletter@> + help1("(See Appendix H.)"); error; + end; + end; + if k<63 then + begin incr(k); hc[k]:=cur_chr; hyf[k]:=0; digit_sensed:=false; + end; + end + else if k<63 then + begin hyf[k]:=cur_chr-"0"; digit_sensed:=true; + end; + end +@z +@x module 963 + while (p>0)and(c>trie_c[p]) do +@y + while (p>0)and(c>so(trie_c[p])) do +@z +@x ibid + if (p=0)or(c=128 then c:=cur_chr + else begin c:=ho(math_code(cur_chr)); +@y +letter,other_char,char_given: begin c:=ho(math_code(cur_chr)); +@z +@x module 1154 +mmode+letter,mmode+other_char,mmode+char_given: if cur_chr<128 then + set_math_char(ho(math_code(cur_chr))) + else set_math_char(cur_chr); +mmode+char_num: begin scan_char_num; cur_chr:=cur_val; + if cur_chr<128 then set_math_char(ho(math_code(cur_chr))) + else set_math_char(cur_chr); +@y +mmode+letter,mmode+other_char,mmode+char_given: + set_math_char(ho(math_code(cur_chr))); +mmode+char_num: begin scan_char_num; cur_chr:=cur_val; + set_math_char(ho(math_code(cur_chr))); +@z +@x module 1232 + p:=cur_chr; scan_seven_bit_int; p:=p+cur_val; scan_optional_equals; +@y + p:=cur_chr; scan_char_num; p:=p+cur_val; scan_optional_equals; +@z +@x module 1233 +else n:=127 +@y +else n:=255 +@z +@x module 1289 + begin if t>=cs_token_flag then t:=t-active_base; + c:=t mod 256; + if c<128 then if equiv(b+c)<>0 then t:=256*(t div 256)+equiv(b+c); + if t>=cs_token_flag then info(p):=t+active_base + else info(p):=t; +@y + begin c:=t mod 256; + if equiv(b+c)<>0 then info(p):=t-c+equiv(b+c); +@z +@x module 1309 + w.b0:=str_pool[k]; w.b1:=str_pool[k+1]; + w.b2:=str_pool[k+2]; w.b3:=str_pool[k+3]; +@y [often qi(so(x))=x, but not e.g. when "quarterwords" are two bytes] + w.b0:=qi(so(str_pool[k])); w.b1:=qi(so(str_pool[k+1])); + w.b2:=qi(so(str_pool[k+2])); w.b3:=qi(so(str_pool[k+3])); +@z +@x module 1310 + str_pool[k]:=w.b0; str_pool[k+1]:=w.b1; + str_pool[k+2]:=w.b2; str_pool[k+3]:=w.b3 +@y + str_pool[k]:=si(qo(w.b0)); str_pool[k+1]:=si(qo(w.b1)); + str_pool[k+2]:=si(qo(w.b2)); str_pool[k+3]:=si(qo(w.b3)) +@z +@x module 1368 +for k:=str_start[str_ptr] to pool_ptr-1 do dvi_out(str_pool[k]); +@y +for k:=str_start[str_ptr] to pool_ptr-1 do dvi_out(so(str_pool[k])); +@z + +360. Major change to allow multiple hyphenation tables. +I've combined this with the code for a minor change: +361. New parameters \lefthyphenmin and \righthyphenmin. +@x module 11 (affects most change files!) +@!trie_size=8000; {space for hyphenation patterns; should be larger for + \.{INITEX} than it is in production versions of \TeX} +@y +@!trie_size=8000; {space for hyphenation patterns; should be larger for + \.{INITEX} than it is in production versions of \TeX} +@!trie_op_size=500; {space for ``opcodes'' in the hyphenation patterns} +@z +@x module 212 +known as |space_factor|; it holds the current space factor used in spacing +calculations. In math mode, |aux| is also known as |incompleat_noad|; if +@y +known as |space_factor| and |clang|; it holds the current space factor used in +spacing calculations, and the current language used for hyphenation. +(The value of |clang| is undefined in restricted horizontal mode.) +In math mode, |aux| is also known as |incompleat_noad|; if +@z +@x ibid + @!pg_field,@!aux_field,@!ml_field: integer; +@y + @!pg_field,@!ml_field: integer; + @!aux_field: memory_word; +@z +@x module 213 +@d prev_depth==aux {the name of |aux| in vertical mode} +@d space_factor==aux {the name of |aux| in horizontal mode} +@d incompleat_noad==aux {the name of |aux| in math mode} +@y +@d prev_depth==aux.sc {the name of |aux| in vertical mode} +@d space_factor==aux.hh.lh {part of |aux| in horizontal mode} +@d clang==aux.hh.rh {the other part of |aux| in horizontal mode} +@d incompleat_noad==aux.int {the name of |aux| in math mode} +@z +@x module 218 +@!a:integer; {auxiliary} +@y +@!a:memory_word; {auxiliary} +@z +@x module 219 + if a<=ignore_depth then print("ignored") + else print_scaled(a); + if nest[p].pg_field<>0 then + begin print(", prevgraf "); + print_int(nest[p].pg_field); print(" line"); + if nest[p].pg_field<>1 then print_char("s"); + end; + end; +1: begin print_nl("spacefactor "); print_int(a); + end; +2: if a<>null then + begin print("this will be denominator of:"); show_box(a); +@y + if a.sc<=ignore_depth then print("ignored") + else print_scaled(a.sc); + if nest[p].pg_field<>0 then + begin print(", prevgraf "); + print_int(nest[p].pg_field); print(" line"); + if nest[p].pg_field<>1 then print_char("s"); + end; + end; +1: begin print_nl("spacefactor "); print_int(a.hh.lh); + if m>0 then if a.hh.rh>0 then + begin print(", current language "); print_int(a.hh.rh); + end; + end; +2: if a.int<>null then + begin print("this will be denominator of:"); show_box(a.int); +@z +@x modules 236--238 +@d int_pars=50 {total number of integer parameters} +@y +@d language_code=50 {current hyphenation table} +@d left_hyphen_min_code=51 {minimum left hyphenation fragment size} +@d right_hyphen_min_code=52 {minimum right hyphenation fragment size} +@d int_pars=53 {total number of integer parameters} +@z and define/print these new parameters appropriately (mimicking new_line_char) +@x module 418 +else begin cur_val:=aux; + if m=vmode then cur_val_level:=dimen_val@+else cur_val_level:=int_val; + end +@y +else if m=vmode then + begin cur_val:=prev_depth; cur_val_level:=dimen_val; + end +else begin cur_val:=space_factor; cur_val_level:=int_val; + end +@z +@x module 775 + begin mode:=-vmode; prev_depth:=nest[nest_ptr-2].aux_field; +@y + begin mode:=-vmode; prev_depth:=nest[nest_ptr-2].aux_field.sc; +@z +@x module 786 +begin push_nest; mode:=(-hmode-vmode)-mode; aux:=0; +@y +begin push_nest; mode:=(-hmode-vmode)-mode; +if mode=-hmode then space_factor:=0 @+else prev_depth:=0; +@z +@x module 863 +loop@+ begin @; +@y +loop@+ begin if threshold>inf_bad then threshold:=inf_bad; + if second_pass then @; + @; +@z +@x module 891 +passes on only about 5 per cent of the paragraphs. +@y +passes on only about 5 per cent of the paragraphs. + +@= +begin @!init if trie_not_ready then init_trie; @+tini@;@/ +l_hyf:=left_hyphen_min-1;@+if l_hyf<0 then l_hyf:=0; +r_hyf:=right_hyphen_min-1;@+if r_hyf<0 then r_hyf:=0; +min_hyf:=l_hyf+r_hyf+2; cur_lang:=0; +end +@z +@x module 892 +@!hyf_char:integer; {hyphen character of the relevant font} +@y +@!hyf_char:integer; {hyphen character of the relevant font} +@!cur_lang:ASCII_code; {current hyphenation table of interest} +@!l_hyf,@!r_hyf,@!min_hyf:integer; {limits on fragment sizes} +@z +@x module 894 +begin s:=link(cur_p); +@y +begin if min_hyf>63 then goto done1; +s:=link(cur_p); +@z +@x module 896 + else if type(s)=whatsit_node then goto continue +@y + else if type(s)=whatsit_node then + begin @; + goto continue; + end +@z +@x module 899 (title of this module also changes appropriately) +if hn<5 then goto done1; +@y +if hn:=@t$p_1$@>| and then, for |1)|. Then set |hyf[l-hyf_distance[v]]:=@tmax@>( +hyf[l-hyf_distance[v]], hyf_num[v])|, and |v:=hyf_next[v]|; repeat, if +necessary, until |v=min_quarterword|. +@y +the letters in |hc[(l-k+1)..l@,]| of language |t|, +we perform all of the required operations +for this pattern by carrying out the following little program: Set +|v:=trie_op(@t$z_k$@>)|. Then set |v:=v+op_start[t]|, +|hyf[l-hyf_distance[v]]:=@tmax@>(hyf[l-hyf_distance[v]], hyf_num[v])|, +and |v:=hyf_next[v]|; repeat, if necessary, until |v=min_quarterword|. +@z +@x module 921 +@!hyf_distance:array[quarterword] of small_number; {position |k-j| of $n_j$} +@!hyf_num:array[quarterword] of small_number; {value of $n_j$} +@!hyf_next:array[quarterword] of quarterword; {continuation of this |trie_op|} +@y +@!hyf_distance:array[1..trie_op_size] of small_number; {position |k-j| of $n_j$} +@!hyf_num:array[1..trie_op_size] of small_number; {value of $n_j$} +@!hyf_next:array[1..trie_op_size] of quarterword; {continuation code} +@!op_start:array[ASCII_code] of 0..trie_op_size; {offset for current language} +@z +@x module 922 +@!v:quarterword; {an index into |hyf_distance|, etc.} +@y +@!v:integer; {an index into |hyf_distance|, etc.} +@z +@x module 923 +for j:=0 to hn-2 do + begin z:=hc[j]; l:=j; +@y +if trie_char(cur_lang+1)<>qi(cur_lang) then return; {no patterns for |cur_lang|} +for j:=0 to hn-r_hyf do + begin z:=trie_link(cur_lang+1)+hc[j]; l:=j; +@z +@x ibid +found: hyf[1]:=0; hyf[hn-2]:=0; hyf[hn-1]:=0; hyf[hn]:=0 +@y +found: for j:=0 to l_hyf do hyf[j]:=0; +for j:=0 to r_hyf do hyf[hn-j]:=0 +@z +@x module 924 +repeat i:=l-hyf_distance[v]; +@y +repeat v:=v+op_start[cur_lang]; i:=l-hyf_distance[v]; +@z +@x module 930 +h:=hc[1]; +@y +h:=hc[1]; incr(hn); hc[hn]:=cur_lang; +@z +@x ibid +not_found: +@y +not_found: decr(hn) +@z +@x module 931 + goto found; +@y + decr(hn); goto found; +@z +@x module 934 +@p procedure new_hyph_exceptions; {enters new exceptions} +label reswitch, exit, found, not_found, done; +@y +@d set_cur_lang==if language<=0 then cur_lang:=0 + else if language>255 then cur_lang:=0 + else cur_lang:=language + +@p procedure new_hyph_exceptions; {enters new exceptions} +label reswitch, exit, found, not_found; +@z +@x ibid +begin scan_left_brace; {a left brace must follow \.{\\hyphenation}} +@y +begin scan_left_brace; {a left brace must follow \.{\\hyphenation}} +set_cur_lang; +@z +@x module 935 + spacer,right_brace: begin if n>4 then @; +@y + spacer,right_brace: begin if n>1 then @; +@z +@x module 938 +begin if n>1 then +@y +begin if n<63 then +@z +@x module 939 +begin str_room(n); h:=0; +@y +begin incr(n); hc[n]:=cur_lang; str_room(n); h:=0; +@z +@x ibid +loop@+ begin if p=null then goto done; + if info(p); +@y +@; +@z +@x module 942 +@p@!init @@; +@y +@= +@!init @@; +@z +@x module 943 +@d quarterword_diff=max_quarterword-min_quarterword +@d trie_op_hash_size=quarterword_diff+quarterword_diff {double} + +@= +@!init@! trie_op_hash:array[0..trie_op_hash_size] of quarterword; + {trie op codes for triples} +tini@;@/ +@t\hskip1em@>@!trie_op_ptr:quarterword; {highest |trie_op| assigned} +@y +@= +@!init@! trie_op_hash:array[-trie_op_size..trie_op_size] of 0..trie_op_size; + {trie op codes for quadruples} +@!trie_used:array[ASCII_code] of quarterword; + {largest opcode used so far for this language} +@!trie_op_lang:array[1..trie_op_size] of ASCII_code; + {language part of a hashed quadruple} +@!trie_op_val:array[1..trie_op_size] of quarterword; + {opcode corresponding to a hashed quadruple} +@!trie_op_ptr:0..trie_op_size; {number of stored ops so far} +tini +@z +@x module 944 should be entirely replaced +@y by the following code: +@ It's tempting to remove the |overflow| stops in the following procedure; +|new_trie_op| could return |min_quarterword| (thereby simply ignoring +part of a hyphenation pattern) instead of aborting the job. However, that would +lead to different hyphenation results on different installations of \TeX\ +using the same patterns. The |overflow| stops are necessary for portability +of patterns. + +@= +function new_trie_op(@!d,@!n:small_number;@!v:quarterword):quarterword; +label exit; +var h:-trie_op_size..trie_op_size; {trial hash location} +@!u:quarterword; {trial op code} +@!l:0..trie_op_size; {pointer to stored data} +begin h:=abs(n+313*d+361*v+1009*cur_lang) mod (trie_op_size+trie_op_size) + - trie_op_size; +loop@+ begin l:=trie_op_hash[h]; + if l=0 then {empty position found for a new op} + begin if trie_op_ptr=trie_op_size then + overflow("pattern memory ops",trie_op_size); + u:=trie_used[cur_lang]; + if u=max_quarterword then + overflow("pattern memory ops per language", + max_quarterword-min_quarterword); + incr(trie_op_ptr); incr(u); trie_used[cur_lang]:=u; + hyf_distance[trie_op_ptr]:=d; + hyf_num[trie_op_ptr]:=n; hyf_next[trie_op_ptr]:=v; + trie_op_lang[trie_op_ptr]:=cur_lang; trie_op_hash[h]:=trie_op_ptr; + trie_op_val[trie_op_ptr]:=u; new_trie_op:=u; return; + end; + if (hyf_distance[l]=d)and(hyf_num[l]=n)and(hyf_next[l]=v) + and(trie_op_lang[l]=cur_lang) then + begin new_trie_op:=trie_op_val[l]; return; + end; + if h>-trie_op_size then decr(h)@+else h:=trie_op_size; + end; +exit:end; +@z +@x module 945: move the code from this module into 946, and introduce new code: +@y +@ After |new_trie_op| has compressed the necessary opcode information, +plenty of information is available to unscramble the data into the +final form needed by our hyphenation algorithm. + +@= +op_start[0]:=-min_quarterword; +for j:=1 to 255 do op_start[j]:=op_start[j-1]+qo(trie_used[j-1]); +for j:=1 to trie_op_ptr do + trie_op_hash[j]:=op_start[trie_op_lang[j]]+trie_op_val[j]; {destination} +for j:=1 to trie_op_ptr do while trie_op_hash[j]>j do + begin k:=trie_op_hash[j];@/ + t:=hyf_distance[k]; hyf_distance[k]:=hyf_distance[j]; hyf_distance[j]:=t;@/ + t:=hyf_num[k]; hyf_num[k]:=hyf_num[j]; hyf_num[j]:=t;@/ + t:=hyf_next[k]; hyf_next[k]:=hyf_next[j]; hyf_next[j]:=t;@/ + trie_op_hash[j]:=trie_op_hash[k]; trie_op_hash[k]:=k; + end +@z +@x module 949: Move this code to just after the new module 945! +mentioned so far, let's write a procedure that does the initialization. + +@= +procedure init_pattern_memory; {gets ready to build a linked trie} +var h:0..trie_op_hash_size; {an index into |trie_op_hash|} +@!p:trie_pointer; {an index into |trie_hash|} +begin for h:=0 to trie_op_hash_size do trie_op_hash[h]:=min_quarterword; +trie_op_ptr:=min_quarterword; trie_root:=0; trie_c[0]:=0; trie_ptr:=0; +for p:=0 to trie_size do trie_hash[p]:=0; +end; +@y +mentioned so far, let's write down the code that gets them started. + +@= +for k:=-trie_op_size to trie_op_size do trie_op_hash[k]:=0; +for k:=0 to 255 do trie_used[k]:=min_quarterword; +trie_op_ptr:=0; +@z +@x module 950 +@t\hskip1em@>@!trie_min:trie_pointer; + {all locations |<=trie_min| are vacant in |trie|} +tini@;@/ +@t\hskip1em@>@!trie_max:trie_pointer; {largest location used in |trie|} +@y +@t\hskip10pt@>@!trie_min:array[ASCII_code] of trie_pointer; + {the first possible slot for each character} +@t\hskip10pt@>@!trie_max:trie_pointer; {largest location used in |trie|} +@t\hskip10pt@>@!trie_not_ready:boolean; {is the trie still in linked form?} +tini +@z +@x modules 951 and 952 +@ Here is how these data structures are initialized. + +@= +procedure init_trie_memory; {gets ready to pack into |trie|} +var p:trie_pointer; {index into |trie_ref|, |trie|, |trie_taken|} +begin for p:=0 to trie_ptr do trie_ref[p]:=0; +trie_max:=256; trie_min:=256; trie_link(0):=1; trie_taken[0]:=false; +trie_link(trie_size):=0; trie_back(0):=trie_size; {wrap around} +for p:=1 to 256 do + begin trie_back(p):=p-1; trie_link(p):=p+1; trie_taken[p]:=false; + end; +end; + +@ Each time \.{\\patterns} appears, it overrides any patterns that were +entered earlier, so the arrays are not initialized until \TeX\ sees +\.{\\patterns}. However, some of the global variables must be +initialized when \.{INITEX} is loaded, in case the user never mentions +any \.{\\patterns}. + +@= +trie_op_ptr:=min_quarterword;@/ +trie_link(0):=0; trie_char(0):=min_quarterword; trie_op(0):=min_quarterword; +for k:=1 to 255 do trie[k]:=trie[0]; +trie_max:=255; +@y +@ Each time \.{\\patterns} appears, it contributes further patterns to +the future trie, which will be built only when hyphenation is attempted or +when a format file is dumped. The boolean variable |trie_not_ready| +will change to |false| when the trie is compressed; this will disable +further patterns. + +@= +trie_not_ready:=true; trie_root:=0; trie_c[0]:=si(0); trie_ptr:=0; + +@ Here is how the trie-compression data structures are initialized. +If storage is tight, it would be possible to overlap |trie_op_hash|, +|trie_op_lang|, and |trie_op_val| with |trie|, |trie_hash|, and |trie_taken|, +because we finish with the former just before we need the latter. + +@= +@; +for p:=0 to trie_size do trie_hash[p]:=0; +trie_root:=compress_trie(trie_root); {identify equivalent subtries} +for p:=0 to trie_ptr do trie_ref[p]:=0; +for p:=0 to 255 do trie_min[p]:=p+1; +trie_link(0):=1; trie_max:=0 +@z +@x module 953 +begin c:=so(trie_c[p]); +if c= +h.rh:=0; h.b0:=min_quarterword; h.b1:=min_quarterword; {|trie_link:=0|, + |trie_op:=min_quarterword|, |trie_char:=qi(0)|} +if trie_root=0 then {no patterns were given} + begin for r:=0 to 256 do trie[r]:=h; + trie_max:=256; + end +else begin trie_fix(trie_root); {this fixes the non-holes in |trie|} + r:=0; {now we will zero out all the holes} + repeat s:=trie_link(r); trie[r]:=h; r:=s; + until r>trie_max; + end; +trie_char(0):=qi("?"); {make |trie_char(c)<>c| for all |c|} +@z +@x module 960 +@!r,@!s:trie_pointer; {used to clean up the packed |trie|} +@!h:two_halves; {template used to zero out |trie|'s holes} +begin scan_left_brace; {a left brace must follow \.{\\patterns}} +init_pattern_memory;@/ +@; +trie_root:=compress_trie(trie_root); {compress the trie} +@; +end; +@y +begin if trie_not_ready then + begin set_cur_lang; scan_left_brace; {a left brace must follow \.{\\patterns}} + @; + end +else begin print_err("Too late for "); print_esc("patterns"); + help1("All patterns must be given before typesetting begins."); + error; link(garbage):=scan_toks(false,false); flush_list(def_ref); + end; +end; +@z +@x module 963 +q:=0; +while l= +procedure init_trie; +var @!p:trie_pointer; {pointer for initialization} +@!j,@!k,@!t:integer; {all-purpose registers for initialization} +@!r,@!s:trie_pointer; {used to clean up the packed |trie|} +@!h:two_halves; {template used to zero out |trie|'s holes} +begin @; +if trie_root<>0 then + begin first_fit(trie_root); trie_pack(trie_root); + end; +@; +trie_not_ready:=false; +end; +@z +@x module 1033 gets new code before main_loop_1 +@y +if mode>0 then if language<>clang then fix_language; +@z +@x modules 1091 and 1200 +push_nest; mode:=hmode; space_factor:=1000; +@y +push_nest; mode:=hmode; space_factor:=1000; clang:=0; +@z +@x module 1324 +for k:=0 to trie_max do dump_hh(trie[k]); +dump_int(trie_op_ptr); +for k:=min_quarterword+1 to trie_op_ptr do + begin dump_int(hyf_distance[k]); + dump_int(hyf_num[k]); + dump_int(hyf_next[k]); + end; +print_ln; print_int(hyph_count); print(" hyphenation exception"); +if hyph_count<>1 then print_char("s"); +print_nl("Hyphenation trie of length "); print_int(trie_max); +@.Hyphenation trie...@> +print(" has "); print_int(qo(trie_op_ptr)); print(" op"); +if trie_op_ptr<>min_quarterword+1 then print_char("s") +@y +print_ln; print_int(hyph_count); print(" hyphenation exception"); +if hyph_count<>1 then print_char("s"); +if trie_not_ready then init_trie; +dump_int(trie_max); +for k:=0 to trie_max do dump_hh(trie[k]); +dump_int(trie_op_ptr); +for k:=1 to trie_op_ptr do + begin dump_int(hyf_distance[k]); + dump_int(hyf_num[k]); + dump_int(hyf_next[k]); + end; +print_nl("Hyphenation trie of length "); print_int(trie_max); +@.Hyphenation trie...@> +print(" has "); print_int(trie_op_ptr); print(" op"); +if trie_op_ptr<>1 then print_char("s"); +print(" out of "); print_int(trie_op_size); +for k:=255 downto 0 do if trie_used[k]>min_quarterword then + begin print_nl(" "); print_int(qo(trie_used[k])); + print(" for language "); print_int(k); + dump_int(k); dump_int(qo(trie_used[k])); + end +@z +@x module 1325 +undump_size(0)(trie_size)('trie size')(trie_max); +for k:=0 to trie_max do undump_hh(trie[k]); +undump(min_quarterword)(max_quarterword)(trie_op_ptr); +for k:=min_quarterword+1 to trie_op_ptr do + begin undump(0)(63)(hyf_distance[k]); {a |small_number|} + undump(0)(63)(hyf_num[k]); + undump(min_quarterword)(max_quarterword)(hyf_next[k]); + end +@y +undump_size(0)(trie_size)('trie size')(j); {|trie_max|} +for k:=0 to j do undump_hh(trie[k]); +undump_size(0)(trie_op_size)('trie op size')(j); {|trie_op_ptr|} +for k:=1 to j do + begin undump(0)(63)(hyf_distance[k]); {a |small_number|} + undump(0)(63)(hyf_num[k]); + undump(min_quarterword)(max_quarterword)(hyf_next[k]); + end; +k:=256; +while j>0 do + begin undump(0)(k-1)(k); undump(1)(j)(x); j:=j-x; op_start[k]:=qo(j); + end; +@!init trie_not_ready:=false @+tini +@z +@x module 1341 gets two new definitions +@y +@d language_node=4 {|subtype| in whatsits that change the current language} +@d stored_language(#)==mem[#+1].int {language number, in the range |0..255|} +@z +@x module 1344 gets a new definition and a new Pascal statement +@y +@d set_language_code=5 {command modifier for \.{\\setlanguage}} +primitive("setlanguage",extension,set_language_code);@/ +@!@:set_language_}{\.{\\setlanguage} primitive@> +@z +@x module 1346 gets a new case +@y + set_language_code:print_esc("setlanguage"); +@z +@x module 1348 gets a new case +@y +set_language_code:@; +@z +@x module 1356 gets a new case +@y +language_node:begin print_esc("setlanguage"); + print_int(stored_language(p)); + end; +@z +% in modules 1357 and 1358, change "close_node" to "close_node,language_node". +@x module 1362 becomes two modules +@ @=do_nothing +@y +@ @= +if subtype(cur_p)=language_node then cur_lang:=stored_language(cur_p) + +@ @= +if subtype(s)=language_node then cur_lang:=stored_language(s) +@z and old module 1367 is moved to just before the old module 1378 +@x module 1373 gets a new case +@y +language_node:do_nothing; +@z +@x new modules before the system-dependent changes (i.e. before the old 1376) +@y +@ @= +if abs(mode)<>hmode then report_illegal_case +else begin new_whatsit(language_node,small_node_size); + scan_int; + if cur_val<=0 then clang:=0 + else if cur_val>255 then clang:=0 + else clang:=cur_val; + stored_language(tail):=clang; + end + +@ Finally, we need a subroutine that comes into play when a character of +a non-|clang| language is being appended to the current paragraph. + +@= +procedure fix_language; +var @!l:ASCII_code; {the new current language} +begin if language<=0 then l:=0 +else if language>255 then l:=0 +else l:=language; +if l<>clang then + begin new_whatsit(language_node,small_node_size); + stored_language(tail):=l; clang:=l; + end; +end; +@z + +362. Major extension to ligature capability. +@x module 143 +a linked list of character nodes for those characters. +@y +a linked list of character nodes for all original characters that have been +deleted. (This list might be empty if the characters that generated the +ligature were retained in other nodes.) + +The |subtype| field is 0, plus 2 and/or 1 if the original source of the +ligature included implicit left and/or right boundaries. +@z +@x in module 144 add the following procedure to the existing code +@y +function new_lig_item(@!c:quarterword):pointer; +var p:pointer; {the new node} +begin p:=get_node(small_node_size); character(p):=c; lig_ptr(p):=null; +new_lig_item:=p; +end; +@z +@x module 193 +font_in_short_display:=font(lig_char(p)); +short_display(lig_ptr(p)); print_char(")"); +@y +if subtype(p)>1 then print_char("|"); +font_in_short_display:=font(lig_char(p)); short_display(lig_ptr(p)); +if odd(subtype(p)) then print_char("|"); +print_char(")"); +end +@z +@x modules 208 and 209 +@d radical=65 {square root and similar signs ( \.{\\radical} )} +@y +@d no_boundary=65 {suppress boundary ligatures ( \.{\\noboundary} )} +@d radical=66 {square root and similar signs ( \.{\\radical} )} +@z and so on, adding 1 to each definition until getting to max_command=100 +@x module 265 gets a new statement +@y +primitive("noboundary",no_boundary,0);@/ +@!@:no_boundary_}{\.{\\noboundary} primitive@> +@z +@x module 266 gets a new case +@y +no_boundary:print_esc("noboundary"); +@z +@x module 545 is entirely replaced +@y by the following new specifications: +@ The |lig_kern| array contains instructions in a simple programming language +that explains what to do for special letter pairs. Each word in this array is a +|@!lig_kern_command| of four bytes. + +\yskip\hang first byte: |skip_byte|, indicates that this is the final program + step if the byte is 128 or more, otherwise the next step is obtained by + skipping this number of intervening steps.\par +\hang second byte: |next_char|, ``if |next_char| follows the current character, + then perform the operation and stop, otherwise continue.''\par +\hang third byte: |op_byte|, indicates a ligature step if less than~128, + a kern step otherwise.\par +\hang fourth byte: |remainder|.\par +\yskip\noindent +In a kern step, an +additional space equal to |kern[256*(op_byte-128)+remainder]| is inserted +between the current character and |next_char|. This amount is +often negative, so that the characters are brought closer together +by kerning; but it might be positive. + +There are eight kinds of ligature steps, having |op_byte| codes $4a+2b+c$ where +$0\le a\le b+c$ and $0\le b,c\le1$. The character whose code is +|remainder| is inserted between the current character and |next_char|; +then the current character is deleted if $b=0$, and |next_char| is +deleted if $c=0$; then we pass over $a$~characters to reach the next +current character (which may have a ligature/kerning program of its own). + +If the very first instruction of the |lig_kern| array has |skip_byte=255|, +the |next_char| byte is the so-called right boundary character of this font; +the value of |next_char| need not lie between |bc| and~|ec|. +If the very last instruction of the |lig_kern| array has |skip_byte=255|, +there is a special ligature/kerning program for a left boundary character, +beginning at location |256*op_byte+remainder|. +The interpretation is that \TeX\ puts implicit boundary characters +before and after each consecutive string of characters from the same font. +These implicit characters do not appear in the output, but they can affect +ligatures and kerning. + +If the very first instruction of a character's |lig_kern| program has +|skip_byte>128|, the program actually begins in location +|256*op_byte+remainder|. This feature allows access to large |lig_kern| +arrays, because the first instruction must otherwise +appear in a location |<=255|. + +Any instruction with |skip_byte>128| in the |lig_kern| array must have +|256*op_byte+remainder= +@y +@d non_char==qi(256) {a |halfword| code that can't match a real character} +@d non_address==font_mem_size {a spurious |font_index|} + +@= +@z +@x module 548 gets a new type definition +@y +@!font_index=0..font_mem_size; +@z +@x module 549 + {current \.{\\skewchar} values} +@y + {current \.{\\skewchar} values} +@!bchar_label:array[internal_font_number] of font_index; + {start of |lig_kern| program for left boundary character, + |non_address| if there is none} +@!font_bchar:array[internal_font_number] of min_quarterword..non_char; + {right boundary character, |non_char| if there is none} +@!font_false_bchar:array[internal_font_number] of min_quarterword..non_char; + {|font_bchar| if it doesn't exist in the font, otherwise |non_char|} +@z +@x module 557 +@d char_kern_end(#)==rem_byte(#)].sc +@y NOTE: Optimize kern_base_offset in your change file! It's a constant. +@d char_kern_end(#)==256*op_byte(#)+rem_byte(#)].sc +@d kern_base_offset==256*(kern_flag) +@d lig_kern_restart_end(#)==256*op_byte(#)+rem_byte(#)+32768-kern_base_offset +@d lig_kern_restart(#)==lig_kern_base[#]+lig_kern_restart_end +@z +@x module 560 +@!z:scaled; {the design size or the ``at'' size} +@y +@!bch_label:integer; {left boundary start location, or infinity} +@!bchar:0..256; {right boundary character, or 256} +@!z:scaled; {the design size or the ``at'' size} +@z +@x module 566 +kern_base[f]:=lig_kern_base[f]+nl; +exten_base[f]:=kern_base[f]+nk; +@y +kern_base[f]:=lig_kern_base[f]+nl-kern_base_offset; +exten_base[f]:=kern_base[f]+kern_base_offset+nk; +@z +@x module 573: The entire module is replaced +@y by the following code. +@ @d check_existence(#)==@t@>@;@/ + begin check_byte_range(#); + qw:=char_info(f)(#); {N.B.: not |qi(#)|} + if not char_exists(qw) then abort; + end + +@= +bch_label:=@'77777; bchar:=256; +if nl>0 then + begin for k:=lig_kern_base[f] to kern_base[f]+kern_base_offset-1 do + begin store_four_quarters(font_info[k].qqqq); + if a>128 then + begin if 256*c+d>=nl then abort; + if a=255 then if k=lig_kern_base[f] then bchar:=b; + end + else begin if b<>bchar then check_existence(b); + if c<128 then check_existence(d) {check ligature} + else if 256*(c-128)+d>=nk then abort; {check kern} + if a<128 then if k-lig_kern_base[f]+a+1>=nl then abort; + end; + end; + if a=255 then bch_label:=256*c+d; + end; +for k:=kern_base[f]+kern_base_offset to exten_base[f]-1 do + store_scaled(font_info[k].sc); +@z +@x module 574 (actually a bugfix) + if a<>0 then check_byte_range(a); + if b<>0 then check_byte_range(b); + if c<>0 then check_byte_range(c); + check_byte_range(d); +@y + if a<>0 then check_existence(a); + if b<>0 then check_existence(b); + if c<>0 then check_existence(c); + check_existence(d); +@z +@x module 576 +font_name[f]:=nom; +@y +if bch_label=bc then + begin qw:=char_info(f)(bchar); {N.B.: not |qi(bchar)|} + if char_exists(qw) then font_false_bchar[f]:=non_char; + end; +font_name[f]:=nom; +@z +@x module 708 (slight but optional optimization) +continue: if (qo(y)>=font_bc[g])and(qo(y)<=font_ec[g]) then + begin q:=char_info(g)(y); +@y +if (qo(y)>=font_bc[g])and(qo(y)<=font_ec[g]) then + begin continue: q:=char_info(g)(y); +@z +@x module 740 (another bugfix) + i:=char_info(f)(y); +@y + i:=char_info(f)(y); + if not char_exists(i) then goto done; +@z +@x module 741 + repeat cur_i:=font_info[a].qqqq; + if qo(next_char(cur_i))=skew_char[cur_f] then + begin if op_bit(cur_i)>=kern_flag then + s:=char_kern(cur_f)(cur_i); + goto done1; + end; + incr(a); + until stop_bit(cur_i)>=stop_flag; +@y + cur_i:=font_info[a].qqqq; + if skip_byte(cur_i)>stop_flag then + begin a:=256*(qo(op_byte(cur_i)))+rem_byte(cur_i); + cur_i:=font_info[a].qqqq; + end; + loop begin if qo(next_char(cur_i))=skew_char[cur_f] then + begin if op_byte(cur_i)>=kern_flag then + if skip_byte(cur_i)<=stop_flag then s:=char_kern(cur_f)(cur_i); + goto done1; + end; + if skip_byte(cur_i)>=stop_flag then goto done1 + else a:=a+qo(skip_byte(cur_i))+1; + cur_i:=font_info[a].qqqq; + end; +@z +@x module 749 (yet another bugfix of the same type!) +@!p,@!v,@!x,@!y,@!z:pointer; {temporary registers for box construction} +@y +@!p,@!v,@!x,@!y,@!z:pointer; {temporary registers for box construction} +@!c:quarterword;@+@!i:four_quarters; {registers for character examination} +@z +@x ibid + begin cur_c:=rem_byte(cur_i); character(nucleus(q)):=cur_c; + cur_i:=char_info(cur_f)(cur_c); +@y + begin c:=rem_byte(cur_i); i:=char_info(cur_f)(c); + if char_exists(i) then + begin cur_c:=c; cur_i:=i; character(nucleus(q)):=c; + end; +@z +@x module 752 +@!p:pointer; {temporary register for list manipulation} +@y +@!p,@!r:pointer; {temporary registers for list manipulation} +@z +@x ibid + repeat cur_i:=font_info[a].qqqq;@/ + @; + incr(a); + until stop_bit(cur_i)>=stop_flag; +@y + cur_i:=font_info[a].qqqq; + if skip_byte(cur_i)>stop_flag then + begin a:=lig_kern_restart(cur_f)(cur_i); + cur_i:=font_info[a].qqqq; + end; + loop@+ begin @; + if skip_byte(cur_i)>=stop_flag then return; + a:=a+qo(skip_byte(cur_i))+1; + cur_i:=font_info[a].qqqq; + end; +@z +@x The entire code of module 753 is revised +@y and should be replaced by the following: +@ Note that a ligature between an |ord_noad| and another kind of noad +is replaced by an |ord_noad|, when the two noads collapse into one. +But we could make a parenthesis (say) change shape when it follows +certain letters. Presumably a font designer will define such +ligatures only when this convention makes sense. + +\chardef\?='174 % vertical line to indicate character retention + +@= +if next_char(cur_i)=cur_c then if skip_byte(cur_i)<=stop_flag then + if op_byte(cur_i)>=kern_flag then + begin p:=new_kern(char_kern(cur_f)(cur_i)); + link(p):=link(q); link(q):=p; return; + end + else begin check_interrupt; {allow a way out of infinite ligature loop} + case op_byte(cur_i) of + qi(1),qi(5): character(nucleus(q)):=rem_byte(cur_i); {\.{=:\?}, \.{=:\?>}} + qi(2),qi(6): character(nucleus(p)):=rem_byte(cur_i); {\.{\?=:}, \.{\?=:>}} + qi(3),qi(7),qi(11):begin r:=new_noad; {\.{\?=:\?}, \.{\?=:\?>}, \.{\?=:\?>>}} + character(nucleus(r)):=rem_byte(cur_i); + fam(nucleus(r)):=fam(nucleus(q));@/ + link(q):=r; link(r):=p; + if op_byte(cur_i)qi(3) then return; + math_type(nucleus(q)):=math_char; goto restart; + end +@z +@x module 862 +@!q,@!r,@!s:pointer; {miscellaneous nodes of temporary interest} +@y +@!q,@!r,@!s,@!prev_s:pointer; {miscellaneous nodes of temporary interest} +@z +@x module 892 +nodes $p_a$ and~$p_b$ in the description above are placed into variables +@y +nodes $p_{a-1}$ and~$p_b$ in the description above are placed into variables +@z +@x ibid +@!hc:array[0..65] of halfword; {word to be hyphenated} +@y +@!hc:array[0..65] of 0..256; {word to be hyphenated} +@z +@x ibid +@!hu:array[1..63] of ASCII_code; {like |hc|, before conversion to lowercase} +@y +@!hu:array[0..63] of 0..256; {like |hc|, before conversion to lowercase} +@z +@x module 894 +s:=link(cur_p); +@y +prev_s:=cur_p; s:=link(prev_s); +@z +@x module 895 +label done,found,not_found,found1,exit; +@y +label common_ending,done,found,found1,not_found,not_found+1,exit; +@z +@x module 896 + else if type(s)=ligature_node then + begin q:=lig_ptr(s); c:=qo(character(q)); hf:=font(q); + end +@y + else if type(s)=ligature_node then + if lig_ptr(s)=null then goto continue + else begin q:=lig_ptr(s); c:=qo(character(q)); hf:=font(q); + end +@z +@x ibid +continue: s:=link(s); +@y +continue: prev_s:=s; s:=link(prev_s); +@z +@x ibid +ha:=s +@y +ha:=prev_s +@z +@x module 898 +begin j:=hn; q:=lig_ptr(s); +if font(q)<>hf then goto done3; +repeat c:=qo(character(q)); +if lc_code(c)=0 then goto done3; +if j=63 then goto done3; +incr(j); hu[j]:=c; hc[j]:=lc_code(c);@/ +q:=link(q); +until q=null; +@y +begin if font(lig_char(s))<>hf then goto done3; +j:=hn; q:=lig_ptr(s); +while q>null do + begin c:=qo(character(q)); + if lc_code(c)=0 then goto done3; + if j=63 then goto done3; + incr(j); hu[j]:=c; hc[j]:=lc_code(c);@/ + q:=link(q); + end; +@z +@x module 900 gets three new global variables +@y +@!init_list:pointer; {list of punctuation characters preceding the word} +@!init_lig:boolean; {does |init_list| represent a ligature?} +@!init_lft:boolean; {if so, did the ligature involve a left boundary?} +@z +@x module 901 +@!q,@!r,@!s:pointer; {temporary registers for list manipulation} +@y +@!p,@!q,@!r,@!s:pointer; {temporary registers for list manipulation} +@!bchar:halfword; {right boundary character of hyphenated word, or |non_char|} +@z +@x module 903 should be entirely replaced +@y by the following: +@ If hyphens are in fact going to be inserted, \TeX\ first deletes the +subsequence of nodes between |ha| and~|hb|. An attempt is made to +preserve the effect that implicit boundary characters and punctuation marks +had on ligatures inside the hyphenated word, by storing a left boundary or +preceding character in |hu[0]| and by storing a possible right boundary +in |bchar|. We set |j:=0| if |hu[0]| is to be part of the reconstruction; +otherwise |j:=1|. +The variable |s| will point to the tail of the current hlist, and +|q| will point to the node following |hb|, so that +things can be hooked up after we reconstitute the hyphenated word. + +@= +q:=link(hb); link(hb):=null; r:=link(ha); link(ha):=null; bchar:=non_char; +if type(hb)=ligature_node then if odd(subtype(hb)) then + bchar:=font_bchar[hf]; +if is_char_node(ha) then + begin init_list:=ha; init_lig:=false; hu[0]:=qo(character(ha)); + end +else if type(ha)=ligature_node then + begin init_list:=lig_ptr(ha); init_lig:=true; init_lft:=(subtype(ha)>1); + hu[0]:=qo(character(lig_char(ha))); + if init_list=null then if init_lft then + begin hu[0]:=256; init_lig:=false; + end; {in this case a ligature will be reconstructed from scratch} + free_node(ha,small_node_size); + end +else goto not_found+1; {no punctuation found} +s:=cur_p; {we have |cur_p<>ha| because |type(cur_p)=glue_node|} +while link(s)<>ha do s:=link(s); +j:=0; goto common_ending; +not_found+1: j:=1; s:=ha; init_list:=null; +if not is_char_node(r) then if type(r)=ligature_node then + if subtype(r)>1 then + begin j:=0; hu[0]:=256; init_lig:=false; + end; +common_ending: flush_node_list(r); +@; +flush_list(init_list) +@z +@x modules 905--911 are entirely replaced +@y by the following new code: +Still further complications arise in the presence of ligatures that do not +delete the original characters. When punctuation precedes the word being +hyphenated, \TeX's method is not perfect under all possible scenarios, +because punctuation marks and letters can propagate information back and forth. +For example, suppose the original pre-hyphenation pair +\.{*a} changes to \.{*y} via a \.{\?=:} ligature, which changes to \.{xy} +via a \.{=:\?} ligature; if $p_{a-1}=\.x$ and $p_a=\.y$, the reconstitution +procedure isn't smart enough to obtain \.{xy} again. In such cases the +font designer should include a ligature that goes from \.{xa} to \.{xy}. + +@ The processing is facilitated by a subroutine called |reconstitute|. Given +a string of characters $x_j\ldots x_n$, there is a smallest index $m\ge j$ +such that the ``translation'' of $x_j\ldots x_n$ by ligatures and kerning +has the form $y_1\ldots y_t$ followed by the translation of $x_{m+1}\ldots x_n$, +where $y_1\ldots y_t$ is some nonempty sequence of character, ligature, and +kern nodes. We call $x_j\ldots x_m$ a ``cut prefix'' of $x_j\ldots x_n$. +For example, if $x_1x_2x_3=\.{fly}$, and if the font contains `fl' as a +ligature and a kern between `fl' and `y', then $m=2$, $y=2$, and $y_1$ will +be a ligature node for `fl' followed by an appropriate kern node~$y_2$. +In the most common case, $x_j$~forms no ligature with $x_{j+1}$ and we +simply have $m=j$, $y_1=x_j$. If $m= +@!hyphen_passed:small_number; {first hyphen in a ligature, if any} + +@ @= +function reconstitute(@!j,@!n:small_number;@!bchar,@!hchar:halfword): + small_number; +label continue,done; +var @!p:pointer; {temporary register for list manipulation} +@!t:pointer; {a node being appended to} +@!q:four_quarters; {character information or a lig/kern instruction} +@!cur_rh:halfword; {hyphen character for ligature testing} +@!test_char:halfword; {hyphen or other character for ligature testing} +@!w:scaled; {amount of kerning} +@!k:font_index; {position of current lig/kern instruction} +begin hyphen_passed:=0; t:=hold_head; w:=0; link(hold_head):=null; + {at this point |ligature_present=lft_hit=rt_hit=false|} +@; +continue:@; +@; +reconstitute:=j; +end; + +@ The reconstitution procedure shares many of the global data structures +by which \TeX\ has processed the words before they were hyphenated. +There is an implied ``cursor'' between characters |cur_l| and |cur_r|; +these characters will be tested for possible ligature activity. If +|ligature_present| then |cur_l| is a ligature character formed from the +original characters following |cur_q| in the current translation list. +There is a ``ligature stack'' between the cursor and character |j+1|, +consisting of pseudo-ligature nodes linked together by their |link| fields. +This stack is normally empty unless a ligature command has created a new +character that will need to be processed later. A pseudo-ligature is +a special node having a |character| field that represents a potential +ligature and a |lig_ptr| field that points to a |char_node| or is |null|. +We have +$$|cur_r|=\cases{|character(lig_stack)|,&if |lig_stack>null|;\cr + |qi(hu[j+1])|,&if |lig_stack=null| and |j= +@!cur_l,@!cur_r:halfword; {characters before and after the cursor} +@!cur_q:pointer; {where a ligature should be detached} +@!lig_stack:pointer; {unfinished business to the right of the cursor} +@!ligature_present:boolean; {should a ligature node be made for |cur_l|?} +@!lft_hit,@!rt_hit:boolean; {did we hit a ligature with a boundary character?} + +@ @d append_charnode_to_t(#)== begin link(t):=get_avail; t:=link(t); + font(t):=hf; character(t):=#; + end +@d set_cur_r==begin if j= +cur_l:=qi(hu[j]); cur_q:=t; +if j=0 then + begin ligature_present:=init_lig; p:=init_list; + if ligature_present then lft_hit:=init_lft; + while p>null do + begin append_charnode_to_t(character(p)); p:=link(p); + end; + end +else if cur_l= +if cur_l=non_char then + begin k:=bchar_label[hf]; + if k=non_address then goto done@+else q:=font_info[k].qqqq; + end +else begin q:=char_info(hf)(cur_l); + if char_tag(q)<>lig_tag then goto done; + k:=lig_kern_start(hf)(q); q:=font_info[k].qqqq; + if skip_byte(q)>stop_flag then + begin k:=lig_kern_restart(hf)(q); q:=font_info[k].qqqq; + end; + end; {now |k| is the starting address of the lig/kern program} +if cur_rh; + w:=char_kern(hf)(q); goto done; {this kern will be inserted below} + end; + if skip_byte(q)>=stop_flag then + if cur_rh=non_char then goto done + else begin cur_rh:=non_char; goto continue; + end; + k:=k+qo(skip_byte(q))+1; q:=font_info[k].qqqq; + end; +done: + +@ @d wrap_lig(#)==if ligature_present then + begin p:=new_ligature(hf,cur_l,link(cur_q)); + if lft_hit then + begin subtype(p):=2; lft_hit:=false; + end; + if # then if lig_stack=null then + begin incr(subtype(p)); rt_hit:=false; + end; + link(cur_q):=p; t:=p; ligature_present:=false; + end +@d pop_lig_stack==begin if lig_ptr(lig_stack)>null then + begin link(t):=lig_ptr(lig_stack); {this is a charnode for |hu[j+1]|} + t:=link(t); incr(j); + end; + p:=lig_stack; lig_stack:=link(p); free_node(p,small_node_size); + if lig_stack=null then set_cur_r@+else cur_r:=character(lig_stack); + end {if |lig_stack| isn't |null| we have |cur_rh=non_char|} + +@= +wrap_lig(rt_hit); +if w<>0 then + begin link(t):=new_kern(w); t:=link(t); w:=0; + end; +if lig_stack>null then + begin cur_q:=t; cur_l:=character(lig_stack); ligature_present:=true; + pop_lig_stack; goto continue; + end + +@ @= +begin if cur_l=non_char then lft_hit:=true; +if j=n then if lig_stack=null then rt_hit:=true; +check_interrupt; {allow a way out in case there's an infinite ligature loop} +case op_byte(q) of +qi(1),qi(5):begin cur_l:=rem_byte(q); {\.{=:\?}, \.{=:\?>}} + ligature_present:=true; + end; +qi(2),qi(6):begin cur_r:=rem_byte(q); {\.{\?=:}. \.{\?=:>}} + if lig_stack>null then character(lig_stack):=cur_r + else begin lig_stack:=new_lig_item(cur_r); + if j=n then bchar:=non_char + else begin p:=get_avail; lig_ptr(lig_stack):=p; + character(p):=qi(hu[j+1]); font(p):=hf; + end; + end; + end; +qi(3):begin cur_r:=rem_byte(q); {\.{\?=:\?}} + p:=lig_stack; lig_stack:=new_lig_item(cur_r); link(lig_stack):=p; + end; +qi(7),qi(11):begin wrap_lig(false); {\.{\?=:\?>}, \.{\?=:\?>>}} + cur_q:=t; cur_l:=rem_byte(q); ligature_present:=true; + end; +othercases begin cur_l:=rem_byte(q); ligature_present:=true; {\.{=:}} + if lig_stack>null then pop_lig_stack + else if j=n then goto done + else begin append_charnode_to_t(cur_r); incr(j); set_cur_r; + end; + end +endcases; +if op_byte(q)>qi(4) then if op_byte(q)<>qi(7) then goto done; +goto continue; +end +@z +@x module 912 +@!c:ASCII_code; {character temporarily replaced by a hyphen} +@y +@!c:ASCII_code; {character temporarily replaced by a hyphen} +@!c_loc:0..63; {where that character came from} +@!r_count:integer; {replacement count for discretionary} +@z +@x modules 913--918 are to be completely replaced +@y by the following code: +@ When the following code is performed, |hyf[0]| and |hyf[hn]| will be zero. + +@= +repeat l:=j; j:=reconstitute(j,hn,bchar,qi(hyf_char))+1; +if hyphen_passed=0 then + begin link(s):=link(hold_head); + while link(s)>null do s:=link(s); + if odd(hyf[j-1]) then + begin l:=j; hyphen_passed:=j-1; link(hold_head):=null; + end; + end; +if hyphen_passed>0 then + @; +until j>hn; +link(s):=q + +@ @d advance_major_tail==begin major_tail:=link(major_tail); incr(r_count); + end + +@= +begin r:=get_node(small_node_size); +link(r):=link(hold_head); type(r):=disc_node; +major_tail:=r; r_count:=0; +while link(major_tail)>null do advance_major_tail; +i:=hyphen_passed; +@; +@; +@; +end + +@ The new hyphen might combine with the previous character via ligature +or kern. At this point we have |l-1<=i<=j| and |i= +minor_tail:=null; pre_break(r):=null; hyf_node:=new_character(hf,hyf_char); +if hyf_node<>null then + begin incr(i); c:=hu[i]; hu[i]:=hyf_char; free_avail(hyf_node); + end; +while l<=i do + begin l:=reconstitute(l,i,font_bchar[hf],non_char)+1; + if link(hold_head)>null then + begin if minor_tail=null then pre_break(r):=link(hold_head) + else link(minor_tail):=link(hold_head); + minor_tail:=link(hold_head); + while link(minor_tail)>null do minor_tail:=link(minor_tail); + end; + end; +if hyf_node<>null then + begin hu[i]:=c; {restore the character in the hyphen position} + l:=i; decr(i); + end + +@ The synchronization algorithm begins with |l=i+1<=j|. + +@= +minor_tail:=null; post_break(r):=null; c_loc:=0; +if bchar_label[hf]0 then + begin hu[c_loc]:=c; c_loc:=0; + end; + if link(hold_head)>null then + begin if minor_tail=null then post_break(r):=link(hold_head) + else link(minor_tail):=link(hold_head); + minor_tail:=link(hold_head); + while link(minor_tail)>null do minor_tail:=link(minor_tail); + end; + until l>=j; + while l>j do + @; + end + +@ @= +begin j:=reconstitute(j,hn,bchar,non_char)+1; +link(major_tail):=link(hold_head); +while link(major_tail)>null do advance_major_tail; +end + +@ Ligature insertion can cause a word to grow exponentially in size. Therefore +we must test the size of |r_count| here, even though the hyphenated text +was at most 63 characters long. + +@= +if r_count>127 then {we have to forget the discretionary hyphen} + begin link(s):=link(r); link(r):=null; flush_node_list(r); + end +else begin link(s):=r; replace_count(r):=r_count; + end; +s:=major_tail +@z +@x module 1030 +@d main_loop=70 {go here to typeset |cur_chr| in the current font} +@d main_loop_1=71 {like |main_loop|, but |(f,c)| = current font and char} +@d main_loop_2=72 {like |main_loop_1|, but |c| is known to be in range} +@d main_loop_3=73 {like |main_loop_2|, but several variables are set up} +@d append_normal_space=74 {go here to append a normal space between words} +@y +@d main_loop=70 {go here to typeset a string of consecutive characters} +@d main_loop_wrapup=80 {go here to finish a character or ligature} +@d main_loop_move=90 {go here to advance the ligature cursor} +@d main_loop_move_lig=95 {same, when advancing past a generated ligature} +@d main_loop_lookahead=100 {go here to bring in another character, if any} +@d main_lig_loop=110 {go here to check for ligatures or kerning} +@d append_normal_space=120 {go here to append a normal space between words} +@z +@x ibid +label big_switch,reswitch,main_loop,main_loop_1,main_loop_2,main_loop_3, +@y +label big_switch,reswitch,main_loop,main_loop_wrapup, + main_loop_move,main_loop_move+1,main_loop_move+2,main_loop_move_lig, + main_loop_lookahead,main_loop_lookahead+1, + main_lig_loop,main_lig_loop+1,main_lig_loop+2, +@z +@x ibid +@@; +@y +@z +@x ibid +hmode+char_num: begin scan_char_num; cur_chr:=cur_val; goto main_loop; + end; +@y +hmode+char_num: begin scan_char_num; cur_chr:=cur_val; goto main_loop;@+end; +hmode+no_boundary: begin get_x_token; + if (cur_cmd=letter)or(cur_cmd=other_char)or(cur_cmd=char_given)or + (cur_cmd=char_num) then cancel_boundary:=true; + goto reswitch; + end; +@z +@x modules 1032--1040 are all to be replaced +@y by the following code: +@ The following part of the program was first written in a structured +manner, according to the philosophy that ``premature optimization is +the root of all evil.'' Then it was rearranged into pieces of +spaghetti so that the most common actions could proceed with little or +no redundancy. + +The original unoptimized form of this algorithm resembles the +|reconstitute| procedure, which was described earlier in connection with +hyphenation. Again we have an implied ``cursor`` between characters +|cur_l| and |cur_r|. The main difference is that the |lig_stack| can now +contain a charnode as well as pseudo-ligatures; that stack is now +usually nonempty, because the next character of input (if any) has been +appended to it. In |main_control| we have +$$|cur_r|=\cases{|character(lig_stack)|,&if |lig_stack>null|;\cr + |font_bchar[cur_font]|,&otherwise.\cr}$$ +Several additional global variables are needed. + +@= +@!main_f:internal_font_number; {the current font} +@!main_i:four_quarters; {character information bytes for |cur_l|} +@!main_j:four_quarters; {ligature/kern command} +@!main_k:font_index; {index into |font_info|} +@!main_p:pointer; {temporary register for list manipulation} +@!main_s:integer; {space factor value} +@!bchar:halfword; {right boundary character of current font, or |non_char|} +@!false_bchar:halfword; {nonexistent character matching |bchar|, or |non_char|} +@!cancel_boundary:boolean; {should the left boundary be ignored?} +@!ins_disc:boolean; {should we insert a discretionary node?} + +@ The boolean variables of the main loop are normally false, and always reset +to false before the loop is left. That saves us the extra work of initializing +each time. + +@= +ligature_present:=false; cancel_boundary:=false; lft_hit:=false; rt_hit:=false; +ins_disc:=false; + +@ We leave |space_factor| unchanged if |sf_code(cur_chr)=0|; otherwise we +set it to |sf_code(cur_chr)|, except that the space factor never changes +from a value less than 1000 to a value exceeding 1000. The most common +case is |sf_code(cur_chr)=1000|, so we want that case to be fast. + +The overall structure of the main loop is presented here. Some program labels +are inside the individual sections. + +@d adjust_space_factor==@t@>@;@/ + main_s:=sf_code(cur_chr); + if main_s=1000 then space_factor:=1000 + else if main_s<1000 then + begin if main_s>0 then space_factor:=main_s; + end + else if space_factor<1000 then space_factor:=1000 + else space_factor:=main_s + +@= +adjust_space_factor;@/ +main_f:=cur_font; +bchar:=font_bchar[main_f]; false_bchar:=font_false_bchar[main_f]; +if mode>0 then if language<>clang then fix_language; +fast_get_avail(lig_stack); font(lig_stack):=main_f; cur_l:=qi(cur_chr); +character(lig_stack):=cur_l;@/ +cur_q:=tail; +if cancel_boundary then + begin cancel_boundary:=false; main_k:=non_address; + end +else main_k:=bchar_label[main_f]; +if main_k=non_address then goto main_loop_move+2; {no left boundary processing} +cur_r:=cur_l; cur_l:=non_char; +goto main_lig_loop+1; {begin with cursor after left boundary} +@# +main_loop_wrapup:@; +main_loop_move:@; +main_loop_lookahead:@; +main_lig_loop:@; +main_loop_move_lig:@ + +@ If the current horizontal list is empty, the reference to |character(tail)| +here is not strictly legal, since |tail| will be a node freshly returned by +|get_avail|. But this should cause no problem on most implementations, and we +do want the inner loop to be fast. +@^dirty Pascal@> + +A discretionary break is not inserted for an explicit hyphen when we are in +restricted horizontal mode. In particular, this avoids putting discretionary +nodes inside of other discretionaries. + +@d pack_lig(#)== {the parameter is either |rt_hit| or |false|} + begin main_p:=new_ligature(main_f,cur_l,link(cur_q)); + if lft_hit then + begin subtype(main_p):=2; lft_hit:=false; + end; + if # then if lig_stack=null then + begin incr(subtype(main_p)); rt_hit:=false; + end; + link(cur_q):=main_p; tail:=main_p; ligature_present:=false; + end + +@d wrapup(#)==if cur_lnull then + ins_disc:=true; + if ligature_present then pack_lig(#); + if ins_disc then + begin ins_disc:=false; + if mode>0 then tail_append(new_disc); + end; + end + +@= +wrapup(rt_hit) + +@ @= +if lig_stack=null then goto reswitch; +cur_q:=tail; cur_l:=cur_r; {or |character(lig_stack)|} +main_loop_move+1:if not is_char_node(lig_stack) then goto main_loop_move_lig; +main_loop_move+2:if(cur_chrfont_ec[main_f]) then + begin char_warning(main_f,cur_chr); free_avail(lig_stack); goto big_switch; + end; +main_i:=char_info(main_f)(cur_l); +if not char_exists(main_i) then + begin char_warning(main_f,cur_chr); free_avail(lig_stack); goto big_switch; + end; +tail_append(lig_stack) {|main_loop_lookahead| is next} + +@ Here we are at |main_loop_move_lig|. +When we begin this code we have |cur_l=character(lig_stack)| and |cur_q=tail|. + +@= +main_p:=lig_ptr(lig_stack); +if main_p>null then tail_append(main_p); +temp_ptr:=lig_stack; lig_stack:=link(temp_ptr); +free_node(temp_ptr,small_node_size); +main_i:=char_info(main_f)(cur_l); ligature_present:=true; +if lig_stack=null then + if main_p>null then goto main_loop_lookahead + else cur_r:=bchar +else cur_r:=character(lig_stack); +goto main_lig_loop + +@ The result of \.{\\char} can participate in a ligature or kern, so we must +look ahead for it. + +@= +get_next; {set only |cur_cmd| and |cur_chr|, for speed} +if cur_cmd=letter then goto main_loop_lookahead+1; +if cur_cmd=other_char then goto main_loop_lookahead+1; +if cur_cmd=char_given then goto main_loop_lookahead+1; +x_token; {now expand and set |cur_cmd|, |cur_chr|, |cur_tok|} +if cur_cmd=letter then goto main_loop_lookahead+1; +if cur_cmd=other_char then goto main_loop_lookahead+1; +if cur_cmd=char_given then goto main_loop_lookahead+1; +if cur_cmd=char_num then + begin scan_char_num; cur_chr:=cur_val; goto main_loop_lookahead+1; + end; +if cur_cmd=no_boundary then bchar:=non_char; +cur_r:=bchar; lig_stack:=null; goto main_lig_loop; +main_loop_lookahead+1: adjust_space_factor; +fast_get_avail(lig_stack); font(lig_stack):=main_f; +cur_r:=qi(cur_chr); character(lig_stack):=cur_r; +if cur_r=false_bchar then cur_r:=non_char {this prevents spurious ligatures} + +@ Even though comparatively few characters have a lig/kern program, several +of the instructions here count as part of \TeX's inner loop, since a +potentially long sequential search must be performed. For example, tests with +Computer Modern Roman showed that about 40 per cent of all characters +actually encountered in practice had a lig/kern program, and that about four +lig/kern commands were investigated for every such character. + +At the beginning of this code we have |main_i=char_info(main_f)(cur_l)|. + +@= +if char_tag(main_i)<>lig_tag then goto main_loop_wrapup; +main_k:=lig_kern_start(main_f)(main_i); main_j:=font_info[main_k].qqqq; +if skip_byte(main_j)<=stop_flag then goto main_lig_loop+2; +main_k:=lig_kern_restart(main_f)(main_j); +main_lig_loop+1:main_j:=font_info[main_k].qqqq; +main_lig_loop+2:if next_char(main_j)=cur_r then + if skip_byte(main_j)<=stop_flag then + @; +if skip_byte(main_j)=qi(0) then incr(main_k) +else begin if skip_byte(main_j)>=stop_flag then goto main_loop_wrapup; + main_k:=main_k+qo(skip_byte(main_j))+1; + end; +goto main_lig_loop+1 + +@ When a ligature or kern instruction matches a character, we know from +|read_font_info| that the character exists in the font, even though we +haven't verified its existence in the normal way. + +This section could be made into a subroutine, if the code inside +|main_control| needs to be shortened. + +\chardef\?='174 % vertical line to indicate character retention + +@= +begin if op_byte(main_j)>=kern_flag then + begin wrapup(rt_hit); + tail_append(new_kern(char_kern(main_f)(main_j))); goto main_loop_move; + end; +if cur_l=non_char then lft_hit:=true +else if lig_stack=null then rt_hit:=true; +check_interrupt; {allow a way out in case there's an infinite ligature loop} +case op_byte(main_j) of +qi(1),qi(5):begin cur_l:=rem_byte(main_j); {\.{=:\?}, \.{=:\?>}} + main_i:=char_info(main_f)(cur_l); ligature_present:=true; + end; +qi(2),qi(6):begin cur_r:=rem_byte(main_j); {\.{\?=:}, \.{\?=:>}} + if lig_stack=null then {right boundary character is being consumed} + begin lig_stack:=new_lig_item(cur_r); bchar:=non_char; + end + else if is_char_node(lig_stack) then {|link(lig_stack)=null|} + begin main_p:=lig_stack; lig_stack:=new_lig_item(cur_r); + lig_ptr(lig_stack):=main_p; + end + else character(lig_stack):=cur_r; + end; +qi(3):begin cur_r:=rem_byte(main_j); {\.{\?=:\?}} + main_p:=lig_stack; lig_stack:=new_lig_item(cur_r); + link(lig_stack):=main_p; + end; +qi(7),qi(11):begin wrapup(false); {\.{\?=:\?>}, \.{\?=:\?>>}} + cur_q:=tail; cur_l:=rem_byte(main_j); + main_i:=char_info(main_f)(cur_l); ligature_present:=true; + end; +othercases begin cur_l:=rem_byte(main_j); ligature_present:=true; {\.{=:}} + if lig_stack=null then goto main_loop_wrapup + else goto main_loop_move+1; + end +endcases; +if op_byte(main_j)>qi(4) then + if op_byte(main_j)<>qi(7) then goto main_loop_wrapup; +if cur_l a function that returns one of +% four values; you goto a label based on the value returned. +@x module 1042 +begin p:=font_glue[cur_font]; +if p=null then + begin f:=cur_font; p:=new_spec(zero_glue); k:=param_base[f]+space_code; + width(p):=font_info[k].sc; {that's |space(f)|} + stretch(p):=font_info[k+1].sc; {and |space_stretch(f)|} + shrink(p):=font_info[k+2].sc; {and |space_shrink(f)|} + font_glue[f]:=p; +@y +begin main_p:=font_glue[cur_font]; +if main_p=null then + begin main_p:=new_spec(zero_glue); main_k:=param_base[cur_font]+space_code; + width(main_p):=font_info[main_k].sc; {that's |space(cur_font)|} + stretch(main_p):=font_info[main_k+1].sc; {and |space_stretch(cur_font)|} + shrink(main_p):=font_info[main_k+2].sc; {and |space_shrink(cur_font)|} + font_glue[cur_font]:=main_p; +@z +@x module 1045 +any_mode(relax),vmode+spacer,mmode+spacer,mmode+no_boundary:do_nothing; +@y +any_mode(relax),vmode+spacer,mmode+spacer:do_nothing; +@z +@x module 1090 + vmode+ex_space:@t@>@;@/ +@y + vmode+ex_space,vmode+no_boundary:@t@>@;@/ +@z +@x module 1322 +dump_int(font_glue[k]);@/ +@y +dump_int(font_glue[k]);@/ +dump_int(bchar_label[k]); +dump_int(font_bchar[k]); +dump_int(font_false_bchar[k]);@/ +@z +@x module 1323 +undump(min_halfword)(lo_mem_max)(font_glue[k]);@/ +@y +undump(min_halfword)(lo_mem_max)(font_glue[k]);@/ +undump(0)(font_mem_size)(bchar_label[k]); +undump(min_quarterword)(non_char)(font_bchar[k]); +undump(min_quarterword)(non_char)(font_false_bchar[k]); +@z + +363. New \inputlineno feature desired by Spivak +@x module 416 gets a new definition and a new statement +@y +@d input_line_no_code=glue_val+1 {code for \.{\\inputlineno}} +primitive("inputlineno",last_item,input_line_no_code); +@!@:input_line_no_}{\.{\\inputlineno} primitive@> +@z and module 417 changes in the obvious way +@x module 424 gets new code at the beginning +@y +if cur_chr>glue_val then + begin cur_val:=line; cur_val_level:=int_val; + end +else +@z + +364. New feature \holdinginserts suggested by Mittelbach. +@x modules 236--238 get a new integer parameter +@d int_pars=53 {total number of integer parameters} +@y +@d holding_inserts_code=53 {do not remove insertion nodes from \.{\\box255}} +@d int_pars=54 {total number of integer parameters} +@z and appropriate further lines are added to match all the other parameters +@x module 1014 +@; +q:=hold_head; link(q):=null; prev_p:=page_head; p:=link(prev_p); +while p<>best_page_break do + begin if type(p)=ins_node then @ +@y +if holding_inserts<=0 then + @; +q:=hold_head; link(q):=null; prev_p:=page_head; p:=link(prev_p); +while p<>best_page_break do + begin if type(p)=ins_node then + begin if holding_inserts<=0 then + @; + end +@z +% also insert begin...end around the Pascal code of module 1018 + +365. New \badness feature (which I'd been resisting for years) +@x module 416 gets a new definition and a new statement +@y +@d badness_code=glue_val+2 {code for \.{\\badness}} +primitive("badness",last_item,badness_code); +@!@:badness_}{\.{\\badness} primitive@> +@z and module 417 changes in the obvious way +@x module 424 (the new code just added in #363) + begin cur_val:=line; cur_val_level:=int_val; +@y + begin if cur_chr=input_line_no_code then cur_val:=line + else cur_val:=last_badness; {|cur_chr=badness_code|} + cur_val_level:=int_val; +@z +@x module 646 gets a new global variable +@y +@!last_badness:integer; {badness of the most recently packaged box} +@z +@x module 648 +@ @=adjust_tail:=null; +@y +@ @=adjust_tail:=null; last_badness:=0; +@z +@x modules 649 and 668 +@!b:integer; {badness of the new box} +begin r:=get_node(box_node_size); type(r):=hlist_node; +@y (except it's vlist_node in 668) +begin last_badness:=0; r:=get_node(box_node_size); type(r):=hlist_node; +@z (except it's vlist_node in 668) +% change b to last_badness in modules 660&674 (4 times), 667&678 (3 times) +@x modules 658 and 673 +if (hbadnessnull) then +@y (except it's vbadness in 673) +if o=normal then if list_ptr(r)<>null then +@z +@x modules 664 and 676 + begin set_glue_ratio_one(glue_set(r)); {this is the maximum shrinkage} +@y + begin last_badness:=1000000; + set_glue_ratio_one(glue_set(r)); {use the maximum shrinkage} +@z +@x ibid +else if (hbadness<100)and(o=normal)and(list_ptr(r)<>null) then +@y (except it's vbadness in 676) +else if o=normal then if list_ptr(r)<>null then +@z + +366. New \emergencystretch feature +@x modules 247--248 get a new dimen parameter +@d dimen_pars=20 {total number of dimension parameters} +@y +@d emergency_stretch_code=20 {reduces badnesses on final pass of line-breaking} +@d dimen_pars=21 {total number of dimension parameters} +@z and appropriate further lines are added to match all the other parameters +@x module 828 +@!second_pass:boolean; {is this our second attempt to break this paragraph?} +@y +@!second_pass:boolean; {is this our second attempt to break this paragraph?} +@!final_pass:boolean; {is this our final attempt to break this paragraph?} +@z +% change second_pass to final_pass in modules 854 and 873 +@x module 863 + second_pass:=false; + end +else begin threshold:=tolerance; second_pass:=true; +@y + second_pass:=false; final_pass:=false; + end +else begin threshold:=tolerance; second_pass:=true; + final_pass:=(emergency_stretch<=0); +@z +@x ibid + @!stat if tracing_paragraphs>0 then print_nl("@@secondpass");@;@+tats@/ + threshold:=tolerance; second_pass:=true; {if at first you don't + succeed, \dots} +@y + if not second_pass then + begin@!stat if tracing_paragraphs>0 then print_nl("@@secondpass");@;@+tats@/ + threshold:=tolerance; second_pass:=true; final_pass:=(emergency_stretch<=0); + end {if at first you don't succeed, \dots} + else begin @!stat if tracing_paragraphs>0 then + print_nl("@@finalpass");@;@+tats@/ + background[2]:=background[2]+emergency_stretch; final_pass:=true; + end; +@z + +367. New \errorcontextlines feature suggested by a TUG participant +@x modules 236--238 get a new integer parameter +@d int_pars=54 {total number of integer parameters} +@y +@d error_context_lines_code=54 {maximum intermediate line pairs shown} +@d int_pars=55 {total number of integer parameters} +@z and appropriate further lines are added to match all the other parameters +@x module 311 +@@/ +begin base_ptr:=input_ptr; input_stack[base_ptr]:=cur_input; + {store current state} +loop@+begin cur_input:=input_stack[base_ptr]; {enter into the context} + @; + if (state<>token_list) then + if (name>17) or (base_ptr=0) then goto done; +@y +@!nn:integer; {number of contexts shown so far, less one} +@!bottom_line:boolean; {have we reached the final context to be shown?} +@@/ +begin base_ptr:=input_ptr; input_stack[base_ptr]:=cur_input; + {store current state} +nn:=-1; bottom_line:=false; +loop@+begin cur_input:=input_stack[base_ptr]; {enter into the context} + if (state<>token_list) then + if (name>17) or (base_ptr=0) then bottom_line:=true; + if (base_ptr=input_ptr)or bottom_line or(nn + else if nn=error_context_lines then + begin print_nl("..."); incr(nn); {omitted if |error_context_lines<0|} + end; + if bottom_line then goto done; +@z +% also insert begin...end around the Pascal code of module 312 +% and add the statement "incr(nn)" to that module + +368. char_warning inside hyphenation could clobber old_setting +@x module 863 +done: @!stat if tracing_paragraphs>0 then end_diagnostic(true);@;@+tats@/ +@y +done: @!stat if tracing_paragraphs>0 then + begin end_diagnostic(true); normalize_selector; + end;@+tats@/ +@z + +369. Make ".fmt" more easily switchable (Don Hosek). +@x module 520 gets a new definition +@y +@d format_extension=".fmt" {the extension, as a \.{WEB} constant} +@z now replace ".fmt" by format_extension in modules 529 and 1328. + +370. Possible range check on weird nullfont (Breitenlohner, 16 Oct 89). +@x module 565 +if (bc>ec+1)or(ec>255) then abort; +@y +if (bc>ec+1)or(ec>255) then abort; +if bc>255 then {|bc=256| and |ec=255|} + begin bc:=1; ec:=0; + end; +@z + +371. Prevent save_stack conflicts, e.g. in {\hbox\expandafter{\csname + \endcsname}} (found by Sullivan). +@x module 645 +@p procedure scan_spec; {scans a box specification and left brace} +label found; +begin if scan_keyword("to") then saved(0):=exactly +@.to@> +else if scan_keyword("spread") then saved(0):=additional +@.spread@> +else begin saved(0):=additional; saved(1):=0; + goto found; + end; +scan_normal_dimen; saved(1):=cur_val; +found: save_ptr:=save_ptr+2; scan_left_brace; +@y +@p procedure scan_spec(@!c:group_code;@!three_codes:boolean); + {scans a box specification and left brace} +label found; +var @!s:integer; {temporarily saved value} +@!spec_code:exactly..additional; +begin if three_codes then s:=saved(0); +if scan_keyword("to") then spec_code:=exactly +@.to@> +else if scan_keyword("spread") then spec_code:=additional +@.spread@> +else begin spec_code:=additional; cur_val:=0; + goto found; + end; +scan_normal_dimen; +found: if three_codes then + begin saved(0):=s; incr(save_ptr); + end; +saved(0):=spec_code; saved(1):=cur_val; save_ptr:=save_ptr+2; +new_save_level(c); scan_left_brace; +@z +@x module 774 +scan_spec; new_save_level(align_group);@/ +@y +scan_spec(align_group,false);@/ +@z +@x module 1073 + if t=0 then saved(0):=cur_val@+else saved(0):=-cur_val; + scan_box; + end; +any_mode(leader_ship): begin saved(0):=leader_flag-a_leaders+cur_chr; scan_box; + end; +any_mode(make_box): begin saved(0):=0; begin_box; + end; +@y + if t=0 then scan_box(cur_val)@+else scan_box(-cur_val); + end; +any_mode(leader_ship): scan_box(leader_flag-a_leaders+cur_chr); +any_mode(make_box): begin_box(0); +@z +@x module 1075 +procedure box_end; +var p:pointer; {|ord_noad| for new box in math mode} +begin if saved(0) +else if saved(0) +else if cur_box<>null then + if saved(0)>ship_out_flag then @ +@y +procedure box_end(@!box_context:integer); +var p:pointer; {|ord_noad| for new box in math mode} +begin if box_context +else if box_context +else if cur_box<>null then + if box_context>ship_out_flag then @ +@z +@x module 1076 + begin shift_amount(cur_box):=saved(0); +@y + begin shift_amount(cur_box):=box_context; +@z +@x module 1077 +if saved(0); +if cur_cmd=make_box then begin_box +else if (saved(0)>=leader_flag)and((cur_cmd=hrule)or(cur_cmd=vrule)) then + begin cur_box:=scan_rule_spec; box_end; +@y +procedure scan_box(@!box_context:integer); + {the next input should specify a box or perhaps a rule} +begin @; +if cur_cmd=make_box then begin_box(box_context) +else if (box_context>=leader_flag)and((cur_cmd=hrule)or(cur_cmd=vrule)) then + begin cur_box:=scan_rule_spec; box_end(box_context); +@z +@x module 1086 +pop_nest; box_end; +@y +pop_nest; box_end(saved(0)); +@z +@x module 1117 +else begin incr(save_ptr); saved(-1):=0; scan_left_brace; + new_save_level(disc_group); push_nest; mode:=-hmode; space_factor:=1000; +@y +else begin incr(save_ptr); saved(-1):=0; new_save_level(disc_group); + scan_left_brace; push_nest; mode:=-hmode; space_factor:=1000; +@z +@x module 1119 +incr(saved(-1)); scan_left_brace; new_save_level(disc_group); +@y +incr(saved(-1)); new_save_level(disc_group); scan_left_brace; +@z +@x module 1167 +mmode+vcenter: begin scan_spec; new_save_level(vcenter_group); normal_paragraph; +@y +mmode+vcenter: begin scan_spec(vcenter_group,false); normal_paragraph; +@z +@x module 1172 +scan_left_brace; push_math(math_choice_group); +@y +push_math(math_choice_group); scan_left_brace; +@z +@x module 1174 +incr(saved(-1)); scan_left_brace; push_math(math_choice_group); +@y +incr(saved(-1)); push_math(math_choice_group); scan_left_brace; +@z +@x module 1241 + if global then saved(0):=box_flag+256+cur_val + else saved(0):=box_flag+cur_val; + scan_optional_equals; scan_box; +@y + if global then n:=256+cur_val@+else n:=cur_val; + scan_optional_equals; scan_box(box_flag+n); +@z + +372. Bugfix 339 didn't go far enough (found by Sch\"opf and Mittelbach). +@x module 516 [NOTE: THIS AFFECTS ALMOST ALL CHANGE FILES!] +@ And here's the second. +@^system dependencies@> + +@p function more_name(@!c:ASCII_code):boolean; +begin if c=" " then more_name:=false +else begin if (c=">")or(c=":") then + begin area_delimiter:=pool_ptr; ext_delimiter:=0; + end + else if (c=".")and(ext_delimiter=0) then ext_delimiter:=pool_ptr; + str_room(1); append_char(c); {contribute |c| to the current string} +@y +@ And here's the second. The string pool might change as the file name is +being scanned, since a new \.{\\csname} might be entered; therefore we keep +|area_delimiter| and |ext_delimiter| relative to the beginning of the current +string, instead of assigning an absolute address like |pool_ptr| to them. +@^system dependencies@> + +@p function more_name(@!c:ASCII_code):boolean; +begin if c=" " then more_name:=false +else begin str_room(1); append_char(c); {contribute |c| to the current string} + if (c=">")or(c=":") then + begin area_delimiter:=cur_length; ext_delimiter:=0; + end + else if (c=".")and(ext_delimiter=0) then ext_delimiter:=cur_length; +@z +@x module 517 [NOTE: THIS DOES TOO, AND SO DOES THE NEXT!] +else begin cur_area:=str_ptr; incr(str_ptr); + str_start[str_ptr]:=area_delimiter+1; +@y +else begin cur_area:=str_ptr; + str_start[str_ptr+1]:=str_start[str_ptr]+area_delimiter; incr(str_ptr); +@z +@x ibid +else begin cur_name:=str_ptr; incr(str_ptr); + str_start[str_ptr]:=ext_delimiter; cur_ext:=make_string; +@y +else begin cur_name:=str_ptr; + str_start[str_ptr+1]:=str_start[str_ptr]+ext_delimiter-area_delimiter-1; + incr(str_ptr); cur_ext:=make_string; +@z + +373. Allow multiple hyphenmins in the same paragraph (Mike Ferguson). +@x module 212, two new fields for list_state_record +@y + @!lhm_field,@!rhm_field: quarterword; +@z +@x module 213, two new macros to access those fields +@y +@d lhmin==cur_list.lhm_field {\.{\\lefthyphenmin} at start of paragraph} +@d rhmin==cur_list.rhm_field {\.{\\righthyphenmin} at start of paragraph} +@z +@x module 215, two new initializations +@y +lhmin:=0; rhmin:=0; +@z +@x module 218 + if nest[p].ml_field<0 then print(" (\output routine)"); +@y + if m=hmode then@+if(nest[p].lhm_field<>2)or(nest[p].rhm_field<>3)then + begin print(" (hyphenmin "); print_int(nest[p].lhm_field); print_char(","); + print_int(nest[p].rhm_field); print_char(")"); + end; + if nest[p].ml_field<0 then print(" (\output routine)"); +@z +@x module 891 +l_hyf:=left_hyphen_min-1;@+if l_hyf<0 then l_hyf:=0; +r_hyf:=right_hyphen_min-1;@+if r_hyf<0 then r_hyf:=0; +min_hyf:=l_hyf+r_hyf+2; cur_lang:=0; +@y +l_hyf:=lhmin; r_hyf:=rhmin; cur_lang:=0; +@z +@x module 892 +@!l_hyf,@!r_hyf,@!min_hyf:integer; {limits on fragment sizes} +@y +@!l_hyf,@!r_hyf:integer; {limits on fragment sizes} +@z +@x module 894 +begin if min_hyf>63 then goto done1; +prev_s:=cur_p; s:=link(prev_s); +if s<>null then + begin @; + @; + @; +@y +begin prev_s:=cur_p; s:=link(prev_s); +if s<>null then + begin @; + if l_hyf+r_hyf>63 then goto done1; + @; + @; +@z +@x module 899 +if hn=63 then norm_min:=63@+ +else norm_min:=h; +end; +@z +@x module 1091 then uses the new subroutine +push_nest; mode:=hmode; space_factor:=1000; clang:=0; +@y +lhmin:=norm_min(left_hyphen_min); rhmin:=norm_min(right_hyphen_min); +push_nest; mode:=hmode; space_factor:=1000; clang:=0; +@z +@x module 1341 +@d stored_language(#)==mem[#+1].int {language number, in the range |0..255|} +@y +@d what_lang(#)==link(#+1) {language number, in the range |0..255|} +@d what_lhm(#)==type(#+1) {minimum left fragment, in the range |1..63|} +@d what_rhm(#)==subtype(#+1) {minimum right fragment, in the range |1..63|} +@z +@x module 1356 + print_int(stored_language(p)); +@y + print_int(what_lang(p)); print(" (hyphenmin "); + print_int(what_lhm(p)); print_char(","); + print_int(what_rhm(p)); print_char(")"); +@z +@x modules 1362 and 1363 +@ @= +if subtype(cur_p)=language_node then cur_lang:=stored_language(cur_p) + +@ @= +if subtype(s)=language_node then cur_lang:=stored_language(s) +@y +@ @d adv_past(#)==@+if subtype(#)=language_node then + begin cur_lang:=what_lang(#); l_hyf:=what_lhm(#); r_hyf:=what_rhm(#);@+end + +@=@+ +adv_past(cur_p) + +@ @=@+ +adv_past(s) +@z +@x module 1376 + stored_language(tail):=l; clang:=l; +@y + what_lang(tail):=l; clang:=l;@/ + what_lhm(tail):=norm_min(left_hyphen_min); + what_rhm(tail):=norm_min(right_hyphen_min); +@z +@x module 1377 + stored_language(tail):=clang; +@y + what_lang(tail):=clang; + what_lhm(tail):=norm_min(left_hyphen_min); + what_rhm(tail):=norm_min(right_hyphen_min); +@z + +374. Make \par and end_template definitely non-character (Marc van Leeuwen) +@x module 14 gets a new line +@y +if mem_top<256+11 then bad:=7; {we will want |null_list>255|} +@z +@x module 334 +primitive("par",par_end,0); par_loc:=cur_val; par_token:=cs_token_flag+par_loc; +@y +primitive("par",par_end,256); {cf. |scan_file_name|} +par_loc:=cur_val; par_token:=cs_token_flag+par_loc; +@z + +375. Alignments must be more robust to prevent crashes (Marc van Leeuwen) +@x module 324 +else if token_type=u_template then align_state:=0; +@y +else if token_type=u_template then + if align_state>500000 then align_state:=0 + else fatal_error("(interwoven alignment preambles are not allowed)"); +@.interwoven alignment preambles...@> +@z +@x module 782 +if (cur_cmd=assign_glue)and(cur_chr=glue_base+tab_skip_code) then +@y +if cur_cmd=endv then + fatal_error("(interwoven alignment preambles are not allowed)"); +@.interwoven alignment preambles...@> +if (cur_cmd=assign_glue)and(cur_chr=glue_base+tab_skip_code) then +@z +@x module 791 +p:=link(q); +@y +if align_state<500000 then + fatal_error("(interwoven alignment preambles are not allowed)"); +@.interwoven alignment preambles...@> +p:=link(q); +@z + +376. Avoid kern removal in discretionary breaks (Marc van Leeuwen) +@x module 815 +label done,done1,done2,done3,done4,continue; +@y +label done,done1,done2,done3,done4,done5,continue; +@z +@x module 866 +glue_node: begin @; + @; +@y +glue_node: begin @; +@z +@x ibid +disc_node: @; +@y +disc_node: @; +@z +@x ibid +end +@y +done5:end +@z +Combine modules 868 and 869 into a single module, with a semicolon between. +@x module 870 (which becomes module 869) gets ... in its title +@y and the following new code just before its final "end": +r:=replace_count(cur_p); s:=link(cur_p); +while r>0 do + begin @; + decr(r); s:=link(s); + end; +prev_p:=cur_p; cur_p:=s; goto done5; +@z +@x Now module 871 becomes 870, and we add a new (very similar) module 871: +@y +@ @= +if is_char_node(s) then + begin f:=font(s); + act_width:=act_width+char_width(f)(char_info(f)(character(s))); + end +else case type(s) of + ligature_node: begin f:=font(lig_char(s)); + act_width:=act_width+ + char_width(f)(char_info(f)(character(lig_char(s)))); + end; + hlist_node,vlist_node,rule_node,kern_node: + act_width:=act_width+width(s); + othercases confusion("disc4") +@:this can't happen disc4}{\quad disc4@> + endcases +@z +@x module 877 +@!disc_break:boolean; {was the current break at a discretionary node?} +@y +@!disc_break:boolean; {was the current break at a discretionary node?} +@!post_disc_break:boolean; {and did it have a nonempty post-break part?} +@z +@x ibid +if cur_p<>null then @; +@y +if cur_p<>null then if not post_disc_break then + @; +@z +@x module 881 +q:=cur_break(cur_p); disc_break:=false; +@y +q:=cur_break(cur_p); disc_break:=false; post_disc_break:=false; +@z +@x module 883 + if not is_char_node(s) then if next_break(cur_p)<>null then + if cur_break(next_break(cur_p))=s then s:=r; +@y that subtle bug is no longer possible so we can remove the code +@z +@x module 884 +link(s):=r; r:=post_break(q); post_break(q):=null; +@y +link(s):=r; r:=post_break(q); post_break(q):=null; post_disc_break:=true; +@z + +377. Pick up a few discretionary hyphens that were lost because of +the new (cautious) algorithm. +@x module 914 +@ @d advance_major_tail==begin major_tail:=link(major_tail); incr(r_count); + end + +@= +begin r:=get_node(small_node_size); +@y +@ In this repeat loop we will insert another discretionary if |hyf[j-1]| is +odd, after both branches of the previous discretionary end at position |j-1|. +Strictly speaking, we aren't justified in doing this, because we don't know +that a hyphen after |j-1| is truly independent of those branches. But in almost +all applications we would rather not lose a potentially valuable hyphenation +point. (Consider the word `difficult', where the letter `c' is in position |j|.) + +@d advance_major_tail==begin major_tail:=link(major_tail); incr(r_count); + end + +@= +repeat r:=get_node(small_node_size); +@z +@x ibid +i:=hyphen_passed; +@y +i:=hyphen_passed; hyf[i]:=0; +@z +@x ibid +end +@y +hyphen_passed:=j-1; link(hold_head):=null; +until not odd(hyf[j-1]) +@z + +378. Undumped trie must also be dumpable again (Breitenlohner, 11 Dec 89) +@x module 1325 +undump_size(0)(trie_size)('trie size')(j); {|trie_max|} +for k:=0 to j do undump_hh(trie[k]); +undump_size(0)(trie_op_size)('trie op size')(j); {|trie_op_ptr|} +@y +undump_size(0)(trie_size)('trie size')(j); @+init trie_max:=j;@+tini +for k:=0 to j do undump_hh(trie[k]); +undump_size(0)(trie_op_size)('trie op size')(j); @+init trie_op_ptr:=j;@+tini +@z +@x ibid +k:=256; +while j>0 do + begin undump(0)(k-1)(k); undump(1)(j)(x); j:=j-x; op_start[k]:=qo(j); +@y +init for k:=0 to 255 do trie_used[k]:=min_quarterword;@+tini +k:=256; +while j>0 do + begin undump(0)(k-1)(k); undump(1)(j)(x);@+init trie_used[k]:=qi(x);@+tini + j:=j-x; op_start[k]:=qo(j); +@z + +379. Allow output routine to access page totals. (Suggested by Frank +Mittelbach and Chris Rowley, December 1989) +@x module 421 +begin if page_contents=empty then +@y +begin if (page_contents=empty) and (not output_active) then +@z + +380. Slightly more robust recovery and detection of \output anomalies. +(Suggested by Chris Thompson, provoked by George Russell, January 1990) +@x module 1026 +begin if loc<>null then @; +@y +begin if (loc<>null) or + ((token_type<>output_text)and(token_type<>backed_up)) then + @; +@z +@x module 1027 +help2("Your sneaky output routine has fewer real {'s than }'s.")@/ +@y +help2("Your sneaky output routine has problematic {'s and/or }'s.")@/ +@z + +381. \eqno\aftergroup*$$ should yield * after the $$ (Michael Downes, 29 Jan 90) +@x module 1194 + begin cur_mlist:=p; cur_style:=text_style; mlist_penalties:=false; +@y + begin @; + cur_mlist:=p; cur_style:=text_style; mlist_penalties:=false; +@z +@x ibid +else begin @; +@y +else begin if a=null then @; +@z + +382. Missed a case in the 8-bit change (Wayne Sullivan, 1 Feb 1990) +@x module 360 + begin if (end_line_char<0)or(end_line_char>127) then incr(limit); +@y + begin if end_line_char_inactive then incr(limit); +@z + +383. Linebreaking needs to be more robust when total demerits get +very high (Frank Mittelbach, 22 Feb 1990) +@x module 830 +@!artificial_badness:boolean; {has |b| been forced to zero?} +@y +@!artificial_demerits:boolean; {has |d| been forced to zero?} +@z +@x module 833 (this change is cosmetic only) +@!minimal_demerits:array[very_loose_fit..tight_fit] of scaled; {best total + demerits known for current line class and position, given the fitness} +@!minimum_demerits:scaled; {best total demerits known for current line class +@y +@!minimal_demerits:array[very_loose_fit..tight_fit] of integer; {best total + demerits known for current line class and position, given the fitness} +@!minimum_demerits:integer; {best total demerits known for current line class +@z +@x module 836 here we want to ensure that total_demerits < awful_bad +minimum_demerits:=minimum_demerits+abs(adj_demerits); +@y +if abs(adj_demerits)>=awful_bad-minimum_demerits then + minimum_demerits:=awful_bad-1 +else minimum_demerits:=minimum_demerits+abs(adj_demerits); +@z +@x module 851 +begin @!stat artificial_badness:=false;@+tats@/ +@y +begin artificial_demerits:=false;@/ +@z +@x module 854 + begin b:=0; {set badness zero, this break is forced} + @!stat artificial_badness:=true;@+tats + end +@y + artificial_demerits:=true {set demerits zero, this break is forced} +@z +@x module 855 +@; +@y +if artificial_demerits then d:=0 +else @; +@z +@x module 856 +if artificial_badness then print_char("*")@+else print_int(b); +@.*\relax@> +print(" p="); print_int(pi); +print(" d="); print_int(d); +@y +if b>inf_bad then print_char("*")@+else print_int(b); +@.*\relax@> +print(" p="); print_int(pi); print(" d="); +if artificial_demerits then print_char("*")@+else print_int(d); +@z +@x module 859 +d:=line_penalty+b; d:=d*d; +@y +begin d:=line_penalty+b; +if abs(d)>=10000 then d:=100000000@+else d:=d*d; +@z +@x ibid +if abs(fit_class-fitness(r))>1 then d:=d+adj_demerits +@y +if abs(fit_class-fitness(r))>1 then d:=d+adj_demerits; +end +@z + +384. Math fonts may disappear outside of \eqno (Marc van Leeuwen). +@x module 1194 + if danger then flush_math; +@y + danger:=false; + @; +@z + +385. Forgot to rule out charnode when testing for node type (Marc van Leeuwen). +@x module 805 + begin if type(q)=unset_node then + @ + else if type(q)=rule_node then + @; +@y + begin if not is_char_node(q) then + if type(q)=unset_node then + @ + else if type(q)=rule_node then + @; +@z +@x module 903 +if type(hb)=ligature_node then if odd(subtype(hb)) then +@y +if not is_char_node(hb) then + if type(hb)=ligature_node then if odd(subtype(hb)) then +@z +@x module 1202 + if p<>null then if type(p)=glue_node then d:=0; +@y + if p<>null then if not is_char_node(p) then if type(p)=glue_node then d:=0; +@z + +386. Don't change the font of punctuation before a hyphenated word + (Scott Allendorf, reported 7 Mar 90) +@x module 895 +label common_ending,done,found,found1,not_found,not_found+1,exit; +@y +label common_ending,done,found,found1,found2,not_found,exit; +@z +@x module 903 +if is_char_node(ha) then + begin init_list:=ha; init_lig:=false; hu[0]:=qo(character(ha)); + end +else if type(ha)=ligature_node then + begin init_list:=lig_ptr(ha); init_lig:=true; init_lft:=(subtype(ha)>1); + hu[0]:=qo(character(lig_char(ha))); + if init_list=null then if init_lft then + begin hu[0]:=256; init_lig:=false; + end; {in this case a ligature will be reconstructed from scratch} + free_node(ha,small_node_size); + end +else goto not_found+1; {no punctuation found} +s:=cur_p; {we have |cur_p<>ha| because |type(cur_p)=glue_node|} +while link(s)<>ha do s:=link(s); +j:=0; goto common_ending; +not_found+1: j:=1; s:=ha; init_list:=null; +if not is_char_node(r) then if type(r)=ligature_node then + if subtype(r)>1 then + begin j:=0; hu[0]:=256; init_lig:=false; + end; +@y +if is_char_node(ha) then + if font(ha)<>hf then goto found2 + else begin init_list:=ha; init_lig:=false; hu[0]:=qo(character(ha)); + end +else if type(ha)=ligature_node then + if font(lig_char(ha))<>hf then goto found2 + else begin init_list:=lig_ptr(ha); init_lig:=true; init_lft:=(subtype(ha)>1); + hu[0]:=qo(character(lig_char(ha))); + if init_list=null then if init_lft then + begin hu[0]:=256; init_lig:=false; + end; {in this case a ligature will be reconstructed from scratch} + free_node(ha,small_node_size); + end +else begin {no punctuation found; look for left boundary} + if not is_char_node(r) then if type(r)=ligature_node then + if subtype(r)>1 then goto found2; + j:=1; s:=ha; init_list:=null; goto common_ending; + end; +s:=cur_p; {we have |cur_p<>ha| because |type(cur_p)=glue_node|} +while link(s)<>ha do s:=link(s); +j:=0; goto common_ending; +found2: s:=ha; j:=0; hu[0]:=256; init_lig:=false; init_list:=null; +@z + +387. Balance the parens showing on the terminal (for Lispers). +@x module 304 +@!in_open : 0..max_in_open; {the number of lines in the buffer, less one} +@y +@!in_open : 0..max_in_open; {the number of lines in the buffer, less one} +@!open_parens : 0..max_in_open; {the number of open text files} +@z +@x module 331 +in_open:=0; max_buf_stack:=0; +@y +in_open:=0; open_parens:=0; max_buf_stack:=0; +@z +@x module 362 + begin print_char(")"); force_eof:=false; + update_terminal; {show user that file has been read} +@y + begin print_char(")"); decr(open_parens); + update_terminal; {show user that file has been read} + force_eof:=false; +@z +@x module 537 +print_char("("); print(name); update_terminal; state:=new_line; +@y +print_char("("); incr(open_parens); print(name); update_terminal; +state:=new_line; +@z +@x module 1334 +if job_name=0 then open_log_file; +@y +if job_name=0 then open_log_file; +while open_parens>0 do + begin print(" )"); decr(open_parens); + end; +@z + +388. Optimize \ifx\p\q after \let\p=\q (Marc van Leeuwen says that + AmS-TeX uses this a lot). +@x module 508 + while (p<>null)and(q<>null) do + if info(p)<>info(q) then p:=null + else begin p:=link(p); q:=link(q); + end; +b:=((p=null)and(q=null)); +@y +if p=q then b:=true +else begin while (p<>null)and(q<>null) do + if info(p)<>info(q) then p:=null + else begin p:=link(p); q:=link(q); + end; + b:=((p=null)and(q=null)); + end; +@z +@x module 538 (while we're at it, might as well optimize this too) +begin if not input_ln(cur_file,false) then do_nothing; +@y +begin if input_ln(cur_file,false) then do_nothing; +@z +@x module 1020 (and this) +else begin wait:=false; s:=ins_ptr(p); + link(last_ins_ptr(r)):=s; s:=last_ins_ptr(r); +@y +else begin wait:=false; s:=last_ins_ptr(r); link(s):=ins_ptr(p); +@z + +389. Treat migration properly in displays (Marc van Leeuwen). +@x module 1199 (a bad bug that really has bitten) +adjust_tail:=adjust_head; b:=hpack(p,natural); +@y +adjust_tail:=adjust_head; b:=hpack(p,natural); p:=list_ptr(b); +@z +@x module 1204 +shift_amount(b):=s+d; append_to_vlist(b); +if t<>adjust_head then + begin link(tail):=link(adjust_head); tail:=t; + end +@y +shift_amount(b):=s+d; append_to_vlist(b) +@z +@x module 1205 + tail_append(new_penalty(post_display_penalty)); + end +else begin tail_append(new_penalty(post_display_penalty)); + tail_append(new_param_glue(g2)); + end +@y + g2:=0; + end; +if t<>adjust_head then {migrating material comes after equation number} + begin link(tail):=link(adjust_head); tail:=t; + end; +tail_append(new_penalty(post_display_penalty)); +if g2>0 then tail_append(new_param_glue(g2)) +@z + +-----------Here I draw the line with respect to further changes + +390. Uninitialized nullfont parameters (found by Lance Carnes, 11 May 90). +@x module 552 +hyphen_char[null_font]:="-"; skew_char[null_font]:=-1; +@y +hyphen_char[null_font]:="-"; skew_char[null_font]:=-1; +bchar_label[null_font]:=non_address; +font_bchar[null_font]:=non_char; font_false_bchar[null_font]:=non_char; +@z + +391. Disable \write{\the\prevgraf} (B. Jackowski, July 1990). +@x module 422 +begin nest[nest_ptr]:=cur_list; p:=nest_ptr; +while abs(nest[p].mode_field)<>vmode do decr(p); +scanned_result(nest[p].pg_field)(int_val); +end +@y +if mode=0 then scanned_result(0)(int_val) {|prev_graf=0| within \.{\\write}} +else begin nest[nest_ptr]:=cur_list; p:=nest_ptr; + while abs(nest[p].mode_field)<>vmode do decr(p); + scanned_result(nest[p].pg_field)(int_val); + end +@z + +392. Report correct line number when buffer overflows (George Russell). +@x module 538 +begin if input_ln(cur_file,false) then do_nothing; +firm_up_the_line; +if end_line_char_inactive then decr(limit) +else buffer[limit]:=end_line_char; +first:=limit+1; loc:=start; line:=1; +@y +begin line:=1; +if input_ln(cur_file,false) then do_nothing; +firm_up_the_line; +if end_line_char_inactive then decr(limit) +else buffer[limit]:=end_line_char; +first:=limit+1; loc:=start; +@z + +393. (I sincerely hope that there won't be any more) + + * Possibly nice ideas that will not be implemented + +. Classes of marks analogous to classes of insertions + +. \showcontext to show the current location without stopping for error + +. \everyeof to insert tokens before an \input file ends + (strange example: \everyeof{\noexpand} will allow things + like \xdef\a{\input foo}!) + +. generalize \leftskip and \rightskip to token lists (problems with + displayed math then) + +. generalize \widowline and \clubline to go further into a paragraph + +* Bad ideas that will not be implemented + +. several people want to be able to remove arbitrary elements of lists, + but that must never be done because some of those elements (e.g. kerns + for accents) depend on floating point arithmetic + +. if anybody wants letter spacing desperately they should put it in their own + private version (e.g. generalize the hpack routine) and NOT call it TeX. diff --git a/info/digests/tex-implementors/tex_2_7_2_9.dif b/info/digests/tex-implementors/tex_2_7_2_9.dif new file mode 100644 index 0000000000..5909992b57 --- /dev/null +++ b/info/digests/tex-implementors/tex_2_7_2_9.dif @@ -0,0 +1,43 @@ +************ +File DRA1:[TEX82.SOURCES]TEX.WEB;3 + 26 % Version 2.8 fixes weird bug if no \patterns are used (December 1987). + 27 % Version 2.9 makes \csname\endcsname's "relax" local (December 1987). + 29 % A reward of $40.96 will be paid to the first finder of any remaining bug. +****** +File DRA1:[TEX82.SOURCES]TEX.WEB;2 + 27 % A reward of $40.96 will be paid to the first finder of any remaining bug. +************ +************ +File DRA1:[TEX82.SOURCES]TEX.WEB;3 + 168 @d banner=='This is TeX, Version 2.9' {printed when \TeX\ starts} + 170 @ Different \PASCAL s have slightly different conventions, and the present +****** +File DRA1:[TEX82.SOURCES]TEX.WEB;2 + 166 @d banner=='This is TeX, Version 2.7' {printed when \TeX\ starts} + 168 @ Different \PASCAL s have slightly different conventions, and the present +************ +************ +File DRA1:[TEX82.SOURCES]TEX.WEB;3 + 7545 begin eq_define(cur_cs,relax,256); + 7546 end; {the control sequence will now match `\.{\\relax}'} +****** +File DRA1:[TEX82.SOURCES]TEX.WEB;2 + 7543 begin eqtb[cur_cs]:=eqtb[frozen_relax]; + 7544 end; {the control sequence will now match `\.{\\relax}'} +************ +************ +File DRA1:[TEX82.SOURCES]TEX.WEB;3 +17870 trie_link(0):=0; trie_char(0):=0; trie_op(0):=min_quarterword; +17871 for k:=1 to 127 do trie[k]:=trie[0]; +****** +File DRA1:[TEX82.SOURCES]TEX.WEB;2 +17868 trie_link(0):=0; trie_char(0):=0; trie_op(0):=0; +17869 for k:=1 to 127 do trie[k]:=trie[0]; +************ + +Number of difference sections found: 4 +Number of difference records found: 5 + +DIFFERENCES /IGNORE=(SPACING,TRAILING_SPACES,BLANK_LINES)/WIDTH=132/MERGED=1/OUTPUT=DRA1:[TEX82.SOURCES]TEX_2_7_2_9.DIF;1- + DRA1:[TEX82.SOURCES]TEX.WEB;3- + DRA1:[TEX82.SOURCES]TEX.WEB;2 diff --git a/info/digests/tex-implementors/texmfwebplain.update b/info/digests/tex-implementors/texmfwebplain.update new file mode 100644 index 0000000000..7b78c70807 --- /dev/null +++ b/info/digests/tex-implementors/texmfwebplain.update @@ -0,0 +1,316 @@ +Below are upates to TeX.WEB, MF.WEB, and PLAIN.TeX. + +Differences between TeX.WEB for 2.92 and for 2.9 + +**** FILE TX:TEX-2-92.WEB.1, 1-28 (1880) +% Version 2.91 fixes \outer\def\a0{}\a\a bug (April 1988). +% Version 2.92 fixes \patterns, also file names with complex macros (May 1988). + +% A reward of $81.92 will be paid to the first finder of any remaining bug. +% (This amount will double again in 1989.) + +% Although considerable effort has been expended to make the TeX program +**** FILE TX:TEX-2-9.WEB.1, 1-29 (1882) + +% A reward of $40.96 will be paid to the first finder of any remaining bug. +% (This amount will double again in 1988.) + +% Although considerable effort has been expended to make the TeX program +*************** + +**** FILE TX:TEX-2-92.WEB.1, 2-93 (9207) +@d banner=='This is TeX, Version 2.92' {printed when \TeX\ starts} + +@ Different \PASCAL s have slightly different conventions, and the present +**** FILE TX:TEX-2-9.WEB.1, 2-93 (9066) +@d banner=='This is TeX, Version 2.9' {printed when \TeX\ starts} + +@ Different \PASCAL s have slightly different conventions, and the present +*************** + +**** FILE TX:TEX-2-92.WEB.1, 19-61 (240552) +@!d:integer; {number of characters already in current string} +@!p:pointer; {index in |hash| array} +**** FILE TX:TEX-2-9.WEB.1, 19-61 (240410) +@!p:pointer; {index in |hash| array} +*************** + +**** FILE TX:TEX-2-92.WEB.1, 19-88 (241492) +str_room(l); d:=cur_length; +while pool_ptr>str_start[str_ptr] do + begin decr(pool_ptr); str_pool[pool_ptr+l]:=str_pool[pool_ptr]; + end; {move current string up to make room for another} +for k:=j to j+l-1 do append_char(buffer[k]); +text(p):=make_string; pool_ptr:=pool_ptr+d; +@!stat incr(cs_count);@+tats@;@/ +**** FILE TX:TEX-2-9.WEB.1, 19-87 (241287) +str_room(l); +for k:=j to j+l-1 do append_char(buffer[k]); +text(p):=make_string; +@!stat incr(cs_count);@+tats@;@/ +*************** + +**** FILE TX:TEX-2-92.WEB.1, 20-77 (255280) +@!group_code=0..max_group_code; {|save_level| for a level boundary} + +@ The global variable |cur_group| keeps track of what sort of group we are +**** FILE TX:TEX-2-9.WEB.1, 20-77 (254875) +@!group_code=0..max_group_code; {|save_index| for a level boundary} + +@ The global variable |cur_group| keeps track of what sort of group we are +*************** + +**** FILE TX:TEX-2-92.WEB.1, 25-31 (308968) +@!par_token:halfword; {token representing `\.{\\par}'} + +@ @= +**** FILE TX:TEX-2-9.WEB.1, 25-31 (308563) +@!par_token:halfword; {token representing '\.{\\par}'} + +@ @= +*************** + +**** FILE TX:TEX-2-92.WEB.1, 25-372 (322487) +@ The present point in the program is reached only when the |expand| +routine has inserted a special marker into the input. In this special +**** FILE TX:TEX-2-9.WEB.1, 25-372 (322082) +@ The present point in the program is reached only when the |no_expand| +routine has inserted a special marker into the input. In this special +*************** + +**** FILE TX:TEX-2-92.WEB.1, 26-375 (343630) +repeat link(temp_head):=null; +if (info(r)>match_token+127)or(info(r)TEX-2-9.WEB.1, 26-375 (343228) +repeat if (info(r)>match_token+127)or(info(r)TEX-2-92.WEB.1, 27-675 (378115) + are |x| sp per unit; |goto attach_sign| if the units are internal@>; +@; +**** FILE TX:TEX-2-9.WEB.1, 27-675 (377704) + are |x| units per sp; |goto attach_sign| if the units are internal@>; +@; +*************** + +**** FILE TX:TEX-2-92.WEB.1, 28-13 (388583) +@p function str_toks(@!b:pool_pointer):pointer; + {changes the string |str_pool[b..pool_ptr]| to a token list} +var p:pointer; {tail of the token list} +**** FILE TX:TEX-2-9.WEB.1, 28-13 (388173) +@p function str_toks:pointer; {changes the current string to a token list} +var p:pointer; {tail of the token list} +*************** + +**** FILE TX:TEX-2-92.WEB.1, 28-20 (388915) +p:=temp_head; link(p):=null; k:=b; +while kTEX-2-9.WEB.1, 28-19 (388468) +p:=temp_head; link(p):=null; k:=str_start[str_ptr]; +while kTEX-2-92.WEB.1, 28-28 (389103) +pool_ptr:=b; str_toks:=p; +end; +**** FILE TX:TEX-2-9.WEB.1, 28-27 (388673) +pool_ptr:=str_start[str_ptr]; str_toks:=p; +end; +*************** + +**** FILE TX:TEX-2-92.WEB.1, 28-40 (389611) +@!b:pool_pointer; {base of temporary string} +begin get_x_token; scan_something_internal(tok_val,false); +if cur_val_level>=ident_val then @ +else begin old_setting:=selector; selector:=new_string; b:=pool_ptr; + case cur_val_level of +**** FILE TX:TEX-2-9.WEB.1, 28-39 (389198) +begin get_x_token; scan_something_internal(tok_val,false); +if cur_val_level>=ident_val then @ +else begin old_setting:=selector; selector:=new_string; + case cur_val_level of +*************** + +**** FILE TX:TEX-2-92.WEB.1, 28-53 (390161) + selector:=old_setting; the_toks:=str_toks(b); + end; +**** FILE TX:TEX-2-9.WEB.1, 28-51 (389689) + selector:=old_setting; the_toks:=str_toks; + end; +*************** + +**** FILE TX:TEX-2-92.WEB.1, 28-117 (392508) +@!b:pool_pointer; {base of temporary string} +begin c:=cur_chr; @; +old_setting:=selector; selector:=new_string; b:=pool_ptr; +@; +selector:=old_setting; link(garbage):=str_toks(b); ins_list(link(temp_head)); +end; +**** FILE TX:TEX-2-9.WEB.1, 28-115 (392033) +begin c:=cur_chr; @; +old_setting:=selector; selector:=new_string; +@; +selector:=old_setting; link(garbage):=str_toks; ins_list(link(temp_head)); +end; +*************** + +**** FILE TX:TEX-2-92.WEB.1, 30-262 (427879) +begin if (pool_ptr+name_length>pool_size)or(str_ptr=max_strings)or + (cur_length>0) then + make_name_string:="?" +**** FILE TX:TEX-2-9.WEB.1, 30-262 (427342) +begin if (pool_ptr+name_length>pool_size)or(str_ptr=max_strings) then + make_name_string:="?" +*************** + +**** FILE TX:TEX-2-92.WEB.1, 35-281 (573403) +`\.\_' or `\.\~' or `\./' or `\.\\' if |p| is descended from the |subscr| +or |supscr| or |denominator| or |numerator| fields of noads. For example, +**** FILE TX:TEX-2-9.WEB.1, 35-281 (572846) +`\.[' or `\.(' or `\./' or `\.\\' if |p| is descended from the |subscr| +or |supscr| or |denominator| or |numerator| fields of noads. For example, +*************** + +**** FILE TX:TEX-2-92.WEB.1, 43-68 (756339) +to the impossible value 128, in order to guarantee that |hc[hn+3]| will +never be fetched. +**** FILE TX:TEX-2-9.WEB.1, 43-68 (755780) +to the impossible value 256, in order to guarantee that |hc[hn+3]| will +never be fetched. +*************** + +**** FILE TX:TEX-2-92.WEB.1, 43-75 (756649) +hc[0]:=127; hc[hn+1]:=127; hc[hn+2]:=128; {insert delimiters} +for j:=0 to hn-2 do +**** FILE TX:TEX-2-9.WEB.1, 43-75 (756090) +hc[0]:=127; hc[hn+1]:=127; hc[hn+2]:=256; {insert delimiters} +for j:=0 to hn-2 do +*************** + +**** FILE TX:TEX-2-92.WEB.1, 43-196 (761319) +until coming to a right brace; then |return|@>; +exit:end; +**** FILE TX:TEX-2-9.WEB.1, 43-196 (760760) +until coming to a right brace; then skip an optional space and |return|@>; +exit:end; +*************** + +**** FILE TX:TEX-2-92.WEB.1, 44-201 (773038) +trie_link(trie_size):=0; trie_back(0):=trie_size; {wrap around} +for p:=1 to 128 do +**** FILE TX:TEX-2-9.WEB.1, 44-201 (772506) +for p:=1 to 128 do +*************** + +**** FILE TX:TEX-2-92.WEB.1, 44-233 (774482) +begin c:=trie_c[p]; +if cTEX-2-9.WEB.1, 44-232 (773885) +begin c:=trie_c[p]; {we have |c>0|} +if cTEX-2-92.WEB.1, 44-345 (779179) + brace@>; +trie_root:=compress_trie(trie_root); {compress the trie} +**** FILE TX:TEX-2-9.WEB.1, 44-343 (778549) + brace; then skip an optional space@>; +trie_root:=compress_trie(trie_root); {compress the trie} +*************** + +**** FILE TX:TEX-2-92.WEB.1, 44-443 (782387) +r:=trie_size; {finally, we will zero out the holes} +h.rh:=0; h.b0:=min_quarterword; h.b1:=0; {|trie_link:=0|, +**** FILE TX:TEX-2-9.WEB.1, 44-441 (781786) +r:=0; {finally, we will zero out the holes} +h.rh:=0; h.b0:=min_quarterword; h.b1:=0; {|trie_link:=0|, +*************** + + +######################################################################## + +Differences between new and previous Plain.TeX + +**** FILE PS:PLAIN.TEX.2, 6-244 (33253) +\def\arrowvert{\delimiter"33C000 } % arrow without arrowheads +\def\Arrowvert{\delimiter"33D000 } % double arrow without arrowheads +\def\bracevert{\delimiter"33E000 } % the vertical bar that extends braces +**** FILE PS:PLAIN.TEX.1, 1-951 (33258) +\def\arrowvert{\delimiter"33C } % arrow without arrowheads +\def\Arrowvert{\delimiter"33D } % double arrow without arrowheads +\def\bracevert{\delimiter"33E } % the vertical bar that extends braces +*************** + +**** FILE PS:PLAIN.TEX.2, 8-22 (44482) +\def\fmtname{plain}\def\fmtversion{2.92} % identifies the current format +**** FILE PS:PLAIN.TEX.1, 1-1220 (44480) +\def\fmtname{plain}\def\fmtversion{2.3} % identifies the current format +*************** + +######################################################################## + +Differences between MF.WEB for 1.4 and for 1.3 + +**** FILE PS:<1SCRATCH>MF.WEB.1, 1-15 (870) +% Version 1.4 corrected scan_declared_variable timing (May 1988). +% A few "harmless" optimizations have been made since then. + +% A reward of $20.48 will be paid to the first finder of any remaining bug. +% (This amount will double again in 1989.) + +% Although considerable effort has been expended to make the METAFONT program +**** FILE PS:MF.WEB.1, 1-15 (870) +% A few "harmless" optimizations have been made since then. + +% A reward of $10.24 will be paid to the first finder of any remaining bug. +% (This amount will double again in 1988.) + +% Although considerable effort has been expended to make the METAFONT program +*************** + +**** FILE PS:<1SCRATCH>MF.WEB.1, 2-81 (7574) +@d banner=='This is METAFONT, Version 1.4' {printed when \MF\ starts} + +@ Different \PASCAL s have slightly different conventions, and the present +**** FILE PS:MF.WEB.1, 1-146 (7508) +@d banner=='This is METAFONT, Version 1.3' {printed when \MF\ starts} + +@ Different \PASCAL s have slightly different conventions, and the present +*************** + +**** FILE PS:<1SCRATCH>MF.WEB.1, 43-1162 (768090) + if txx mod unity=0 then if tyy mod unity=0 then + @; +**** FILE PS:MF.WEB.1, 1-18695 (768065) + if txy mod unity=0 then if tyy mod unity=0 then + @; +*************** + +**** FILE PS:<1SCRATCH>MF.WEB.1, 44-399 (798211) +h:=get_avail; info(h):=x; t:=h;@/ +**** FILE PS:MF.WEB.1, 1-19495 (798187) +if equiv(x)=null then new_root(x); +h:=get_avail; info(h):=x; t:=h;@/ +*************** + +**** FILE PS:<1SCRATCH>MF.WEB.1, 44-407 (798526) +done: if eq_type(x)<>tag_token then clear_symbol(x,false); +if equiv(x)=null then new_root(x); +scan_declared_variable:=h; +end; +**** FILE PS:MF.WEB.1, 1-19504 (798538) +done:scan_declared_variable:=h; +end; +*************** + -- cgit v1.2.3