summaryrefslogtreecommitdiff
path: root/systems/knuth/dist/mf
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-02-10 03:01:13 +0000
committerNorbert Preining <norbert@preining.info>2021-02-10 03:01:13 +0000
commit7428e668f046bec10d1200214789e40390fa51e7 (patch)
treed28de61e9d3ed96c80ebf2300d0ba3d6a76414e6 /systems/knuth/dist/mf
parent1350502b809c028b8f123dec94ca92782eda564f (diff)
CTAN sync 202102100301
Diffstat (limited to 'systems/knuth/dist/mf')
-rw-r--r--systems/knuth/dist/mf/mf.web139
-rw-r--r--systems/knuth/dist/mf/mfbook.tex755
-rw-r--r--systems/knuth/dist/mf/trap.72270gfbin0 -> 1028 bytes
-rw-r--r--systems/knuth/dist/mf/trap.fot4
-rw-r--r--systems/knuth/dist/mf/trap.log90
-rwxr-xr-x[-rw-r--r--]systems/knuth/dist/mf/trap.pl0
-rw-r--r--systems/knuth/dist/mf/trap.typ2
-rw-r--r--systems/knuth/dist/mf/trapin.fot78
-rw-r--r--systems/knuth/dist/mf/trapin.log8
9 files changed, 601 insertions, 475 deletions
diff --git a/systems/knuth/dist/mf/mf.web b/systems/knuth/dist/mf/mf.web
index ca3cb2518d..065dd2f802 100644
--- a/systems/knuth/dist/mf/mf.web
+++ b/systems/knuth/dist/mf/mf.web
@@ -1,6 +1,7 @@
% This program is copyright (C) 1984 by D. E. Knuth; all rights are reserved.
-% Copying of this file is authorized only if (1) you are D. E. Knuth, or if
-% (2) you make absolutely no changes to your copy. (The WEB system provides
+% Unlimited copying and redistribution of this file are permitted as long
+% as this file is not modified. Modifications are permitted, but only if
+% the resulting file is not named mf.web. (The WEB system provides
% for alterations via an auxiliary file; the master file should stay intact.)
% In other words, METAFONT is under essentially the same ground rules as TeX.
@@ -26,6 +27,7 @@
% Version 2.71828 suppressed autorounding in dangerous cases (June 2003).
% Version 2.718281 was a general cleanup with minor fixes (February 2008).
% Version 2.7182818 was similar (January 2014).
+% Version 2.71828182 was similar (January 2021).
% A reward of $327.68 will be paid to the first finder of any remaining bug.
@@ -155,7 +157,7 @@ helping to determine whether an implementation deserves to be
known as `\MF\kern.5pt' [cf.~Stanford Computer Science report CS1095,
January 1986].
-@d banner=='This is METAFONT, Version 2.7182818' {printed when \MF\ starts}
+@d banner=='This is METAFONT, Version 2.71828182' {printed when \MF\ starts}
@ Different \PASCAL s have slightly different conventions, and the present
@!@:PASCAL H}{\ph@>
@@ -166,7 +168,7 @@ reader see how to make an appropriate interface for other systems
if necessary. (\ph\ is Charles Hedrick's modification of a compiler
@^Hedrick, Charles Locke@>
for the DECsystem-10 that was originally developed at the University of
-Hamburg; cf.\ {\sl SOFTWARE---Practice \AM\ Experience \bf6} (1976),
+Hamburg; cf.\ {\sl Software---Practice and Experience \bf6} (1976),
29--42. The \MF\ program below is intended to be adaptable, without
extensive changes, to most other versions of \PASCAL, so it does not fully
use the admirable features of \ph. Indeed, a conscious effort has been
@@ -830,7 +832,7 @@ representing the beginning and ending of a line of text.
@!max_buf_stack:0..buf_size; {largest index used in |buffer|}
@ The |input_ln| function brings the next line of input from the specified
-field into available positions of the buffer array and returns the value
+file into available positions of the buffer array and returns the value
|true|, unless the file has already been entirely read, in which case it
returns |false| and sets |last:=first|. In general, the |ASCII_code|
numbers that represent the next line of the file are input into
@@ -1218,7 +1220,7 @@ on the information that \.{WEB} has output while processing \MF.
label done,exit;
var @!k,@!l:0..255; {small indices or counters}
@!m,@!n:text_char; {characters input from |pool_file|}
-@!g:str_number; {garbage}
+@!g:str_number; {the string just created}
@!a:integer; {accumulator for check sum}
@!c:boolean; {check sum has been checked}
begin pool_ptr:=0; str_ptr:=0; max_pool_ptr:=0; max_str_ptr:=0; str_start[0]:=0;
@@ -1499,9 +1501,9 @@ end;
@ Here is the very first thing that \MF\ prints: a headline that identifies
the version number and base name. The |term_offset| variable is temporarily
-incorrect, but the discrepancy is not serious since we assume that the banner
-and base identifier together will occupy at most |max_print_line|
-character positions.
+incorrect, but the discrepancy is not serious since we assume that this
+part of the program is system dependent.
+@^system dependencies@>
@<Initialize the output...@>=
wterm(banner);
@@ -1538,7 +1540,7 @@ by all \PASCAL\ compilers.
@<Basic print...@>=
procedure print_int(@!n:integer); {prints an integer in decimal form}
-var k:0..23; {index to current digit; we assume that $|n|<10^{23}$}
+var k:0..23; {index to current digit; we assume that $\vert n\vert<10^{23}$}
@!m:integer; {used to negate |n| in possibly dangerous cases}
begin k:=0;
if n<0 then
@@ -1758,7 +1760,8 @@ if error_count=100 then
exit:end;
@ @<Get user's advice...@>=
-loop@+begin continue: clear_for_error_prompt; prompt_input("? ");
+loop@+begin continue: if interaction<>error_stop_mode then return;
+ clear_for_error_prompt; prompt_input("? ");
@.?\relax@>
if last=first then return;
c:=buffer[first];
@@ -1783,7 +1786,7 @@ case c of
"0","1","2","3","4","5","6","7","8","9": if deletions_allowed then
@<Delete |c-"0"| tokens and |goto continue|@>;
@t\4\4@>@;@+@!debug "D":begin debug_help;goto continue;@+end;@+gubed@/
-"E": if file_ptr>0 then
+"E": if file_ptr>0 then if input_stack[file_ptr].name_field>=256 then
begin print_nl("You want to edit file ");
@.You want to edit file x@>
slow_print(input_stack[file_ptr].name_field);
@@ -1804,7 +1807,8 @@ begin print("Type <return> to proceed, S to scroll future error messages,");@/
@.Type <return> to proceed...@>
print_nl("R to run without stopping, Q to run quietly,");@/
print_nl("I to insert something, ");
-if file_ptr>0 then print("E to edit your file,");
+if file_ptr>0 then if input_stack[file_ptr].name_field>=256 then
+ print("E to edit your file,");
if deletions_allowed then
print_nl("1 or ... or 9 to ignore the next 1 to 9 tokens of input,");
print_nl("H for help, X to quit.");
@@ -1999,7 +2003,7 @@ begin if OK_to_interrupt then
print_err("Interruption");
@.Interruption@>
help3("You rang?")@/
- ("Try to insert some instructions for me (e.g.,`I show x'),")@/
+ ("Try to insert an instruction for me (e.g., `I show x;'),")@/
("unless you just want to quit by typing `X'.");
deletions_allowed:=false; error; deletions_allowed:=true;
interrupt:=0;
@@ -2200,7 +2204,7 @@ sets |arith_error:=true|. Most of \MF's internal computations have
been designed to avoid this sort of error.
Notice that if 64-bit integer arithmetic were available,
-we could simply compute |(@t$(2^{29}$@>*p+q)div (2*q)|.
+we could simply compute |@t$(2^{29}$@>*p+q)div (2*q)|.
But when we are restricted to \PASCAL's 32-bit arithmetic we
must either resort to multiple-precision maneuvering
or use a simple but slow iteration. The multiple-precision technique
@@ -4111,7 +4115,7 @@ fuss with. Every such parameter has an identifying code number, defined here.
@d fillin=38 {extra darkness of diagonal lines}
@d turning_check=39 {controls reorientation of clockwise paths}
@d warning_check=40 {controls error message when variable value is large}
-@d boundary_char=41 {the right boundary character for ligatures}
+@d boundary_char=41 {the boundary character for ligatures}
@d max_given_internal=41
@<Glob...@>=
@@ -4265,17 +4269,21 @@ int_name[boundary_char]:="boundarychar";
input and output, establishes the initial values of the date and time.
@^system dependencies@>
Since standard \PASCAL\ cannot provide such information, something special
-is needed. The program here simply specifies July 4, 1776, at noon; but
-users probably want a better approximation to the truth.
+is needed. The program here simply assumes that suitable values appear in
+the global variables \\{sys\_time}, \\{sys\_day}, \\{sys\_month}, and
+\\{sys\_year} (which are initialized to noon on 4 July 1776,
+in case the implementor is careless).
Note that the values are |scaled| integers. Hence \MF\ can no longer
be used after the year 32767.
@p procedure fix_date_and_time;
-begin internal[time]:=12*60*unity; {minutes since midnight}
-internal[day]:=4*unity; {fourth day of the month}
-internal[month]:=7*unity; {seventh month of the year}
-internal[year]:=1776*unity; {Anno Domini}
+begin sys_time:=12*60;
+sys_day:=4; sys_month:=7; sys_year:=1776; {self-evident truths}
+internal[time]:=sys_time*unity; {minutes since midnight}
+internal[day]:=sys_day*unity; {day of the month}
+internal[month]:=sys_month*unity; {month of the year}
+internal[year]:=sys_year*unity; {Anno Domini}
end;
@ \MF\ is occasionally supposed to print diagnostic information that
@@ -4299,11 +4307,13 @@ if blank_line then print_ln;
selector:=old_setting;
end;
-@ Of course we had better declare another global variable, if the previous
+@ Of course we had better declare a few more global variables, if the previous
routines are going to work.
@<Glob...@>=
@!old_setting:0..max_selector;
+@!sys_time,@!sys_day,@!sys_month,@!sys_year:integer;
+ {date and time supplied by external system}
@ We will occasionally use |begin_diagnostic| in connection with line-number
printing, as follows. (The parameter |s| is typically |"Path"| or
@@ -4874,7 +4884,7 @@ else begin print_scaled(v); c:=digit_class;
end
@ Strictly speaking, a genuine token will never have |info(p)=0|.
-But we will see later (in the |print_variable_name| routine) that
+But we will see later (in the definition of attribute nodes) that
it is convenient to let |info(p)=0| stand for `\.{[]}'.
@<Display a collective subscript@>=
@@ -5584,7 +5594,7 @@ The global variable |save_ptr| points to the top item on the save stack.
@ @<Set init...@>=save_ptr:=null;
@ The |save_variable| routine is given a hash address |q|; it salts this
-address in the save stack, together with its current equivalent,
+address away in the save stack, together with its current equivalent,
then makes token~|q| behave as though it were brand new.
Nothing is stacked when |save_ptr=null|, however; there's no way to remove
@@ -7036,9 +7046,9 @@ $$a_k'=a_k+\delta\k-\delta_k;\qquad
Here $a\ll b$ means that $a\L b-2$, and $a\gg b$ means that $a\G b+2$.
The smoothing operation is symmetric in the sense that, if $a_0\ldots a_n$
-smoothes to $a_0'\ldots a_n'$, then the reverse sequence $a_n\ldots a_0$
-smoothes to $a_n'\ldots a_0'$; also the complementary sequence
-$(m-a_0)\ldots(m-a_n)$ smoothes to $(m-a_0')\ldots(m-a_n')$.
+smooths to $a_0'\ldots a_n'$, then the reverse sequence $a_n\ldots a_0$
+smooths to $a_n'\ldots a_0'$; also the complementary sequence
+$(m-a_0)\ldots(m-a_n)$ smooths to $(m-a_0')\ldots(m-a_n')$.
We have $a_0'+\cdots+a_n'=a_0+\cdots+a_n$ because $\delta_0=\delta_{n+1}=0$.
@p procedure smooth_moves(@!b,@!t:integer);
@@ -7073,7 +7083,7 @@ represents only the nonzero edge weights, since most of the edges are
weightless; in this way, the data storage requirements grow only linearly
with respect to the number of pixels per point, even though two-dimensional
data is being represented. (Well, the actual dependence on the underlying
-resolution is order $n\log n$, but the the $\log n$ factor is buried in our
+resolution is order $n\log n$, but the $\log n$ factor is buried in our
implicit restriction on the maximum raster size.) The sum of all edge
weights in each row should be zero.
@@ -10870,7 +10880,7 @@ right_type(q):=endpoint
k:=0; w:=link(h); ww:=knil(w);
mm0:=floor_unscaled(x_coord(p)+x_coord(w)-xy_corr[octant]);
mm1:=floor_unscaled(x_coord(q)+x_coord(ww)-xy_corr[octant]);
-for n:=0 to n1-n0 do env_move[n]:=mm0;
+for n:=0 to n1-n0-1 do env_move[n]:=mm0;
env_move[n1-n0]:=mm1; move_ptr:=0; m:=mm0
@ At this point |n| holds the value of |move_ptr| that was current
@@ -11074,7 +11084,7 @@ the results essentially independent of where the path falls on the raster.
For example, the exact envelope with respect to a pen of diameter~1
blackens a pixel if and only if the path intersects a circle of diameter~1
inscribed in that pixel; the resulting pattern has ``blots'' when the path
-is travelling diagonally in unfortunate raster positions. A much better
+is traveling diagonally in unfortunate raster positions. A much better
result is obtained when pixels are blackened only when the path intersects
an inscribed {\sl diamond\/} of diameter~1. Such a diamond is precisely
the polygon that \MF\ uses in the special case of a circle whose diameter is~1.
@@ -11417,7 +11427,7 @@ if d<alpha then d:=alpha
@ At this point there's a line of length |<=delta| from vertex~|p|
to vertex~|q|, orthogonal to direction $\bigl($|right_u(p),left_v(q)|$\bigr)$;
-and there's a line of length |>=delta| from vertex~|q| to
+and there's a line of length |>=delta| from vertex~|q|
to vertex~|r|, orthogonal to direction $\bigl($|right_u(q),left_v(r)|$\bigr)$.
The best line to direction $(u,v)$ should replace the line from
|p| to~|q|; this new line will have the same length as the old.
@@ -12111,7 +12121,7 @@ pretending to declare a screen buffer called |screen_pixel|. This code
is actually commented out, but it does specify the intended effects.
@<Glob...@>=
-@{@!screen_pixel:array[screen_row,screen_col] of pixel_color;@+@}
+@{@+@!screen_pixel:array[screen_row,screen_col] of pixel_color@t; @>@}
@ The |blank_rectangle| routine simply whitens all pixels that lie in
columns |left_col| through |right_col-1|, inclusive, of rows
@@ -12156,7 +12166,7 @@ program (see the commented-out code below).
@!n:screen_col);
var @!k:screen_col; {an index into |a|}
@!c:screen_col; {an index into |screen_pixel|}
-begin @{ k:=0; c:=a[0];
+begin @{@+k:=0; c:=a[0];
repeat incr(k);
repeat screen_pixel[r,c]:=b; incr(c);
until c=a[k];
@@ -13384,7 +13394,7 @@ list involved.
discussion above, is a code number that explains what kind of token list
is being scanned.
-\yskip\hang|name| points to the |eqtb| address of the control sequence
+\yskip\hang|name| points to the |eqtb| address of the macro
being expanded, if the current token list is a macro not defined by
\&{vardef}. Macros defined by \&{vardef} have |name=null|; their name
can be deduced by looking at their first two parameters.
@@ -13405,7 +13415,7 @@ a \&{for} or \&{forsuffixes} loop;
\indent|parameter|, if a \&{text} or \&{suffix} parameter is being scanned;
\indent|backed_up|, if the token list being scanned has been inserted as
-`to be read again'.
+`to be read again';
\indent|inserted|, if the token list being scanned has been inserted as
part of error recovery;
@@ -14674,7 +14684,7 @@ if cur_exp=true_code then
else if cur_cmd<>semicolon then
begin missing_err(";");@/
@.Missing `;'@>
- help2("After `exitif <boolean exp>' I expect to see a semicolon.")@/
+ help2("After `exitif <boolean expr>' I expect to see a semicolon.")@/
("I shall pretend that one was there."); back_error;
end;
end
@@ -14790,7 +14800,7 @@ input stack, so that |get_next| will proceed to read it next.
@t\4@>@<Declare the procedure called |print_arg|@>@;
@t\4@>@<Declare the procedure called |scan_text_arg|@>@;
procedure macro_call(@!def_ref,@!arg_list,@!macro_name:pointer);
- {invokes a user-defined control sequence}
+ {invokes a user-defined sequence of commands}
label found;
var @!r:pointer; {current node in the macro's token list}
@!p,@!q:pointer; {for list manipulation}
@@ -15126,7 +15136,7 @@ if_test,fi_or_else: case m of
endcases;
@ Here is a procedure that ignores text until coming to an \&{elseif},
-\&{else}, or \&{fi} at level zero of $\&{if}\ldots\&{fi}$
+\&{else}, or \&{fi} at the current level of $\&{if}\ldots\&{fi}$
nesting. After it has acted, |cur_mod| will indicate the token that
was found.
@@ -15369,8 +15379,8 @@ if cur_cmd<>colon then
`\&{endfor}' at the end of the loop. This will come through \MF's scanner
at the proper time to cause the loop to be repeated.
-(If the user tries some shenanigan like `\&{for} $\ldots$ \&{let} \&{endfor}',
-he will be foiled by the |get_symbol| routine, which keeps frozen
+(A user who tries some shenanigan like `\&{for} $\ldots$ \&{let} \&{endfor}'
+will be foiled by the |get_symbol| routine, which keeps frozen
tokens unchanged. Furthermore the |frozen_repeat_loop| is an \&{outer}
token, so it won't be lost accidentally.)
@@ -15910,13 +15920,11 @@ end
@ @<Print the banner...@>=
begin wlog(banner);
slow_print(base_ident); print(" ");
-print_int(round_unscaled(internal[day])); print_char(" ");
+print_int(sys_day); print_char(" ");
months:='JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC';
-m:=round_unscaled(internal[month]);
-for k:=3*m-2 to 3*m do wlog(months[k]);
-print_char(" "); print_int(round_unscaled(internal[year])); print_char(" ");
-m:=round_unscaled(internal[time]);
-print_dd(m div 60); print_char(":"); print_dd(m mod 60);
+for k:=3*sys_month-2 to 3*sys_month do wlog(months[k]);
+print_char(" "); print_int(sys_year); print_char(" ");
+print_dd(sys_time div 60); print_char(":"); print_dd(sys_time mod 60);
end
@ Here's an example of how these file-name-parsing routines work in practice.
@@ -15939,6 +15947,9 @@ crank up the output file.
@ Let's turn now to the procedure that is used to initiate file reading
when an `\.{input}' command is being processed.
+Beware: For historic reasons, this code foolishly conserves a tiny bit
+of string pool space; but that can confuse the interactive `\.E' option.
+@^system dependencies@>
@p procedure start_input; {\MF\ will \.{input} something}
label done;
@@ -15962,7 +15973,7 @@ if job_name=0 then
if term_offset+length(name)>max_print_line-2 then print_ln
else if (term_offset>0)or(file_offset>0) then print_char(" ");
print_char("("); incr(open_parens); slow_print(name); update_terminal;
-if name=str_ptr-1 then {we can conserve string pool space now}
+if name=str_ptr-1 then {conserve string pool space (but see note above)}
begin flush_string(name); name:=cur_name;
end;
@<Read the first line of the new file@>;
@@ -16066,7 +16077,7 @@ knot list. The |future_pen| option occurs only as an output of |scan_primary|
and |scan_secondary|, not as an output of |scan_tertiary| or |scan_expression|.
\smallskip\hang
-|cur_type=path_type| means that |cur_exp| points to a the first node of
+|cur_type=path_type| means that |cur_exp| points to the first node of
a path; nobody else points to this particular path. The control points of
the path will have been chosen.
@@ -16106,7 +16117,7 @@ dependency list.
\smallskip\hang
|cur_type=proto_dependent| means that |cur_exp| points to a |proto_dependent|
-capsule node . The |dep_list| field in this capsule
+capsule node. The |dep_list| field in this capsule
points to the associated dependency list.
\smallskip\hang
@@ -20847,11 +20858,11 @@ 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 |next_char| byte is the so-called 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|.
+there is a special ligature/kerning program for a boundary character at the
+left, 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
@@ -20868,7 +20879,7 @@ the condition
$$\hbox{|256*op_byte+remainder<nl|.}$$
If such an instruction is encountered during
normal program execution, it denotes an unconditional halt; no ligature
-command is performed.
+or kerning command is performed.
@d stop_flag=128+min_quarterword
{value indicating `\.{STOP}' in a lig/kern program}
@@ -20968,8 +20979,8 @@ is kept in additional arrays called |header_byte|, |lig_kern|,
@!nk:0..max_kerns; {the number of distinct kerns so far}
@!exten:array[eight_bits] of four_quarters; {extensible character recipes}
@!ne:0..256; {the number of extensible characters so far}
-@!param:array[1..max_font_dimen] of scaled; {\&{fontinfo} parameters}
-@!np:0..max_font_dimen; {the largest \&{fontinfo} parameter specified so far}
+@!param:array[1..max_font_dimen] of scaled; {\&{fontdimen} parameters}
+@!np:0..max_font_dimen; {the largest \&{fontdimen} parameter specified so far}
@!nw,@!nh,@!nd,@!ni:0..256; {sizes of \.{TFM} subtables}
@!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?}
@@ -21128,7 +21139,7 @@ header_byte_code, font_dimen_code: begin c:=cur_mod; get_x_next;
if cur_cmd<>colon then
begin missing_err(":");
@.Missing `:'@>
- help1("A colon should follow a headerbyte or fontinfo location.");
+ help1("A colon should follow a headerbyte or fontdimen location.");
back_error;
end;
if c=header_byte_code then @<Store a list of header bytes@>
@@ -22582,6 +22593,8 @@ macros to dump words of different types:
@ The inverse macros are slightly more complicated, since we need to check
the range of the values we are reading in. We say `|undump(a)(b)(x)|' to
read an integer value |x| that is supposed to be in the range |a<=x<=b|.
+System error messages should be suppressed when undumping.
+@^system dependencies@>
@d undump_wd(#)==begin get(base_file); #:=base_file^;@+end
@d undump_int(#)==begin get(base_file); #:=base_file^.int;@+end
@@ -22881,7 +22894,8 @@ cannot produce error messages. For example, it would be a mistake to call
might lead to an infinite loop.
@^system dependencies@>
-This program doesn't bother to close the input files that may still be open.
+If |final_cleanup| is bypassed, this program doesn't bother to close
+the input files that may still be open.
@<Last-minute...@>=
procedure close_files_and_terminate;
@@ -23038,7 +23052,7 @@ if (base_ident=0)or(buffer[loc]="&") then
while (loc<limit)and(buffer[loc]=" ") do incr(loc);
end;
buffer[limit]:="%";@/
-fix_date_and_time; init_randoms((internal[time] div unity)+internal[day]);@/
+fix_date_and_time; init_randoms(sys_time+sys_day*unity);@/
@<Initialize the print |selector|...@>;
if loc<limit then if buffer[loc]<>"\" then start_input; {\&{input} assumed}
end
@@ -23070,14 +23084,15 @@ program below. (If |m=13|, there is an additional argument, |l|.)
@!debug procedure debug_help; {routine to display various things}
label breakpoint,exit;
var @!k,@!l,@!m,@!n:integer;
-begin loop begin wake_up_terminal;
+begin clear_terminal;
+ loop begin wake_up_terminal;
print_nl("debug # (-1 to exit):"); update_terminal;
@.debug \#@>
read(term_in,m);
if m<0 then return
else if m=0 then
- begin goto breakpoint;@\ {go to every label at least once}
- breakpoint: m:=0; @{'BREAKPOINT'@}@\
+ begin goto breakpoint;@/ {go to every declared label at least once}
+ breakpoint: m:=0; @{'BREAKPOINT'@}@/
end
else begin read(term_in,n);
case m of
diff --git a/systems/knuth/dist/mf/mfbook.tex b/systems/knuth/dist/mf/mfbook.tex
index c1692a6f52..3c5cb4db07 100644
--- a/systems/knuth/dist/mf/mfbook.tex
+++ b/systems/knuth/dist/mf/mfbook.tex
@@ -112,7 +112,7 @@ ISBN 0-201-13444-6 (soft)\cr}}
\noindent
%{\sl \kern-1pt Incorporates the final corrections made in 1995,
% and a few dozen more.}
-{\sl \kern-1pt Incorporates all corrections known in 2013.}
+{\sl \kern-1pt Incorporates all corrections known in 2020.}
\smallskip
\noindent
Internet page {\tt http://www-cs-faculty.stanford.edu/\char`\~
@@ -125,11 +125,20 @@ Copyright $\copyright$ 1986 by the American Mathematical Society
\noindent
This book is published jointly by the American Mathematical Society
and Addison\kern.1em--Wesley Publishing Company.
-All rights reserved. No part of this publication may be reproduced, stored in
-a retrieval system, or transmitted, in any form or by any means,
-electronic, mechanical, photocopying, recording, or otherwise, without
-the prior written permission of the publishers. Printed in the United
-States of America. % Published simultaneously in Canada.
+All rights reserved.
+%No part of this publication may be reproduced, stored in
+%a retrieval system, or transmitted, in any form or by any means,
+%electronic, mechanical, photocopying, recording, or otherwise, without
+%the prior written permission of the publishers. Printed in the United
+%States of America.
+This publication is protected by copyright, and permission must be
+obtained from the publisher prior to any prohibited reproduction, storage in
+a~retrieval system, or transmission in any form or by any means, electronic,
+mechanical, photocopying, recording, or likewise. For information regarding
+permissions, request forms, and the appropriate contacts with the
+Pearson Education Global Rights \& Permissions Department, please visit
+ {\tt www.pearson.com/permissions/}.
+Printed in the United States of America. % Published simultaneously in Canada.
\medskip
\noindent
%ISBN 0-201-13444-6\par % paperback
@@ -141,11 +150,21 @@ ISBN-10 \enspace\phantom{978-}0-201-13444-6 (soft)\par
%11 12 13 14 15 16--CRS--07 06 05 04 03 02 % paperback
%7 8 9 10 11 12 13--CRS--07 06 05 04 03 02 01 % hardcover
\smallskip\noindent
-Text printed in the United States
- at Courier Westford in Westford, Massachusetts.\par\noindent
-Eighth Printing, February 2012\par\noindent
-Twelfth Printing, February 2012 (soft)
+%Text printed in the United States
+%% at Courier Westford in Westford, Massachusetts.\par\noindent
+%%at LSC Communications in Crawfordsville, Indiana.\par\noindent
+%at LSC Communications\par\noindent
+%%Eighth Printing, February 2012\par\noindent
+%Fourteenth Softcover Printing, May 2017\par\noindent
+%14\quad17
+%Ninth Printing, November 2017\par\noindent
+%9\quad17
+Tenth Printing, February 2021\par\noindent
+\smallskip
+\font\pearsonkluj=arial at 9pt
+\leftline{\pearsonkluj ScoutAutomatedPrintCode}
^^{Knuth, Donald Ervin}
+^^|\copyright|
\eject
% dedication
\titlepage
@@ -421,7 +440,7 @@ comparable to the choice books they have in their cabinets?
\\17. Grouping. 155.
\\18. Definitions (also called Macros). 159.
\\19. Conditions and Loops. 169.
-\\20. More about Macros. 175.
+\\20. More About Macros. 175.
\\21. Random Numbers. 183.
\\22. Strings. 187.
\\23. Online Displays. 191.
@@ -483,7 +502,7 @@ describing languages). Similarly, a ^{meta-font} is a schematic description
of the shapes in a family of related fonts; the letterforms change
appropriately as their underlying parameters change.
-Meta-design is much more difficult than design; it's easier to draw something
+Meta-design is much more difficult than design. It's easier to draw something
than to explain how to draw it. One of the problems is that different sets
of potential specifications can't easily be envisioned all at once.
Another is that a computer has to be told absolutely everything.
@@ -1432,7 +1451,7 @@ one pixel tall before rotation.
used with two or more points. What do you think \MF\ will do
if you ask it to perform the following commands?
\begindisplay
-@draw@ $z_1$;\ @draw@ $z_2$; \ @draw@ $z_3$; \ @draw@ $z_4$;
+@draw@ $z_1$; \ @draw@ $z_2$; \ @draw@ $z_3$; \ @draw@ $z_4$;
\ @draw@ $z_5$; \ @draw@ $z_6$.
\enddisplay
\answer Six individual points will be drawn, instead of lines or curves.
@@ -1548,9 +1567,9 @@ downward; i.e., $t$~might be unequal to~$b$ in the equations for
\begingroup\decreasehsize 165pt
\dangerexercise An enlarged \strut\vadjust{\box0}%
picture of \MF's `{\manual h}' shows that it has five key points. Assuming ^^{M}
-that special values $ss$ and~"ygap" have been precomputed and that the equations
+that special values "ss" and~"ygap" have been precomputed and that the equations
\begindisplay
-$x_1=ss=w-x_5$;\quad$y_3-y_1="ygap"$\cr
+$x_1="ss"=w-x_5$;\quad$y_3-y_1="ygap"$\cr
\enddisplay
have already been given, what further equations and `@draw@' ^^{METAFONT
logo} commands will complete the specification of this letter? \ (The
@@ -1672,7 +1691,7 @@ by $z_1\ldots z_6$.
\begindisplay
@fill@ $z_5\to z_4\to z_1\to z_3\to z_6\to\cycle$;\cr
$z_0=(.8[x_1,x_2],.5[y_1,y_4])$;\cr
-@for@ $k=1$ @upto@ 6: $z_k'=.2[z_k,z_0]$; @endfor@\cr
+@for@ $k=1$ @upto@ 6: $z[k]'=.2[z[k],z_0]$; @endfor@\cr
@unfill@ $z_5'\to z_4'\to z_1'\to z_3'\to z_6'\to\cycle$.\cr
\enddisplay
@@ -1771,7 +1790,7 @@ It's a nuisance to write long-winded @fill@ commands when broad-edge
pens are being simulated in this way, so \MF\ provides a convenient
abbreviation: You can write simply
\begindisplay
-^@penstroke@ $z_{1e}\to z_{2e}\{"right"\}\to\{"right"\}z_{3e}$
+^@penstroke@ $z_{1e}\to z_{2e}\{"right"\}\to\{"right"\}\,z_{3e}$
\enddisplay
instead of the command `\thinspace@fill@ $z_{1l}\to
z_{2l}\{"right"\}\to\{"right"\}\,z_{3l} \dashto
@@ -1825,7 +1844,7 @@ $\penpos1("stem",15)$; \ $\penpos2(.9"stem",12)$;\cr
$\penpos3("stem",10)$; \ $x_1=x_2=x_3=.5w$;\cr
$y_1=h$; \ $y_2=.55h$; \ $y_3=0$;\cr
$x_{2l}:={1\over6}[x_{2l},x_2]$;\cr
-@penstroke@ $z_{1e}\to z_{2e}\{down\}\to z_{3e}$.\cr
+@penstroke@ $z_{1e}\to z_{2e}\{"down"\}\to z_{3e}$.\cr
\enddisplay
Setting $x_1=x_2=x_3=.5w$ centers the stroke; setting $y_1=h$ and $y_3=0$
makes it sit in the type box, protruding just slightly at the top and bottom.
@@ -1927,17 +1946,17 @@ $x_{3r}=x_{6r}=w$;\cr
$y_{1r}=y_2=y_{3l}=h$;\cr
$y_{4r}=y_5=y_{6l}=0$;\cr
$z_{1'}=.25[z_1,z_6]$; \ $z_{6'}=.75[z_1,z_6]$;\cr
-$theta_1:=\angle(w,-h)+90$;\cr
-$\penpos1(b,theta_1)$; \ $\penpos6(b,theta_1)$;\cr
-$z_7=.5[z_1,z_6]$; \ $\penpos7(.6b,theta_1)$;\cr
-$\penpos{1'}(b,theta_1)$; \ $\penpos{6'}(b,theta_1)$;\cr
+$"theta"_1:=\angle(w,-h)+90$;\cr
+$\penpos1(b,"theta"_1)$; \ $\penpos6(b,"theta"_1)$;\cr
+$z_7=.5[z_1,z_6]$; \ $\penpos7(.6b,"theta"_1)$;\cr
+$\penpos{1'}(b,"theta"_1)$; \ $\penpos{6'}(b,"theta"_1)$;\cr
@penstroke@ $z_{1e}\to z_{1'e}\{z_{6'}-z_{1'}\}\to z_{7e}\to
\{z_{6'}-z_{1'}\}z_{6'e}\to z_{6e}$;\cr
$z_{3'}=.25[z_3,z_4]$; \ $z_{4'}=.75[z_3,z_4]$;\cr
-$theta_3:=\angle(-w,-h)+90$;\cr
-$\penpos3(b,theta_3)$; \ $\penpos4(b,theta_3)$;\cr
-$z_8=.5[z_1,z_6]$; \ $\penpos8(.6b,theta_3)$;\cr
-$\penpos{3'}(b,theta_3)$; \ $\penpos{4'}(b,theta_3)$;\cr
+$"theta"_3:=\angle(-w,-h)+90$;\cr
+$\penpos3(b,"theta"_3)$; \ $\penpos4(b,"theta"_3)$;\cr
+$z_8=.5[z_1,z_6]$; \ $\penpos8(.6b,"theta"_3)$;\cr
+$\penpos{3'}(b,"theta"_3)$; \ $\penpos{4'}(b,"theta"_3)$;\cr
@penstroke@ $z_{3e}\to z_{3'e}\{z_{4'}-z_{3'}\}\to z_{8e}\to
\{z_{4'}-z_{3'}\}z_{4'e}\to z_{4e}$;\cr
$\penpos2(b,0)$; \ $\penpos5(b,0)$; \ @penstroke@ $z_{2e}\to z_{5e}$.\cr
@@ -2152,7 +2171,7 @@ true, ``sharped'' forms of these parameters need to be converted to
``unsharped'' pixel-oriented quantities, and best results are obtained when
such conversions are done carefully. After \MF\ has obeyed line~7 of the
example, the pixel-oriented parameters "em", "cap", "thin", "thick",
-and~"o" are ready to be used as we draw letters of the font.
+and~$o$ are ready to be used as we draw letters of the font.
Line 8 defines a quantity called "curve\_sidebar" ^^{sidebar} that will
measure the distance of the left and right edges of the `O' from the
@@ -2164,7 +2183,7 @@ when we work at this particular resolution.
Before we go any further, we ought to discuss the strange collection
of words and pseudo-words in the file |io.mf|. Which of the terms
-`|mode_setup|', `|em|', `|curve_sidebar|' and so forth are part of
+`|mode_setup|', `|em|', `|curve_sidebar|', and so forth are part of
the \MF\ language, and which of them are made up specifically for
the Io example? Well, it turns out that almost {\sl nothing\/} in this
example is written in the pure \MF\ language that the computer understands!
@@ -2216,7 +2235,7 @@ with `|&plain \relax|' instead of just `|\relax|'. These conventions are
exactly the same as those of \TeX.
Our Ionian example uses the following words that are not part of plain
-\MF: "em", "cap", "thin", "thick", "o", "curve\_sidebar", "test\_I", "code",
+\MF: "em", "cap", "thin", "thick", $o$, "curve\_sidebar", "test\_I", "code",
"trial\_stem", "trial\_width", and "stem". If you change these to some other
words or symbols---for example, if you replace `|thin|' and `|thick|' by
`|t|' and `|T|' respectively, in lines 3, 6, 10, and~11---the results will
@@ -2437,8 +2456,10 @@ produce a font that is magnified fourfold; i.e., the results will be
The computer will read |io.mf| as before, but this time it won't display an~`O';
characters are normally not displayed in fontmaking modes, because we usually
want the computer to run as fast as possible when it's generating a font
-that has already been designed. All you'll see is `|(io.mf| |[79])|',
-followed by~`^|*|'. Now the fun starts: You should type
+that has already been designed. All you'll see is
+`|(io.mf| |The| |letter| |O| |[79])|' or possibly only `|(io.mf| |[79])|',
+followed by~`^|*|'. Now the fun starts: You should type\par
+\noindent
\begintt
code=100;
for s=7 upto 10:
@@ -2630,7 +2651,7 @@ transcripts were called |io.log|.) \ At the end of Experiment~5 you'll
have a file |badio.log| that will serve as a helpful reminder of
what errors need to be fixed up.
-The `^|?|' that appears after the context display means that \MF\ wants
+The `^|?|'\ that appears after the context display means that \MF\ wants
advice about what to do next. If you've never seen an error message before,
or if you've forgotten what sort of response is expected, you can type
`|?|' now (go ahead and try it!); \MF\ will respond as follows:
@@ -2853,7 +2874,7 @@ you want to correct mistakes. \ (Why not look at
|badio.log| now, and |io.log| too, in order to get familiar with log files?)
\dangerexercise Suppose you were doing Experiment 3 with |badio| instead
-of~|io|, so you began by saying `|\mode=smoke|; |input| |badio|'. Then you
+of~|io|, so you began by saying `|\mode=smoke;| |input| |badio|'. Then you
would want to recover from the error on line~1 by inserting a correct
@mode\_setup@ command, instead of by simply \<return>ing, because
@mode\_setup@ is what really establishes "smoke" mode. Unfortunately if you
@@ -2985,7 +3006,7 @@ slightly greater than $1\over10$). It turns out that the tokens
\dangerexercise Are the following pairs of numeric tokens equivalent
to each other, when they appear in \MF\ programs?
\ (a)~|0| and |0.00001|; \ (b)~|0.00001| and |0.00002|;
-\ (c)~|0.00002| and |0.00003|; \ (d)~|04095.999999| and |10000|?
+\ (c)~|0.00002| and |0.00003|; \ (d)~|04095.999999| and |10000|.
\answer (a) No, the second token represents $1\over65536$. \ (A token has
the same meaning as~`|0|' ^^{zero} if and only if its decimal value
is strictly less than $2^{-17}=.00000\,76293\,94531\,25$.) \ (b)~Yes; both
@@ -3001,7 +3022,7 @@ which is too big.)
the following rules until no more characters remain on the line:
\smallskip
\hang\textindent{1)}If the next character is a ^{space}, or if it's a ^{period}
-(\thinspace`|.|'\thinspace) that isn't ^^{decimal point} followed by a
+(\thinspace`|.|'\thinspace)\ that isn't ^^{decimal point} followed by a
decimal digit or a period, ignore it and move on.
\hang\textindent{2)}If the next character is a ^{percent sign}
@@ -3060,7 +3081,7 @@ computer does.
\enddisplay
\answer \cstok{xx}, \cstok{3.1} (a numeric token), \cstok{.6} (another
numeric token), \cstok{..}, \cstok{[[}, \cstok{a}, \cstok{+-},
-\cstok{bc\_d}, \cstok{e}, \cstok{]}, \cstok{]}, {\chardef\"=`\"\cstok{\"a
+\cstok{bc\char`\_d}, \cstok{e}, \cstok{]}, \cstok{]}, {\chardef\"=`\"\cstok{\"a
\%\"} (a string token), \cstok{<\|>}, \cstok{(} (see rule~5), \cstok{(},
\cstok{\$}, \cstok{1} (a numeric token), \cstok{5} (likewise numeric),
\cstok{\"+-\"} (a string token), and \cstok{\"\"}} (a string token that
@@ -3738,13 +3759,13 @@ The expression `|known|~|a|' ^^{known} is true if and only if the value
of~|a| is fully known.
\dangerexercise What causes the error messages in `|0>1|~|or|~|a<a|'\thinspace?
-\answer Since `^@or@' has stronger precedence than `$<$' or `$>$', ^^|<| ^^|>|
+\answer Since `^{or}' has stronger precedence than `$<$' or `$>$', ^^|<| ^^|>|
\MF\thinspace\ tries to evaluate this expression by putting things in
-parentheses as follows: `$(0>(1\mathbin{\bf or}a))<a$'. Now
-`$1\mathbin{\bf or}a$' makes no sense, because `@or@' operates only on
+parentheses as follows: `$(0>(1\mathbin{\rm or}a))<a$'. Now
+`$1\mathbin{\rm or}a$' makes no sense, because `or' operates only on
booleans; in such cases \MF\ uses the right operand~`$a$' as the result. Then
`$\mkern1mu0>a$' is indeterminate because $a$~is unknown; \MF\ treats this as
-false. Finally `${\rm false}<a$' is another illegal combination of types.
+@false@. Finally `$@false@<a$' is another illegal combination of types.
\danger The rest of this chapter is entirely preceded by ``dangerous bend''
signs, so you can safely omit it on first reading (unless you're hooked
@@ -3900,7 +3921,7 @@ out different each time the computer is asked for a new random number
\noalign{\vskip2pt}
uniformdeviate 100&47.4241\cr
uniformdeviate 100&97.28148\cr
-uniformdeviate -100&-36.16279\cr
+uniformdeviate -100&-36.1628\cr
(normaldeviate,normaldeviate)&(0.46236,-1.87648)\cr
\enddemo
The value of `uniformdeviate\thinspace100' is a random number between 0 and~100;
@@ -3924,17 +3945,17 @@ z scaled 3&(3x,3y)\cr
z xscaled 2 yscaled 1/2&(2x,0.5y)\cr
z shifted (2,3)&(x+2,y+3)\cr
z shifted 3right&(x+3,y)\cr
-z slanted 1/6&(x+0.16667y,y)\cr
+z slanted 1/6&(0.16667y+x,y)\cr
z rotated 90&(-y,x)\cr
z rotated 30&(-0.5y+0.86603x,0.86603y+0.5x)\cr
xpart(z rotated 30)&-0.5y+0.86603x\cr
ypart(z rotated 30)&0.86603y+0.5x\cr
(1,2)*(3,4)&(3,4)\werror\cr
(1,2)zscaled(3,4)&(-5,10)\cr
-(a,b)zscaled(3,4)&(3a-4b,4a+3b)\cr
-(a,b)zscaled dir 30&(0.86603a-0.5b,0.5a+0.86603b)\cr
+(a,b)zscaled(3,4)&(-4b+3a,3b+4a)\cr
+(a,b)zscaled dir 30&(-0.5b+0.86603a,0.86603b+0.5a)\cr
(1,2)dotprod(3,4)&11\cr
-(a,b)dotprod(3,4)&3a+4b\cr
+(a,b)dotprod(3,4)&4b+3a\cr
dir 21 dotprod dir 51&0.86603\cr
(3,4)dotprod((30,40)rotated 90)&0\cr
\enddemo
@@ -4125,9 +4146,10 @@ expressions. We shall consider only a portion of the numeric and pair
cases here, in order to have a foretaste of the complete menu:
\def\\#1{\thinspace{\tt#1}\thinspace}
\beginsyntax
-<numeric primary>\is<numeric atom>
- \alt<numeric atom>[\char'133]<numeric expression>%
- [,]<numeric expression>[\char'135]
+<numeric atom>\is<numeric variable>
+ \alt<numeric token primary>
+ \alt[(]<numeric expression>[)]
+ \alt[normaldeviate]
\alt[length]<string primary>
\alt[length]<path primary>
\alt[length]<pair primary>
@@ -4135,13 +4157,12 @@ cases here, in order to have a foretaste of the complete menu:
\alt[xpart]<pair primary>
\alt[ypart]<pair primary>
\alt<numeric operator><numeric primary>
-<numeric atom>\is<numeric variable>
- \alt<numeric token primary>
- \alt[(]<numeric expression>[)]
- \alt[normaldeviate]
<numeric token primary>\is<numeric token>[/]<numeric token>
\alt<numeric token not followed by %
`{\tt/}$\thinspace\langle$numeric token$\rangle$'\thinspace>
+<numeric primary>\is<numeric atom not followed by {[\char'133]<expression>[,]}>
+ \alt<numeric atom>[\char'133]<numeric expression>%
+ [,]<numeric expression>[\char'135]
<numeric operator>\is[sqrt]\alt[sind]\alt[cosd]\alt[mlog]\alt[mexp]
\alt[floor]\alt[uniformdeviate]\alt<scalar multiplication operator>
<scalar multiplication operator>\is<plus or minus>
@@ -4242,11 +4263,11 @@ as `|..|'.]
\endchapter
A maiden was sitting there who was lovely as any picture,
-% ein bildsch\"one Jungfrau,
+% eine bildsch\"one Jungfrau,
nay, so beautiful that no words can express it.
-% nein so sch\"on, dass es nicht so sagen ist.
+% nein so sch\"on, da\ss\ es nicht zu sagen ist,
\author JAKOB and WILHELM ^{GRIMM}, {\sl Fairy Tales\/} (1815)
- % Kinder- und hausm\"archen, vol 2, #166; translated by Margaret Hunt
+ % Kinder- und Hausm\"archen, vol 2, #166; translated by Margaret Hunt
% in Strong Hans (Der starke Hans), about 4/5 of the way through
% This quote and the next were found by online computer search at SAIL
% in the files GRIMM[lib,doc] and WUTHER[lib,doc]
@@ -4335,23 +4356,24 @@ millimeter, based on the resolution determined by "mode" and "mag".)
\\$x_4=w-.01"in"$\\
Point 4 should be one-hundredth of an inch inside the right edge of
-the type. \ (Plain \MF's ^@beginchar@ routine sets variable~^"w" equal
+the type. \ (Plain \MF's ^@beginchar@ routine sets variable~^{$w$} equal
to the width of whatever character is currently being drawn, expressed in
pixels.)
\\$y_4=.5h$\\
Point 4 should be halfway between the baseline and the top of the type.
-\ (Plain \MF's @beginchar@ sets ^"h" to the height of the
+\ (Plain \MF's @beginchar@ sets ^{$h$} to the height of the
current character, in pixels.)
\\$y_6=-d$\\
Point 6 should be below the baseline, at the bottom edge of the type.
-\ (Each character has a ``^{bounding box}'' that runs from $(0,h)$
+\ (With plain \MF's @beginchar@ each
+character has a ``^{bounding box}'' that runs from $(0,h)$
at the upper left and $(w,h)$ at the upper right to $(0,-d)$ and~$(w,-d)$
-at the lower left and lower right; variable~^"d" represents the depth of
+at the lower left and lower right; variable~^{$d$} represents the depth of
the type. The values of $w$, $h$, and~$d$ might change from character to
-character, since the individual pieces of type in a computer-produced
-font need not have the same size.)
+character, since the individual pieces of type need not have the same size
+in a computer-produced font.)
\\$y_8=.5[h,-d]$\\
Point 8 should be halfway between the top and bottom edges of the type.
@@ -4555,7 +4577,7 @@ with unknown quantities. For example, it's possible to say
^"top"\thinspace\<unknown>, ^"bot"\thinspace\<unknown>,
^"lft"\thinspace\<unknown>, ^"rt"\thinspace\<unknown>, and even
\begindisplay
-@penpos@\<suffix>(\<unknown>,\thinspace\<known>).
+"penpos"\<suffix>(\<unknown>,\thinspace\<known>).
\enddisplay
\danger A \MF\ program can say `\<unknown>$[a,b\mkern1mu]$' when $a-b$ is
@@ -4740,12 +4762,12 @@ old value of variable~$a$ should be discarded. \MF\ can't simply delete
an independent variable that has things depending on it, so it
chooses a dependent variable to take $a$'s place; the computer prints out
\begintt
-### 0.5a=-0.5b-c+1.5
+### 0.5a=-c-0.5b+1.5
\endtt
^^{hash hash hash} meaning that $0.5a$ will be replaced by $-c-{1\over2}b
+{3\over2}$ in all dependencies, before $a$ is discarded. Variable $c$ is
now independent again; `^@showdependencies@' will reveal that the only
-dependent variable is now $d$, which equals $0.75b+0.5c+0.75$. \ (This
+dependent variable is now $d$, which equals $0.5c+0.75b+0.75$. \ (This
is correct, for if the variable~$a$ is eliminated from the two given
equations we obtain $4d=3b+2c+3$.) \ The variable chosen for independence
is one that has the greatest coefficient of dependency with respect
@@ -5291,13 +5313,13 @@ end of Appendix~B.
talking about could be defined by saying
\begindisplay
@mode\_def@ "luxo" $=$\cr
-\quad$"pixels\_per\_inch":=2000$;&|%| high res, almost 30 per point\cr
-\quad$"blacker":=.1$;&|%| make pens a teeny bit blacker\cr
-\quad$"o\_correction":=1$;&|%| keep the full overshoot\cr
-\quad$"fillin":=0.1$;&|%| compensate for darkened corners\cr
-\quad$"proofing":=0$;&|%| no, we're not making proofs\cr
-\quad$"fontmaking":=1$;&|%| yes, we are making a font\cr
-\quad$"tracingtitles":=1$; \ @enddef@;&|%| yes, show titles online\cr
+\quad$"pixels\_per\_inch":=2000$;&\% high res, almost 30 per point\cr
+\quad$"blacker":=.1$;&\% make pens a teeny bit blacker\cr
+\quad$"o\_correction":=1$;&\% keep the full overshoot\cr
+\quad$"fillin":=0.1$;&\% compensate for darkened corners\cr
+\quad$"proofing":=0$;&\% no, we're not making proofs\cr
+\quad$"fontmaking":=1$;&\% yes, we are making a font\cr
+\quad$"tracingtitles":=1$; \ @enddef@;&\% yes, show titles online\cr
\enddisplay
The name of the mode should be a single symbolic token. The resolution
should be specified by assigning a value to "pixels\_per\_inch"; all other
@@ -5370,7 +5392,7 @@ end % and stop.
Similar files |logo9.mf| and |logo8.mf| will produce 9-point
`\thinspace{\manual hijklmnj}\thinspace' and \hbox{8-point}
`\thinspace{\manual opqrstuq}\thinspace'; the letters get a little
-wider in relation to their height, and the inter-character spacing
+wider in relation to their height, and the intercharacter spacing
gets significantly wider, as the size gets smaller:
\begintt
% 9-point METAFONT logo % 8-point METAFONT logo|smallskip
@@ -5409,7 +5431,7 @@ dimensions will be used in several of the programs for individual letters.
Then |logo.mf| makes the conversion to pixel units:
\begintt
% Routines for the METAFONT logo
-% (logo10.mf is a typical parameter file)
+% (logo10.mf is a typical parameter file)|smallskip
mode_setup;
ygap#:=(ht#/13.5u#)*xgap#; % vertical adjustment
leftstemloc#:=2.5u#+s#; % position of left stems
@@ -5428,8 +5450,8 @@ After the initial definitions just shown, |logo.mf| continues with
programs for each of the seven letters. For example,
here is the program for `{\manual ^{E}}', which illustrates the
\rightfig 11a ({224\apspix} x {216\apspix}) ^-11pt
-use of $u\0$, $s\0$, $"ht"\0$, "leftstemloc", "barheight", "xgap",
-and "logo\_pen":
+use of $u\0$, $s\0$, $"ht"\0$, "logo\_pen", "leftstemloc", $o$,
+"xgap", and "barheight":
\begintt
beginchar("E",14u#+2s#,ht#,0);
pickup logo_pen;
@@ -5463,7 +5485,7 @@ edge of the lower bar, and the center of the middle bar and the stem).
almost the same as `{\manual i}'\thinspace).
\answer The only possible surprise is the position of $y_1$,
which should match similar details in the `{\manual h}'
-and the~`\kern1pt{\manual j}\kern1pt' of Chapter~4:
+and the~`\kern.5pt{\manual j}\kern.5pt' of Chapter~4:
\begintt
beginchar("F",14*u#+2s#,ht#,0); pickup logo_pen;
x1=x2=x3=leftstemloc; x4=w-x1+o; x5=x4-xgap;
@@ -5473,8 +5495,8 @@ labels(1,2,3,4,5); endchar;
\endtt
\dangerexercise Write the complete programs for `{\manual h}' ^^{M} ^^{T}
-and `\kern1pt{\manual j}\kern1pt', based on the information in Chapter~4,
-but using the style of the program for `{\manual E}' above. The character
+and `\kern.5pt{\manual j}\kern.5pt', based on the information in Chapter~4,
+but using the style of the program for `{\manual i}' above. The character
widths should be $18u\0+2s\0$ and $13u\0+2s\0$, respectively.
\checkequals\metaT\exno
\answer The quantity called "ss" in Chapter~4 is now "leftstemloc".
@@ -5492,11 +5514,11 @@ labels(1,2,3,4); endchar;
\endtt
\danger The file |logo.mf| also contains the following cryptic instructions,
-which cause the letter pairs `\kern1pt{\manual jk}' and `{\manual lm}' to
+which cause the letter pairs `\kern.5pt{\manual jk}' and `{\manual lm}' to
be typeset closer together than their bounding boxes would imply:
\begintt
ligtable "T": "A" kern -.5u#;
-ligtable "F": "O" kern -u#;|smallskip
+ligtable "F": "O" kern -u#;
\endtt
Without these corrections `\MF\kern1pt' would be ^^{kerning} ^^@kern@
`{\manual hij\/kl\/mnj}\kern1pt'. Uppercase letters are often subject to
@@ -5637,7 +5659,7 @@ if known pixmag: hppp:=pixmag*hppp; vppp:=pixmag*vppp; fi
\endtt
at the very end of that file. Then run \MF\ with
\begintt
-\mode="cheapo"; input cheaplogo10
+\mode=cheapo; input cheaplogo10
\endtt
where the file `|cheaplogo10.mf|' says simply `|pixmag=10;| |input| |logo10|'.
\ (The interim "hppp" setting and the ^@special@ command are
@@ -5685,7 +5707,7 @@ typeset by putting such boxes snugly next to each other.
The main difference
between the old conventions and the new~ones is that type boxes are now
allowed to vary in height as well as in width. For example, when \TeX\
-typesets `A~line~of~type.' it puts boxes together that essentially look
+typesets `A~line~of~type.'\ it puts boxes together that essentially look
like this: `\thinspace\demobox{A line of type.}\thinspace'. \ (The `A'
appears in a box `\thinspace\setbox0\hbox{A}\maketypebox\thinspace' that
sits on a given baseline, while the `y' appears in a box
@@ -5781,7 +5803,7 @@ new equipment.
The three dimensions in a @beginchar@ command are given in reverse
alphabetical order: First comes the width, then the height, then the depth.
The @beginchar@ routine converts these quantities into pixel units
-and assigns them to the three variables ^"w", ^"h", and~^"d". In fact,
+and assigns them to the three variables ^{$w$}, ^{$h$}, and~^{$d$}. In fact,
@beginchar@ rounds these dimensions to the nearest whole number of
pixels; hence $w$, $h$, and~$d$ will always be integers.
@@ -6044,15 +6066,15 @@ much larger fonts.)
\smallskip\textindent\bull^"chardx" and "chardy" represent horizontal and
vertical {\sl escapement\/} in units of pixels. \ (Some typesetting
-systems use both of these device-dependent amounts to change their current
+systems use both of these device-dependent amounts to alter their current
position on a page, just after typesetting each character. Other systems,
-like the ^|dvi| software associated with \TeX, assume that $"chardy"=0$
+like typical ^|dvi| software associated with \TeX, assume that $"chardy"=0$
but use "chardx" as the horizontal escapement whenever a horizontal
movement by "chardx" does not cause the subsequent position to ^{drift}
too far from the device-independent position defined by accumulated
"charwd" values. Plain \MF's @endchar@ routine keeps $"chardy"=0$, but
sets $"chardx":=w$ just before shipping a character to the output. This
-explains why a change to~^"w" will affect the spacing between adjacent
+explains why a change to~^{$w$} will affect the spacing between adjacent
letters, as discussed earlier.) \looseness=-1
\ddanger Two characters with the same $c$ code
@@ -6069,7 +6091,7 @@ exactly $11\pt$ apart. Therefore it extends below its baseline by $11\pt$;
but it is put into a box of depth zero, because \TeX\ would otherwise
think that the first line of the paragraph contains an extremely deep
character, and such depth would cause the second line to be moved down.
-$$\def\comment{\hfill{\tt\%} }
+$$\def\comment{\hfill{\%} }
\halign{\hbox to\hsize{\indent#\hfil}\cr
$"baselinedistance"\0:=11"pt"\0$; \ ^@define\_pixels@("baselinedistance");\cr
$"heavyline"\0:=50/36"pt"\0$; \ ^@define\_blacker\_pixels@("heavyline");\cr
@@ -6496,16 +6518,16 @@ the ``back'' square is drawn; then two lines of the ``front'' square are
erased, using a somewhat thicker pen; finally the remaining lines are
drawn with the ordinary pen:
\begindisplay
-$s\0:=5"pt"\0$; \ @define\_pixels@$(s)$; \ |%| side of the square\cr
-$z_1=(0,0)$; \ $z_2=(s,0)$; \ $z_3=(0,s)$; $z_4=(s,s)$;\cr
-^@for@ $k=1$ @upto@ 4: $z_{k+4}=z_k+({2\over3}s,{1\over3}s)$; \ @endfor@\cr
+$s\0:=5"pt"\0$; \ @define\_pixels@$(s)$; \ \% side of the square\cr
+$z_1=(0,0)$; \ $z_2=(s,0)$; \ $z_3=(0,s)$; \ $z_4=(s,s)$;\cr
+^@for@ $k=1$ @upto@ 4: $z[k+4]=z[k]+({2\over3}s,{1\over3}s)$; \ @endfor@\cr
\pickup @pencircle@ scaled $.4"pt"$; \
@draw@ $z_5\dashto z_6\dashto z_8\dashto z_7\dashto \cycle$;\cr
\pickup @pencircle@ scaled $1.6"pt"$; \
@erase@ @draw@ $z_2\dashto z_4\dashto z_3$;\cr
\pickup @pencircle@ scaled $.4"pt"$; \
@draw@ $z_1\dashto z_2\dashto z_4\dashto z_3\dashto \cycle$;\cr
-@for@ $k=1$ @upto@ 4: @draw@ $z_k\dashto z_{k+4}$; \ @endfor@.\cr
+@for@ $k=1$ @upto@ 4: @draw@ $z[k]\dashto z[k+4]$; \ @endfor@.\cr
\enddisplay
At its true size the resulting ^{cube} looks like this:
`\thinspace{\manual\cubea}\thinspace'.\par}
@@ -6527,7 +6549,7 @@ points and picking up the pen as before:
@cullit@; \ \pickup @pencircle@ scaled $.4"pt"$;\cr
@draw@ $z_3\dashto z_1\dashto z_2\dashto z_4$; \
@draw@ $z_5\dashto z_7\dashto z_8\dashto z_6$;\cr
-@for@ $k=1$ @upto@ 4: \ @draw@ $z_k\dashto z_{k+4}$; \ @endfor@.\cr
+@for@ $k=1$ @upto@ 4: \ @draw@ $z[k]\dashto z[k+4]$; \ @endfor@.\cr
\enddisplay
(Note that it would not be quite enough to erase only from $z_7$ to
${1\over3}[z_7,z_5]$!)\par
@@ -6569,7 +6591,7 @@ five points connected by ``tense'' lines as follows:
\begindisplay
@pair@ "center"; \ $"center"=(.5w,2"pt")$;\cr
@numeric@ "radius"; \ $"radius"=5"pt"$;\cr
-@for@ $k=0$ @upto@ 4: \ $z_k="center"+("radius",0)$
+@for@ $k=0$ @upto@ 4: \ $z[k]="center"+("radius",0)$
^{rotated}$(90+{360\over5}k)$; \ @endfor@\cr
@def@ :: = ^^{tension} $\to\tension 5\to$ @enddef@;\cr
@path@ "star"; \ $"star"=z_0::z_2::z_4::z_1::z_3::\cycle$;\cr
@@ -6585,10 +6607,10 @@ exercise:
\pickup @pencircle@ scaled $.4"pt"$; \ @draw@ "star";\cr
@cullit@; \ \pickup @pencircle@ scaled $1.6"pt"$;\cr
@for@ $k=0$ @upto@ 4:
- \ @undraw@ subpath$(k+.55,k+.7)$ @of@ "star"; \ @endfor@\cr
+ \ @undraw@ subpath$(k+.55,k+.7)$ of "star"; \ @endfor@\cr
@cullit@; \ \pickup @pencircle@ scaled $.4"pt"$;\cr
-@for@ $k=0$ @upto@ 4: \ @draw@ subpath$(k+.47,k+.8)$ @of@ "star"; \ @endfor@\cr
-@labels@(0,1,2,3,4); \ @endchar@.\cr
+@for@ $k=0$ @upto@ 4: \ @draw@ subpath$(k+.47,k+.8)$ of "star"; \ @endfor@\cr
+@labels@$(0,1,2,3,4)$; \ @endchar@.\cr
\enddisplay
However, as in the previous case, there's an Alternate Solution~1
by Bruce ^{Leban} that is preferable because it doesn't depend
@@ -6598,10 +6620,10 @@ on magic constants like .55 and~.47:
@picture@ "savedpicture"; \ $"savedpicture"=@nullpicture@$;\cr
@pen@ "eraser"; \ $"eraser":=@pencircle@$ scaled $1.6"pt"$;\cr
@for@ $k=0$ @upto@ 4:\cr
-\indent @draw@ subpath$(k,k+1)$ @of@ "star"; @cullit@;\cr
-\indent @undraw@ subpath$(k+3,k+4)$ @of@ "star" @withpen@ "eraser"; @cullit@;\cr
+\indent @draw@ subpath$(k,k+1)$ of "star"; @cullit@;\cr
+\indent @undraw@ subpath$(k+2,k+3)$ of "star" @withpen@ "eraser"; @cullit@;\cr
\indent @addto@ "savedpicture" @also@ "currentpicture"; @clearit@; @endfor@\cr
-$"currentpicture":="savedpicture"$; \ @labels@(0,1,2,3,4); \ @endchar@.\cr
+$"currentpicture":="savedpicture"$; \ @labels@$(0,1,2,3,4)$; \ @endchar@.\cr
\enddisplay
\dangerexercise What does the command `@fill@ "star"' do, if "star" is the
@@ -6620,7 +6642,7 @@ example, in the program
@path@ $S$; \ $S=((0,1)\to(2,0)\to(4,2)\to$\cr
\indent$(2,5.5)\to(0,8)\to(2,10)\to(3.5,9))$ scaled $9"pt"$;\cr
@for@ $k=0$ @upto@ 35: @overdraw@ ^"fullcircle" scaled 3"mm"\cr
-\indent shifted ^{point} $k/35\ast \mathop{\rm length} S$ @of@ $S$;
+\indent shifted ^{point} $k/35\ast \mathop{\rm length} S$ of $S$;
@endfor@\cr
\enddisplay
to create the curious ^{S} shown here.)
@@ -6635,7 +6657,7 @@ Explain how to produce it (or something very similar) with \MF\!.
exercise so that it applies to arbitrary cycles~$c$, even those that are
self-intersecting:
\begindisplay
-@def@ @overdraw@ @expr@ $c$ = ^@begingroup@\cr
+@def@ @overdraw@ @expr@ $c$ = ^@begingroup@ @save@ "region";\cr
\indent@picture@ "region"; $"region":=@nullpicture@$;\cr
\indent^@interim@ $"turningcheck":=0$; ^@addto@ "region" @contour@ $c$;\cr
\indent^@cull@ "region" @dropping@ $(0,0)$;\cr
@@ -6647,12 +6669,12 @@ self-intersecting:
\ The watchband is now formed by overdrawing its links, one at a time,
doing first the ones that are underneath:
\begindisplay
-@beginchar@$("M",1.25"in"\0,.5"in"\0,0)$; \
+@beginchar@$(|"M"|,1.25"in"\0,.5"in"\0,0)$; \
\pickup @pencircle@ scaled .4"pt";\cr
-$z_1=(20,-13)$; \ $z_2=(30,-6)$; \ $z_3=(20,1)$; $z_4=(4,-7)$;\cr
+$z_1=(20,-13)$; \ $z_2=(30,-6)$; \ $z_3=(20,1)$; \ $z_4=(4,-7)$;\cr
\indent $z_5=(-12,-13)$; \ $z_6=(-24,-4)$; \ $z_7=(-15,6)$;\cr
-@path@ $M$; $M=("origin"\to z1\to z2\to z3\to z4\to z5\to z6\to z7\to$\cr
-\indent$"origin"\to -z7\to -z6\to -z5\to -z4\to -z3\to -z2\to -z1\to\cycle)$\cr
+@path@ $M$; $M=("origin"\to z_1\to z_2\to z_3\to z_4\to z_5\to z_6\to z_7\to$\cr
+\indent$"origin"\to -z_7\to -z_6\to -z_5\to -z_4\to -z_3\to -z_2\to -z_1\to\cycle)$\cr
^^"origin" \indent\indent scaled $(h/26)$ shifted $(.5w,.5h)$;\cr
@def@ @link@(@expr@ $n$) =\cr
\indent @overdraw@ subpath ${1\over3}(n,n+1)$ of $M\;\dashto$\cr
@@ -6685,11 +6707,11 @@ heads this paragraph was made by substituting the following code for
the `@endchar@' in the program at the end of Chapter~12:
\begindisplay
@picture@ "dbend"; \ $"dbend"="currentpicture"$;\cr
-@endchar@; \ |%| end of the normal dangerous bend sign\cr
+@endchar@; \ \% end of the normal dangerous bend sign\cr
@beginchar@$(0,25u\0,"h\_height"\0+"border"\0,0)$;\cr
@fill@ $(0,-11"pt")\dashto(w,-11"pt")\dashto(w,h)\dashto(0,h)\dashto\cycle$;\cr
$"currentpicture":="currentpicture"-"dbend"$;\cr
-@endchar@;\ |%| end of the reversed dangerous bend sign\cr
+@endchar@;\ \% end of the reversed dangerous bend sign\cr
\enddisplay
^^{black/white reversal} The pixel values in "dbend" are all zero or more;
thus the pixels with a positive value, after "dbend" has been subtracted from
@@ -6706,7 +6728,7 @@ shifts the entire current picture three pixels to the right.
\danger There's a ``constant'' picture called ^@nullpicture@, whose pixel
values are all zero;
plain \MF\ defines `^@clearit@' to be an abbreviation for the
-assignment `"currentpicture":=@nullpicture@'. The current picture is
+assignment `$"currentpicture":=@nullpicture@$'. The current picture is
cleared automatically by every ^@beginchar@ and ^@mode\_setup@ command,
so you usually don't have to say `@clearit@' in your own programs.
@@ -6966,7 +6988,7 @@ and the pen is simple, the weight~$w$ is changed to~$-w$. If the turning
number is negative and the pen is complex, you get an error message about
a ``^{backwards path}.'' Finally, if the turning number is zero, you get
an error message about a ``^{strange path},'' unless the pen is simple and
-$"turningcheck"<=1$. Plain \MF\ sets $"turningcheck":=2$; the ^@filldraw@
+$"turningcheck"\le1$. Plain \MF\ sets $"turningcheck":=2$; the ^@filldraw@
macro in Appendix~B avoids the ``backwards path'' error by explicitly
reversing a path whose turning number is negative.
@@ -7098,7 +7120,7 @@ never stops with a ``^{strange path}'' error; furthermore, it never increases
a pixel value by more than~1, nor does it decrease any pixel values, even
when the cycle~$c$ is quite wild.)
\answer @vardef@ @safefill@ @expr@ $c$ $=$ ^@save@ "region";\parbreak
-\quad@picture@ "region"; "region"=@nullpicture@;\parbreak
+\quad@picture@ "region"; $"region"=@nullpicture@$;\parbreak
\quad^@interim@ ^"turningcheck"$\null:=0$;\parbreak
\quad @addto@ "region" @contour@ $c$; \
@cull@ "region" @dropping@ $(0,0)$;\parbreak
@@ -7128,10 +7150,10 @@ generations on your screen.
\answer (We assume that "currentpicture" initially has some configuration
in which all pixel values are zero or one; one means ``alive.'')
\begindisplay
-@picture@ $v$; @def@ "c" $=$ "currentpicture" @enddef@;\cr
+@picture@ $v$; @def@ $c$ $=$ "currentpicture" @enddef@;\cr
@forever@: \ $v:=c$; \ @showit@;\cr
-\quad @addto@ $c$ @also@ $c$ shifted "left" $+$ "c" shifted "right";\cr
-\quad @addto@ $c$ @also@ $c$ shifted "up" $+$ "c" shifted "down";\cr
+\quad @addto@ $c$ @also@ $c$ shifted "left" $+$ $c$ shifted "right";\cr
+\quad @addto@ $c$ @also@ $c$ shifted "up" $+$ $c$ shifted "down";\cr
\quad @addto@ $c$ @also@ $c-v$; \ @cull@ $c$ @keeping@ $(5,7)$; \ @endfor@.\cr
\enddisplay
(It is wise not to waste too much computer time watching this program.)
@@ -7178,13 +7200,13 @@ therefore produces the character `\kern1pt{\manual\circa}' in position
\exercise
Write a program that puts a {\sl filled\/} quarter-circle
-`\kern1pt{\manual\circb}' into font position~`{\tt b}'.
+`\kern1pt{\manual\circb}'\ into font position~`{\tt b}'.
\answer @beginchar@\kern1pt(|"b"|$,5"pt"\0,5"pt"\0,0)$;\parbreak
@fill@ $((0,0)\dashto"quartercircle"\dashto{\rm cycle})$
scaled 10"pt"; \ @endchar@.
\exercise
-Why are the `\kern1pt{\manual\circa}' and `\kern1pt{\manual\circb}'
+Why are the `\kern1pt{\manual\circa}' and `\kern1pt{\manual\circb}'\
characters of these examples only $5\,$pt wide and $5\,$pt high, although
they are made with the path `"quartercircle" scaled 10"pt"'?
\answer A "quartercircle" corresponds to a circle whose diameter
@@ -7498,8 +7520,8 @@ than to repeat points of a path.
\ddanger Sometimes it's desirable to take a path and change all its
connecting links to `$\ddashto$', regardless of what they were originally;
-the key points are left unchanged. Plain \MF\ has a ^"tensepath" operation
-that does this. For example, "tensepath"~"unitsquare"~$=$
+the key points are left unchanged. Plain \MF\ has a ^@tensepath@ operation
+that does this. For example, @tensepath@~"unitsquare"~$=$
$(0,0)\ddashto(1,0)\ddashto(1,1)\ddashto(0,1)\ddashto\cycle$.
When \MF\ is deciding what curves should be drawn in place of `$\to$' or
@@ -7632,7 +7654,8 @@ An empty direction specifier at the beginning or end of a path, or just next
to the `\&' operator, is effectively replaced by `$\{\curl1\}$'.
This rule should be interpreted properly with respect to cyclic paths, which
have no beginning or end; for example, `$z_0\to z_1\,\&\,z_1\to z_2\to\cycle$'
-is equivalent to `$z_0\to z_1\{\curl1\}\&\{\curl1\}z_1\to z_2\to\cycle$'.
+is equivalent to
+`$z_0\to z_1\{\curl1\}\thinspace\&\thinspace\{\curl1\}z_1\to z_2\to\cycle$'.
\danger If there's a nonempty direction specifier after a point but not
before it, the nonempty one is copied into both places. Thus, for example,
@@ -7860,7 +7883,7 @@ in the range $0\le t<n$.
\ddangerexercise True or false:\quad point $t$ of $(z_0\dashto z_1)$ $=$
$t[z_0,z_1]$.
\answer True if $0\le t\le1$, except perhaps for rounding errors;
-otherwise false. The path $z_0\dashto z_1$ expands into `$z_0\to
+otherwise false. The path $z_0\dashto z_1$ is equivalent to `$z_0\to
\controls1/3[z_0,z_1]\and2/3[z_0,z_1]\to z_1$', and the ^{Bernshte\u\i n}
polynomial simplifies because $t[w,w+\delta,w+2\delta,w+3\delta]=w+3t\delta$.
Incidentally, `point~$t$ of $(z_0\ddashto z_1)$' is usually quite
@@ -7945,7 +7968,7 @@ given any paths $p$ and~$q$ of length~$n$. It can be defined by a
fairly simple program:
\begindisplay
@vardef@ "interpath"(@expr@ $a,p,q) =$\cr
-\quad @for@ $t=0$ @upto@ length$\,p\;-1$: $a$[point $t$ of $p,\,$
+\quad @for@ $t=0$ @upto@ length$\,p-1$: $a$[point $t$ of $p,\,$
point $t$ of $q$]\cr
\qquad$\to\controls$ $a$[postcontrol $t$ of $p,\,$
postcontrol $t$ of $q$]\cr
@@ -7979,7 +8002,7 @@ $p=(100,0)\dashto(300,0)\dashto(200,0)\dashto(100,0)\dashto(0,0)
\enddisplay
notice that "interpath" doesn't necessarily preserve smoothness at the key
points. The right illustration was obtained by duplicating point
-$(100,0)$ in~$heart$ (thereby making it a path of length~7) and taking
+$(100,0)$ in~"heart" (thereby making it a path of length~7) and taking
\begindisplay
$p=(100,200)\dashto(200,200)\dashto(200,100)$\cr
\qquad$\dashto(200,0)\dashto(0,0)\dashto(0,100)\dashto(0,200)\dashto(100,200)$.
@@ -8070,7 +8093,7 @@ $p$~never turns to the right. Paths with cusps are numerically unstable,
and they might become ``^{strange}'' after transformations are applied,
because rounding errors might change their ^{turning numbers}. The path~$p$
in this example has control points that correspond to tensions of only
-0.28 with respect to the initial and final directions; since \MF\ insists
+about 0.28 with respect to the initial and final directions; since \MF\ insists
that ^{tension}s be at least~0.75, this anomalous path could never have arisen
if the control points hadn't been given explicitly.
@@ -8200,7 +8223,7 @@ $$\halign{\hbox to\parindent{\hfil\sevenrm#\ \ \ }&#\hfil\cr
(z_{5e},z_{6e},z_{7e},z_{8e},.72)$; \ @endfor@\cr
11&$\penpos{a1}("thin",0)$; \ $\penpos{a5}("whatever",-90)$; \
$\penpos{a9}("thin",180)$;\cr
-12&$x_{a1l}-x_{a9l}=1/3(x_{5l}-x_{7l})$;\ $x_{a5}=.5w$; \
+12&$x_{a1l}-x_{a9l}=1/3(x_{5l}-x_{7l})$; \ $x_{a5}=.5w$; \
$y_{a1}=y_{a9}$; \ $y_{a5r}=4/7h$;\cr
13&$x_{a3l}=x_{a1l}$; \ $x_{a3r}=x_{a1r}$; \ $x_{a4r}=1/6[x_{a3r},x_{1l}]$; \
$x_0=.5w$; \ $y_0=.52h$;\cr
@@ -8415,7 +8438,7 @@ call \MF's transformers ``^{affine transformations},'' and the special case in
which the xpart and ypart are zero is called ``^{homogeneous}.'')
\danger In order to have some transform variables to work with, it's necessary
-to `^{hide}' some declarations and commands before giving the next |expr|s:
+to ``^{hide}'' some declarations and commands before giving the next |expr|s:
\begindemo{175pt}
\demohead
hide(transform t[]) t1&(xpart t1,ypart t1,xxpart...)\cr
@@ -8458,7 +8481,7 @@ transform. What can you legally say instead?
a normal dangerous bend sign, as in the ``reverse-video'' example
of Chapter~13. Explain how to transform it into the ^{left-handed
dangerous bend} that heads this paragraph.
-\answer @beginchar@$(126,25u\0,"hheight"\0+"border"\0,0)$;
+\answer @beginchar@$(126,25u\0,"h\_height"\0+"border"\0,0)$; \
|"Dangerous left bend"|;\parbreak
$"currentpicture":="dbend"$ reflectedabout $\bigl((.5w,0),(.5w,h)\bigr)$; \
@endchar@;\medskip\noindent
@@ -8537,14 +8560,14 @@ instead of $p$ itself. We haven't mentioned this before, because
"currenttransform" is usually equal to "identity"; but nonstandard
settings of "currenttransform" can be used for special effects that
are occasionally desired. For example, it's possible to change
-`\MF\kern1pt' to `{\manual 89:;<=>:}\kern3pt' by simply saying
+`\MF\kern1pt' to `{\manual 89:;<=>:}\kern2pt'\ by simply saying
\begindisplay
$"currenttransform":="identity"$ slanted 1/4
\enddisplay
and executing the programs of |logo.mf| that are described in Chapter~11;
no other changes to those programs are necessary.
-It's worth noting that the pen nib used to draw `{\manual 89:;<=>:}\kern3pt'
+It's worth noting that the pen nib used to draw `{\manual 89:;<=>:}\kern2pt'\
was not slanted when "currenttransform" was changed; only the ``tracks'' of
the pen, the paths in @draw@ commands, were modified. Thus the slanted image
was not simply obtained by slanting the unslanted image.
@@ -8553,7 +8576,7 @@ was not simply obtained by slanting the unslanted image.
plain \MF\ will set "currenttransform" to `"identity" yscaled
^"aspect\_ratio"', and ^@pickup@ will similarly yscale the pen nibs
that are used for drawing. In this case the slanted
-`{\manual 89:;<=>:}\kern3pt' letters should be drawn with
+`{\manual 89:;<=>:}\kern2pt'\ letters should be drawn with
\begindisplay
$"currenttransform":="identity"$ slanted 1/4 yscaled "aspect\_ratio".
\enddisplay
@@ -8561,10 +8584,12 @@ $"currenttransform":="identity"$ slanted 1/4 yscaled "aspect\_ratio".
\ddangerexercise Our program for
`\kern1pt\lower2.5pt\hbox{\manual\fouru}\kern1pt' doesn't work when pixels
aren't square. Fix it so that it handles a general "aspect\_ratio".
-\answer Replace line 10 by
+\answer Replace lines 10 and 11 by
\begindisplay
@pickup@ @pencircle@ scaled 3/4"pt" yscaled 1/3 rotated $-60$;\cr
@draw@ ($z_1\ldots p$) transformed $t$;\cr
+@addto@ "currentpicture" @also@ "currentpicture"\cr
+\qquad rotatedaround$\bigl((.5w,.5h)$ yscaled "aspect\_ratio"$,-180\bigr)$;\cr
\enddisplay
\endchapter
@@ -8786,7 +8811,7 @@ offsets of a pen.
in Chapter~15, it changes into an ellipse of some sort, since all of
\MF's transformations preserve ellipse-hood. The diameter of the
ellipse in each direction~$\theta$ is decreased by $2\min\bigl(
-\vert\sin\theta\vert,\vert\cos\theta\vert\bigr)$ times the current
+\vert{\sin\theta}\vert,\vert{\cos\theta}\vert\bigr)$ times the current
value of~^"fillin", before converting to a polygon; this helps to
compensate for the variation in thickness of diagonal strokes with
respect to horizontal or vertical strokes, on certain output devices.
@@ -8965,7 +8990,7 @@ how to put programs together effectively.
A \MF\ program is a sequence of statements separated by semicolons and
followed by `^@end@'. More precisely, the syntax rules
\beginsyntax
-<program>\is<statement list>[end]
+<program>\is<statement list><statement>[end]
<statement list>\is<empty>\alt<statement>[;]<statement list>
\endsyntax
define a \<program> in terms of a \<statement>.
@@ -9076,7 +9101,7 @@ complicated things while in the middle of other calculations, thereby
greatly increasing the power of macro definitions (which we shall study
in the next chapter). A {\sl^{group expression}\/} has the general form
\begindisplay
-{\tt begingroup}\thinspace\<statement list>\thinspace\<expression>
+{\tt begingroup}\thinspace\<statement list>\thinspace\<expression>%
\thinspace{\tt endgroup}
\enddisplay
and it fits into the syntax of expressions at the primary level. The
@@ -9115,9 +9140,9 @@ right, performing the statements within groups as they appear.
\dangerexercise Appendix B defines ^"whatever" to be an abbreviation for
the group expression `@begingroup@ @save@ ?; ? @endgroup@'. Why
does this work? \checkequals\Xwhat\exno
-\answer The save instruction gives `?' a fresh meaning, hence `?' is
+\answer The save instruction gives `?'\ a fresh meaning, hence `?'\ is
a numeric variable unconnected to any other variables. When the group
-ends and `?' is restored to its old meaning, the value of the group
+ends and `?'\ is restored to its old meaning, the value of the group
expression no longer has a name. \ (It's called a ``^{capsule}'' if
you try to @show@ it.) \ Therefore the value of the group expression
is a new, nameless variable, as desired.
@@ -9220,11 +9245,11 @@ diagnose the reasons for unexpected behavior. If you say
`^"tracingmacros"$\null:=1$', the transcript file of your run will record
every macro that is subsequently expanded, followed by the values of its
arguments as soon as they have been computed.
-For example, `rotatedaround$\,("up",30)$' might produce the
-^^|EXPR0| following lines of diagnostic information:
+For example, `rotatedaround$\,("up",30)$' might produce a transcript
+^^|EXPR0| that includes the following diagnostic information:
\begintt
-rotatedaround(EXPR0)(EXPR1)->shifted-(EXPR0)rotated(EXPR1)sh
-ifted(EXPR0)
+rotatedaround(EXPR0)(EXPR1)->
+ shifted-(EXPR0)rotated(EXPR1)shifted(EXPR0)
(EXPR0)<-(0,1)
(EXPR1)<-30
\endtt
@@ -9253,7 +9278,7 @@ Chapter~11 starts with
\begintt
beginchar("E",14u#+2s#,ht#,0); pickup logo_pen;
\endtt
-and the programs for `{\manual M}', `\kern1pt{\manual T}\kern1pt',
+and the programs for `{\manual M}', `\kern.5pt{\manual T}\kern.5pt',
etc., all have almost the same beginning. Therefore we might as
well put the following definition near the top of the file |logo.mf|:
\begintt
@@ -9400,7 +9425,7 @@ regions $(z_{\$a},z_{\$l},z_{\$b})$ and $(z_{\$\mkern-1muf},z_{\$r},z_{\$e})$
\quad $z_{\$a}-z_{\$l}=z_{\$\mkern-1muf}-z_{\$r}=
("bracket"/{\rm abs\,sind}\,"theta")\ast {\rm dir}\,"theta"$;\cr
\quad $y_{\$c}=y_{\$d}$; \ $y_{\$b}=y_{\$e}=y_\$$; \
- $y_{\$b}-y_{\$c}=@if@\;"theta"<0:\;{-}\;@fi@\;"slab"$;\cr
+ $y_{\$b}-y_{\$c}=@if@\;"theta"<0\colon\;{-}\;@fi@\;"slab"$;\cr
\quad $x_{\$b}=x_{\$c}=x_{\$l}-"left\_jut"$; \
$x_{\$d}=x_{\$e}=x_{\$r}+"right\_jut"$;\cr
\quad @labels@$(\$a,\$b,\$c,\$d,\$e,\$\mkern-1muf)$ @enddef@;\cr
@@ -9446,7 +9471,7 @@ by which serifs protrude on a ``normal'' letter like `H'.
\displayfig 18c (252\apspix)
$$\halign to\hsize\bgroup\indent#\hfil\tabskip1em plus1fil minus1fil
&\tabskip0pt\hfil\%\ #\cr
-@beginchar@\kern1pt(|"A"|$,13u\0,ht\0,0)$;\cr
+@beginchar@\kern1pt(|"A"|$,13u\0,"ht"\0,0)$;\cr
$z_1=(.5w,1.05h)$;&top point\cr
$x_{4l}=w-x_{5r}=u$; \ $y_{4l}=y_{5r}="slab"$;&bottom points\cr
@numeric@ $"theta"[\,]$;\cr
@@ -9468,11 +9493,11 @@ $z_3="whatever"[z_1,z_{5l}]$;\cr
@penstroke@ $z_{2e}\dashto z_{3e}$;&the crossbar\cr
@penlabels@$(0,1,2,3,4,5)$; \ @endchar@;\cr
\noalign{\medskip}
-@beginchar@\kern1pt(|"I"|$,6u\0,ht\0,0)$;\cr
+@beginchar@\kern1pt(|"I"|$,6u\0,"ht"\0,0)$;\cr
$x_1=x_2=.5w$;\cr
$y_1=h-y_2$; \ $y_2="slab"$;\cr
-"serif"$(1,"thick",-90,1.1jut,1.1jut)$;&upper serifs\cr
-"serif"$(2,"thick",90,1.1jut,1.1jut)$;&lower serifs\cr
+"serif"$(1,"thick",-90,1.1jut,1.1"jut")$;&upper serifs\cr
+"serif"$(2,"thick",90,1.1jut,1.1"jut")$;&lower serifs\cr
@fill@ $"serif\_edge"_2\dashto{\rm reverse}\,"serif\_edge"_1\dashto\cycle$;
&the stroke\cr
@penlabels@$(1,2)$; \ @endchar@;\cr
@@ -9606,7 +9631,7 @@ idea to embed these details in another macro.)
\ddangerexercise Write the program for an |"H"| to go with these letters.
\answer \rightfig A18c (48mm x 45mm) ^10pt
-@beginchar@\kern1pt(|"H"|$,13u\0,"ht"\0,0)$;\parbreak
+@beginchar@\kern1pt(|"H"|$,13u\0,"ht"\0,0)$; \ @pickup@ "broad\_pen";\parbreak
$x_1=x_2=x_5=3u$;\parbreak
$x_3=x_4=x_6=w-x_1$;\parbreak
$y_1=y_3=h$; \ $y_2=y_4=0$;\parbreak
@@ -9616,7 +9641,7 @@ $"top\_serif"(3,"xx",-90,"jut","jut")$;\parbreak
$"bot\_serif"(4,"xx",90,"jut","jut")$;\parbreak
@filldraw@ $"bot\_serif\_edge"_2$\parbreak
\quad$\dashto{\rm reverse}\,"top\_serif\_edge"_1\dashto\cycle$;\parbreak
-@fill@ $"bot\_serif\_edge"_4$\parbreak
+@filldraw@ $"bot\_serif\_edge"_4$\parbreak
\quad$\dashto{\rm reverse}\,"top\_serif\_edge"_3\dashto\cycle$;\parbreak
$y_5=y_6=.52h$; \ @draw@ $z_5\dashto z_6$;\parbreak
@penlabels@$(1,2,3,4,5,6)$; \ @endchar@.
@@ -9657,7 +9682,8 @@ set of rules for macro definitions. Here is the syntax:
(We'll discuss ^\<vardef heading> and ^\<leveldef heading> in Chapter~20.)
\ The basic idea is that we name the macro to be defined, then we name
zero or more delimited parameters (i.e., parameters in parentheses),
-then we name zero or more undelimited parameters. Then comes an `$=$'~sign,
+then we name zero or one or two undelimited parameters.
+Then comes an `$=$'~sign,
followed by the replacement text, and @enddef@. The `$=$'~sign might also
be~`$:=$'\thinspace; both mean the same thing.
@@ -9768,7 +9794,7 @@ undelimited @primary@, @secondary@, @tertiary@, or @expr@ is the
longest syntactically correct ^\<primary>, ^\<secondary>, ^\<tertiary>,
or ^\<expression> that immediately follows the delimited arguments.
An undelimited `@expr@~$x$~^{of}~$y$' specifies two arguments, found
-by taking the longest syntactically correct \<expression>~of~\<primary>.
+by taking the longest syntactically correct `\<expression>~of~\<primary>'.
In each of these cases, the expression might also be preceded by an
optional `^{=}' or~`^{:=}'. An undelimited @suffix@ is the longest
\<suffix> that immediately follows the delimited arguments; \MF\ also
@@ -9809,7 +9835,7 @@ to start executing statements. When that has been done, the final
statement turns out to be \<empty>, so the argument to "gobble"
turns out to be a ^{vacuous} expression (cf.\ Chapter~25). Finally,
"gobble"'s replacement text is empty, so the hidden text has indeed
-disappeared. \ (The "hide" macro in Appendix~B is actually a bit
+disappeared. \ (The @hide@ macro in Appendix~B is actually a bit
more efficient, but a bit trickier.)
\endchapter
@@ -9878,13 +9904,13 @@ includes the conditional~command
whose effect is to set "mag" equal to 1 if it hasn't already received
a value; in this case there's only one alternative.
-\exercise Would it be wrong to put the `;' after the `@fi@' in the example
+\exercise Would it be wrong to put the `;'\ after the `@fi@' in the example
just given?
-\answer Then \MF's ``stomach'' would see `;' if "mag" is known, but there
+\answer Then \MF's ``stomach'' would see `;'\ if "mag" is known, but there
would be no change if "mag" is unknown. An extra semicolon is harmless,
since \MF\ statements can be \<empty>. But it's wise to get in the habit
-of putting `;' before @fi@, because it saves a wee bit of time and because
-`;' definitely belongs before ^@endfor@.
+of putting `;'\ before @fi@, because it saves a wee bit of time and because
+`;'\ often belongs before ^@endfor@.
\danger The informal rules just stated can, of course, be expressed more
formally as rules of syntax:
@@ -9948,7 +9974,7 @@ or strings are decided by the first unequal component from left to right.
\answer No; that would be shocking.
\dangerexercise Could `(odd $n$) and not (odd $-n$)' possibly be true?
-\answer Yes, if and only if $n-{1\over2}$ is a nonnegative even integer.
+\answer Yes, if and only if $n-{1\over2}$ is an even integer.
\ (Because ambiguous values are rounded upwards.)
\dangerexercise Could `(cycle $p$) and not (known $p$)' possibly be true?
@@ -9977,10 +10003,9 @@ to be the beginning of a \<boolean primary>. \ (Cf.\ Chapter~14.)
\ddanger The boolean expression `^@path@ $((0,0))$' is false, even
though `$((0,0))$' meets Chapter~14's syntax rules for
-\<path primary>, via (\<path expression>) and
-(\<path tertiary>) and
-(\<pair tertiary>). A ^{pair expression} is not considered to be
-of type @path@ unless the path interpretation is mandatory.
+\<path primary>, via \<pair primary>.
+A ^{pair expression} is not considered to be
+of type @path@ unless the path interpretation is the only~possibility.
\ddangerexercise Evaluate `length $((3,4))$' and `length $((3,4)\{0,0\})$'
and `length reverse~$(3,4)$'.
@@ -10055,7 +10080,7 @@ the same process is repeated with the new value of $\nu_1$.
\dangerexercise Read the rules in the previous paragraph carefully, then
explain for what values of~$x$ the loop is performed if you say
-(a)~`\thinspace@for@~$x=1$ @step@~2 @until@~0'\thinspace. \
+(a)~`\thinspace@for@~$x=1$ @step@~2 @until@~0\thinspace'. \
(b)~`\thinspace@for@~$x=1$ @step@~$-2$ @until@~0\thinspace'. \
(c)~`\thinspace@for@~$x=1$ @step@~0 @until@~0\thinspace'. \
(d)~`\thinspace@for@~$x=0$ @step@~.1 @until@~1\thinspace'.
@@ -10093,7 +10118,7 @@ example of how loops can be used inside of macros inside of expressions:
@pair@ $"z\_"\,[\,]$, $"dz\_"$; \ @numeric@ "n\_"\thinspace;
&\% private variables\cr
@def@ "flex"(@text@ $t$) $=$&\% $t$ is a list of pairs\cr
-\quad^"hide"$\bigl(\,"n\_":=0$;\cr
+\quad^@hide@$\bigl(\,"n\_":=0$;\cr
\qquad @for@ $z=t$: $"z\_"\,[{\rm incr}\,"n\_"]:=z$; @endfor@\cr
\qquad $"dz\_":="z\_"\,["n\_"]-"z\_"\,[1]\,\bigr)$\cr
\quad $"z\_"\,[1]$ @for@ $k=2$ @upto@ $"n\_"-1$:
@@ -10113,7 +10138,7 @@ expression is true, the (innermost) loop being iterated is terminated
abruptly. Otherwise, nothing special happens.
\dangerexercise Define an `^@exitunless@' macro such that
-`@exitunless@ \<boolean expression>;' will exit the current loop
+`@exitunless@ \<boolean expression>;'\ will exit the current loop
if the boolean expression is false.
\answer @def@ @exitunless@ @expr@ $b$ $=$ @exitif@ not $b$ @enddef@.
\ (The simpler alternative `@def@ @exitunless@ $=$ @exitif@ not
@@ -10280,8 +10305,8 @@ given ^"tolerance" of values for which $f$ yields both outcomes.
\quad $"tx\_":="true\_x"$; \ $"fx\_":="false\_x"$;\cr
\quad^@forever@: $"x\_":=.5["tx\_","fx\_"]$; \
^@exitif@ abs$("tx\_"-"fx\_")\le"tolerance"$;\cr
-\quad @if@ |@#|$("x\_"):\ "tx\_" \ @else@:\ "fx\_"\ @fi@$
- :=\ "x\_"\thinspace; @endfor@;\cr
+\quad @if@ |@#|$("x\_")\colon\ "tx\_" \ @else@\colon\ "fx\_"\ @fi@$
+ :=\ "x\_"\thinspace; @endfor@\cr
\quad "x\_" @enddef@;\cr
\enddisplay
@@ -10580,7 +10605,7 @@ When \MF\ is reading the symbolic tokens to be saved by ^@save@.
\smallskip\item\bull
When \MF\ is reading the token after ^@expandafter@, ^@everyjob@,
-or the `$=$' following @let@.
+or the `$=$' or `$:=$' following @let@.
\medskip\noindent
The expansion process is not suppressed while reading the suffix that
@@ -10655,7 +10680,7 @@ behavior, we can actually see the results graphically by letting \MF\
draw some ``^{scatter plots}.'' Consider the following program, which
draws a $10\pt\times10\pt$ square and puts 100 little dots inside it:
\begindisplay
-@beginchar@$\,(@incr@ "code",10"pt"\0,10"pt"\0,0)$;\cr
+@beginchar@$\,($incr $"code",10"pt"\0,10"pt"\0,0)$;\cr
@pickup@ @pencircle@ scaled .3"pt"; \ @draw@ "unitsquare" scaled $w$;\cr
@pickup@ @pencircle@ scaled 1"pt";\cr
@for@ $k=1$ @upto@ 100:\cr
@@ -10732,10 +10757,10 @@ $x_1="leftstemloc"+"noise"$;\cr
$x_2="leftstemloc"+"noise"$;\cr
$w-x_4="leftstemloc"+"noise"$;\cr
$w-x_5="leftstemloc"+"noise"$;\cr
-$"bot"\,y_1="noise"-"o"$;\cr
+$"bot"\,y_1="noise"-o$;\cr
$"top"\,y_2=h+o+"noise"$;\cr
$y_3=y_4+"ygap"+"noise"$;\cr
-$"bot"\,y_4="noise"-"o"$;\cr
+$"bot"\,y_4="noise"-o$;\cr
$"top"\,y_5=h+o+"noise"$;\cr
$z_3="whatever"[z_4,z_5]$;\cr
@draw@ $z_1\dashto z_2\dashto z_3$; \
@@ -10864,7 +10889,7 @@ place at the primary level:
\alt[str]<suffix>
\alt[char]<numeric primary>
\alt[decimal]<numeric primary>
- \alt[substring]<pair primary>[of]<string primary>
+ \alt[substring]<pair expression>[of]<string primary>
<string secondary>\is<string primary>
<string tertiary>\is<string secondary>
<string expression>\is<string tertiary>
@@ -10950,8 +10975,8 @@ Thus, `oct~|"7777"|' and `hex~|"FFF"|' are the maximum legal values.
\ddangerexercise Under what circumstances is (a) ASCII @char@ $n=n$?
\ (b)~@char@~ASCII~$s=s$?
-\answer (a) Iff $n$ is an integer between 0 and 255.
-(b) Iff $s$ is a string of length~1.
+\answer (a) If and only if $n$ is an integer between 0 and 255.
+(b) If and only if $s$ is a string of length~1.
\ddangerexercise Why are there primitive operations to convert from
strings to numbers assuming octal notation and hexadecimal notation,
@@ -10976,8 +11001,8 @@ or indirectly with the user. It has the general syntax
\endsyntax
If you say `@message@~$s$', the characters of $s$ will be typed on the
terminal, at the beginning of a new line; `@errmessage@~$s$' is
-similar, but the string will be preceded by |"! "| and followed
-by~|"."|, followed by lines of context as in \MF's normal error messages.
+similar, but the string will be preceded by `|! |' and followed
+by~`|.|', followed by lines of context as in \MF's normal error messages.
If the user asks for ^{help} after an @errmessage@ error,
the most recent @errhelp@ string will be typed (unless it was empty).
@@ -11414,7 +11439,7 @@ be a "good.y" value. Therefore we say
these commands, provided by plain \MF\!, will do the right thing.
\ (The "logo\_pen" should be picked up before the last two commands are
given.) \ These few changes, and a change to the `{\manual m}', suffice to
-fix all the letters except `\kern1pt{\manual j}\kern1pt'.
+fix all the letters except `\kern.5pt{\manual j}\kern.5pt'.
\dangerexercise The program for \MF's `{\manual m}' ^^{O}
appears in Chapter~18. What changes would you suggest to make
@@ -11429,7 +11454,7 @@ so that vertical tangents will occur in good places. Since $w$~is an
integer, and since the "logo\_pen" has left-right symmetry,
$w-x_3$ will be good if and only if $x_3$ is.
-\danger The `\kern1pt{\manual j}\kern1pt' ^^{T} presents a new problem,
+\danger The `\kern.5pt{\manual j}\kern.5pt' ^^{T} presents a new problem,
because we want it to be symmetric between left and right. If the pen
breadth is odd, we want the character width~$w$ to be odd, so that there
will be as many pixels to the left of the stem as there are to the right.
@@ -11438,7 +11463,7 @@ If the pen breadth is even, we want $w$ to be even. Therefore we have a
^@beginchar@.
\dangerexercise Prove that the value of $w$ is satisfactory for
-`\kern1pt{\manual j}\kern1pt' with respect to the "logo\_pen" if and
+`\kern.5pt{\manual j}\kern.5pt' with respect to the "logo\_pen" if and
only if $.5w$ is a good $x$~value for vertical strokes.
\answer Let $b$ be the pen breadth. Then $.5w$ is a good $x$ value if and only
if $"lft"\,.5w$ is an integer; but $"lft"\,.5w=.5w-.5b$, and this is an
@@ -11449,7 +11474,7 @@ $w+1$ or~$w-1$, whichever is closer to the device-independent width
from which $w$ was rounded. For example, if $w$ was rounded to 22 from
the ideal width~21.7, we want to change it to 21 rather than~23.
Plain \MF's ^@change\_width@ routine does this. Hence we have the
-following program for `\kern1pt{\manual j}\kern1pt', in place of the
+following program for `\kern.5pt{\manual j}\kern.5pt', in place of the
\rightfig 4b ({208\apspix} x {216\apspix}) ^-18pt
simpler version found in exercise 11.\metaT:
\begindisplay
@@ -11463,7 +11488,7 @@ $y_1=y_2=y_3$; \ $"top"\,y_1=h$; \ $"bot"\,y_4=-o$;\cr
@labels@$(1,2,3,4)$; \ @endchar@.\cr
\enddisplay
\decreasehsize 44mm
-Chapter 4 said that `\kern1pt{\manual j}\kern1pt' was the simplest of the
+Chapter 4 said that `\kern.5pt{\manual j}\kern.5pt' was the simplest of the
seven logo letters, but it has turned out to be the trickiest.
\restorehsize
@@ -11474,7 +11499,7 @@ are highly likely to pass through ambiguous points when the center of
the pen has integer or half-integer coordinates. \MF\ shifts paths slightly
to the right and up, in order to resolve ambiguities; therefore if
ambiguous points occur at the left and right edges of the
-`\kern1pt{\manual j}\kern1pt', some pixels will be lost at the left but
+`\kern.5pt{\manual j}\kern.5pt', some pixels will be lost at the left but
gained at the right. The constant ^"eps" is 0.00049, which is small but
positive enough that \MF\ will surely notice it. Subtracting "eps"
from~$x_1$ and adding "eps" to~$x_2$ avoids ambiguous edge points and
@@ -11485,7 +11510,7 @@ integer, it is unnecessary to do anything similar at point~$z_4$;
the equation `$"bot"\,y_4=-o$' is sufficient.
\ddanger Point $z_3$ in the middle of the `{\manual h}' ^^{M} is in
-a satisfactory position because $"bot"\,y_3="ygap"-"o"$.
+a satisfactory position because $"bot"\,y_3="ygap"-o$.
If $"bot"\,y_3$ were exactly an integer, the~`{\manual h}' would often turn
out to be unsymmetric, because of ambiguous points on the boundary
at~$z_3$.
@@ -11493,12 +11518,12 @@ at~$z_3$.
\ddangerexercise True or false: If "currentpen" is @pencircle@ xscaled "px"
yscaled~"py", the command `@draw@ $(-"epsilon",0)\to(+"epsilon",0)$'
will produce an image that has both left-right and top-bottom symmetry.
-\ (Assume that "autorounding"="smoothing"=0.)
+\ (Assume that $"autorounding"="smoothing"=0$.)
\answer There are no ambiguous points on the outlines of this stroke,
except perhaps on the top and bottom edges; the latter can occur only if
$\round"py"$ is odd. Hence there is always left-right symmetry, but
top-bottom symmetry might fail because of a missing row at the bottom
-(e.g., when $"px"="py"=3$). In a case like the `\kern1pt{\manual j}\kern1pt'
+(e.g., when $"px"="py"=3$). In a case like the `\kern.5pt{\manual j}\kern.5pt'
we do have both symmetries, because $y_1$ and $x_4$ are in good positions.
\ddangerexercise The polygon for `^@pencircle@ scaled 3' is an octagon
@@ -11531,7 +11556,7 @@ $u\0:={10\over18}"pt"\0$; \ @define\_pixels@$(u)$;\cr
$"lft"\,x_1=\round u-"eps"$;\cr
$x_3=x_1$;\cr
$x_2=x_4=w-x_1$;\cr
-$y_1=y_2="good.y"(.5[-d,h]+"pt")$;\cr
+$y_1=y_2="good.y"(.5[-d,h]+1.1"pt")$;\cr
$y_3=y_4=h-d-y_1$;\cr
@draw@ $z_1\dashto z_2$; \ @draw@ $z_3\dashto z_4$;\cr
$"lft"\,x_6=\round 3u$;\cr
@@ -11911,7 +11936,7 @@ The proper way to do this is generally to say
\enddisplay
this command computes "stem" from $"stem"\0$ by the formula
\begindisplay
-$"stem":=max\bigl(1,\,\round("stem"\0\ast"hppp"+"blacker")\bigr)$.
+$"stem":=\max\bigl(1,\,\round("stem"\0\ast"hppp"+"blacker")\bigr)$.
\enddisplay
(Notice that this rounding operation is not allowed to reduce "stem"
to zero at low resolutions.)
@@ -11940,7 +11965,7 @@ $x_{2l}=\round(\alpha-.5"stem")$,
or equivalently, `$x_{2r}=\round(\alpha+.5"stem")$'. This does the
job all right, but it isn't completely satisfying. It requires
knowledge of the breadth that was specified in the $\penpos2$ command,
-and it works only when the penpos angle is~0. If the penpos command
+and it works only when the "penpos" angle is~0. If the "penpos" command
is changed, the corresponding equation for rounding must be
changed too. There's another solution that's more general and more
attractive once you get used to it:
@@ -12104,7 +12129,7 @@ to the nearest integer, just like `round'; but if, say,
$"aspect\_ratio"=4/3$, then "vround" will round to the nearest
multiple of~$3/4$. Plain \MF\ uses "vround" instead of `round'
when it computes an ^{overshoot} correction, and also when ^@beginchar@
-computes the values of ^"h" and~^"d". The ^"good.y" function produces
+computes the values of ^{$h$} and~^{$d$}. The ^"good.y" function produces
a good $y$~value that takes "aspect\_ratio" properly into account.
\ddangerexercise Without looking at Appendix B\null, try to guess how
@@ -12128,9 +12153,9 @@ instead of rounded, so we initialize it by saying
\enddisplay
Furthermore we should say
\begindisplay
-$"ho"\0:="o"\0$; \ ^@define\_horizontal\_corrected\_pixels@("ho");
+$"ho"\0:=o\0$; \ ^@define\_horizontal\_corrected\_pixels@("ho");
\enddisplay
-and "ho" should replace ^"o" in the equations for $x_4$ in the programs
+and "ho" should replace ^{$o$} in the equations for $x_4$ in the programs
for `{\manual i}' and~`{\manual l}'. ^^{E} ^^{F}
Everything else should work satisfactorily as it stands.
@@ -12610,11 +12635,6 @@ nucleus of the entire \MF\ language:
\alt[normaldeviate]
\alt[(]<numeric expression>[)]
\alt[begingroup]<statement list><numeric expression>[endgroup]
-<numeric token primary>\is<numeric token>[/]<numeric token>
- \alt<numeric token not followed by `{\tt/}$\langle$numeric token$\rangle$'>
-<numeric primary>\is<numeric atom>
- \alt<numeric atom>[\char'133]<numeric expression>%
- [,]<numeric expression>[\char'135]
\alt[length]<numeric primary>\alt[length]<pair primary>
\alt[length]<path primary>\alt[length]<string primary>
\alt[ASCII]<string primary>\alt[oct]<string primary>\alt[hex]<string primary>
@@ -12623,6 +12643,12 @@ nucleus of the entire \MF\ language:
\alt[turningnumber]<path primary>\alt[totalweight]<picture primary>
\alt<numeric operator><numeric primary>
\alt[directiontime]<pair expression>[of]<path primary>
+<numeric token primary>\is<numeric token>[/]<numeric token>
+ \alt<numeric token not followed by %
+ `{\tt/}$\thinspace\langle$numeric token$\rangle$'\thinspace>
+<numeric primary>\is<numeric atom not followed by {[\char'133]<expression>[,]}>
+ \alt<numeric atom>[\char'133]<numeric expression>%
+ [,]<numeric expression>[\char'135]
<pair part>\is[xpart]\alt[ypart]
<transform part>\is<pair part>\alt[xxpart]\alt[xypart]\alt[yxpart]\alt[yypart]
<numeric operator>\is[sqrt]\alt[sind]\alt[cosd]\alt[mlog]\alt[mexp]
@@ -12777,7 +12803,8 @@ Pens and future pens coexist as follows:
\alt[nullpen]
\alt[(]<pen expression>[)]
\alt[begingroup]<statement list><pen expression>[endgroup]
-<future pen primary>\is[pencircle]
+<future pen primary>\is<future pen argument>
+ \alt[pencircle]
\alt[makepen]<path primary>
<pen secondary>\is<pen primary>
<future pen secondary>\is<future pen primary>
@@ -12820,7 +12847,7 @@ repeat the syntax again for completeness here.
\alt[str]<suffix>
\alt[char]<numeric primary>
\alt[decimal]<numeric primary>
- \alt[substring]<pair primary>[of]<string primary>
+ \alt[substring]<pair expression>[of]<string primary>
<string secondary>\is<string primary>
<string tertiary>\is<string secondary>
<string expression>\is<string tertiary>
@@ -12828,6 +12855,7 @@ repeat the syntax again for completeness here.
\endsyntax
There's nothing more to say about strings.
+\goodbreak
\medbreak
\textindent\bull
Chapter 15 explains transforms, but gives no formal syntax. The rules are:
@@ -12937,12 +12965,12 @@ primitive operations that actually draw pictures and produce output.
Let's start by looking at the full syntax for \<program> and for
\<statement>:
\beginsyntax
-<program>\is<statement list>[end]\alt<statement list>[dump]
+<program>\is<statement list><non-title statement>[end]
+ \alt<statement list><non-title statement>[dump]
<statement list>\is<empty>\alt<statement>[;]<statement list>
<statement>\is<empty>\alt<title>
- \alt<equation>\alt<assignment>
- \alt<declaration>\alt<definition>
- \alt<compound>\alt<command>
+ \alt<equation>\alt<assignment>\alt<declaration>
+ \alt<definition>\alt<compound>\alt<command>
<title>\is<string expression>
<compound>\is[begingroup]<statement list><non-title statement>[endgroup]
<command>\is<save command>
@@ -12976,7 +13004,7 @@ We shall concentrate in this chapter on the various types of {\sl
<symbolic token list>\is<symbolic token>
\alt<symbolic token list>[,]<symbolic token>
<interim command>\is\kern-1.5pt[interim]%
- <internal quantity>[:=]<right-hand side>\kern-1pt
+ <internal quantity>[:=]\kern1pt<right-hand side>\kern-1pt
\endsyntax
The @save@ and @interim@ commands cause values to be restored at the end
of the current group, as discussed in Chapter~17.
@@ -12989,7 +13017,7 @@ Thus, they can be used in @interim@ commands; they are ^{tags} but not
^{external tags} (see Chapter~7). Since \MF\ can access internal
quantities quickly, you can use them to gain efficiency.
\beginsyntax
-<randomseed command>\is[randomseed][:=]<numeric expression>
+<randomseed command>\is[randomseed][:=]\kern1pt<numeric expression>
\endsyntax
The @randomseed@ command specifies a ``seed'' value that defines
the pseudo-random numbers to be delivered by
@@ -13060,7 +13088,7 @@ Paths, pens, and pictures are shown only in the transcript file, unless
^"tracingonline" is positive. The @showvariable@ command gives the
structure of all variables that begin with a given external tag,
together with their values in an abbreviated form; this allows you to see
-which of its subscripts and attributes have occurred. For example, if you're
+which of its subscripts and suffixes have occurred. For example, if you're
using plain \MF\ conventions, `@showvariable@~$x,y$' will show all
coordinates that have been defined since the last @beginchar@. The @showtoken@
command gives the current meaning of a token, so that you can tell whether
@@ -13248,7 +13276,7 @@ normal for a mature \MF er to think ``Shucks, I meant to type
any harm; \MF\ just found an ^{isolated expression}, `"mode.setup"', which
it will ignore. So let me now insert the correct command, `@mode\_setup@'.''
-Good thinking; so you type `|I| |mode_setup|', right? Wrong~$\ldots$~sorry.
+Good thinking; so you type `|I mode_setup|', right? Wrong~$\ldots$~sorry.
Lots of error messages occur before \MF\ has read a ^{semicolon} in
preparation for another ^{statement}; the important clue in this case
comes from the two lines
@@ -13265,7 +13293,7 @@ the semicolon, you get what appears at first to be a horrible mess:
warningcheck
mode_setup->warningcheck
:=0;if.unknown.mode:mode=proof;fi...
-<insert> mode_setup
+<insert> mode_setup
|quad
<to be read again>
;
@@ -13299,10 +13327,10 @@ you might want to type `I ???' now.)
\endtt
Chapter 27? That's us! What happens if we do type `|I ???|' now? We get
\begintt
-x4l=0.08682thinn+144
-y4=-0.4924thinn+259.0005
+y4r=-0.9848thinn+259.00049
x4r=-0.08682thinn+144
-y4r=-0.9848thinn+259.0005
+y4=-0.4924thinn+259.00049
+x4l=0.08682thinn+144
! OK.
\endtt
It is now abundantly clear that `|thin|' was misspelled. Plain \MF\
@@ -13357,9 +13385,10 @@ delete 2~tokens, then `|I(|'. This would produce another error stop,
]
<*> show round[1 + sqrt43]
;
-? h
+? H
I found no right delimiter to match a left one. So I've
put one in, behind the scenes; this may fix the problem.
+|null
?
\endtt
after which it's easy to delete the `|]|' and continue successfully.
@@ -13411,7 +13440,7 @@ Here are some of the messages you might get just before
Fatal base file error; I'm stymied.
^^|Fatal base file error|
This means that the preloaded base you have specified cannot be used,
-because it was prepared for a different version of \MF\!.
+because it is corrupted or was prepared for a different version of \MF\!.
\fatal
That makes 100 errors; please try again.
\MF\ has scrolled past 100 errors since the last statement ended, so
@@ -13552,7 +13581,7 @@ If the number |450| in the third ^{flex} had been |452| instead,
;
<for(4)> ...]shifted(150,50)scaled(w/300);
ENDFOR
-p.4,l.94 endfor
+l.94 endfor
endchar;
?
\endtt
@@ -13562,7 +13591,7 @@ but the ^{octant} codes like `^|SSW|' are your only clues about why
|branch4| is considered strange. \ (A simpler example appeared
in Chapter~13, which you might want to review now.) \
^^{compass directions} ^^|SSE|^^|ESE|^^|WSW|^^|WNW|^^|NNE|^^|NNW|^^|ENE|
-You probably also have a proofmode diagram:
+You probably also have a |proof| mode diagram:
\displayfig 27a (34mm)
Starting at time~0, and at the point $(0,509)$, the path goes South by
Southwest, then West by Southwest until time~2 (the end of the first flex).
@@ -13660,7 +13689,7 @@ consciousness'' information about everything \MF\ is doing.
\begingroup\ninepoint
\danger ^{Digitized output} can be monitored by setting ^"tracingedges"%
-$\null=1$. For example, if we ask \MF\ to draw the Ionian `{\manual\IOO}'
+$\null:=1$. For example, if we ask \MF\ to draw the Ionian `{\manual\IOO}'
of Chapter~5 at a resolution of 100~pixels per inch (^"lowres" mode
with ^"mag"$\null=.5$), "tracingedges" will report as follows:\enddanger
\beginlines
@@ -13854,7 +13883,7 @@ with an informal ^{inventory} of all the features that are available.
\bb|+|\cr\noalign{\kern-2pt}|-|\cr\noalign{\kern-2pt}\<constant>\ee\<pair>; \
\<pair>\bb|+|\cr|-|\ee\<pair>; \
\<numeric>|[|\<pair>|,|\<pair>|]|;\\
-\<numeric>|*|\<pair>; \
+\<numeric>\thinspace|*|\thinspace\<pair>; \
\<pair>\bb|*|\cr|/|\ee\<numeric>; \
\<pair>\<transformer>;\\
\<path>\bb|intersectionpoint|\cr|intersectiontimes|\ee\<path>; \
@@ -13943,7 +13972,7 @@ with an informal ^{inventory} of all the features that are available.
|loggingall|, |tracingall|, |tracingnone|.
\textindent\bull {\it ^{Starting a job}:\/} \
-|\mode=|\<modename>; \ |mag=|\bb\<numeric>\cr|magstep|\<numeric>\ee;\\
+|\mode=|\<mode name>; \ |mag=|\bb\<numeric>\cr|magstep|\<numeric>\ee;\\
|screenchars|; \ |screenstrokes|; \ |imagerules|; \ |gfcorners|; \
|nodisplays|;\\
|notransforms|; \ |input| \<filename>.
@@ -13979,7 +14008,7 @@ with an informal ^{inventory} of all the features that are available.
\bb|=|\cr\noalign{\kern-2pt}|:=|\cr\noalign{\kern-2pt}\<empty>\ee
\<numeric$\0$>; \
\bb|ligtable|\<ligs/kerns>\cr|charlist|\<codes>\cr|extensible|\<codes>\cr
- |fontdimen|\<info>\cr|headerbytes|\<info>\ee;\\
+ |fontdimen|\<info>\cr|headerbyte|\<info>\ee;\\
\bb|font_identifier|\cr|font_coding_scheme|\ee
\smash{\bb\tt=\cr\noalign{\kern-2pt}\tt:=\cr\noalign{\kern-2pt}\<empty>\ee}%
\<string>.
@@ -14050,8 +14079,8 @@ $\hbox{\bb\bb|=|\cr|:=|\ee
|(|\<string>|,|\<pair>|)|; \
\bb|titlefont|\cr|labelfont|\cr|grayfont|\cr|slantfont|\ee \<name>;\\
\bb|proofrule|\cr|screenrule|\ee|(|\<pair>|,|\<pair>|)|; \
-|makegrid(|\<pairs>|)(|\<pairs>|)|;\\
-|proofrulethickness| \<numeric>; \ |proofoffset| \<pair>.
+|makegrid(|\<numerics>|)(|\<numerics>|)|;\\
+|proofrulethickness| \<numeric$\0$>; \ |proofoffset| \<pair>.
\medbreak\textindent\bull {\it Hacks:\/} \ |gobble|, |gobbled|, |killtext|; \
|capsule_def|; \ |numtok|.
@@ -14313,7 +14342,7 @@ The private token `|a_|' will be declared as an ^{internal quantity}.
Internal quantities are more ^{efficient} than ordinary numeric variables.
Plain \MF's `^{softjoin}' operation provides a way to hook paths together
-without the abrupt change of direction implied by~`|&|'. Assuming that
+without the abrupt change of direction implied by~`\&'. Assuming that
the final point of~$p$ is the first point of~$q$, the path `$p$~softjoin~$q$'
begins on~$p$ until coming within "join\_radius" of this common point;
then it curves over and finishes~$q$ in essentially the same way.
@@ -14338,7 +14367,7 @@ only to variables; they have the side effect of changing the variable's value.
|vardef |^|decr|| suffix $ = $:=$-1; $ enddef;|
\weakendlines
You can say either `|incr|~|x|' or `|incr|~|(x)|', within
-an expression; but `|incr|~|x|' by itself is not a valid statement.
+an expression; but neither of them are valid statements by themselves.
To reflect about a line, we compute a ^{transform} on the fly:
\beginlines
@@ -14384,7 +14413,7 @@ enclosed in parentheses.
|newinternal n_; pair z_[],dz_;|
\endlines
-The five parameters to `superellipse' are the right, the top, the left,
+The five parameters to "superellipse" are the right, the top, the left,
the bottom, and the superness.
\beginlines
|def |^|superellipse||(expr r,t,l,b,s)=|
@@ -14394,7 +14423,7 @@ the bottom, and the superness.
| b{right}...(s[xpart b,xpart r],s[ypart r,ypart b]){r-b}...cycle enddef;|
\endlines
-Chapter~14 illustrates the `interpath' routine, which interpolates
+Chapter~14 illustrates the "interpath" routine, which interpolates
between paths to find a path that would be written `$a[p,q]$' if
\MF's macro notation were more general.
\beginlines
@@ -14510,7 +14539,8 @@ If, however, you need a special mode that isn't in the base, you can put
its commands into a file (e.g., `|specmode.mf|') and invoke it
by saying
\begindisplay
-^|\smode||="specmode"; mag=|$\,\cdots$
+^|\smode||="specmode"; mag=|\<magnification>|; input |%
+ \<font file name>
\enddisplay
instead of giving a predeclared mode name.
@@ -14885,7 +14915,7 @@ a group, which should end at the next ^@endchar@. Then @beginchar@
stores the given character code and device-independent
box dimensions in \MF's internal variables ^"charcode", ^"charwd",
^"charht", and ^"chardp". Then it computes the device-dependent box
-dimensions ^"w", ^"h", and~^"d". Finally it
+dimensions ^{$w$}, ^{$h$}, and~^{$d$}. Finally it
clears the $z$ variables, the current picture, and the
current pen.
\beginlines
@@ -14986,12 +15016,12 @@ Then we need to do something rudimentary about \MF's ``windows.''
|screen_rows:=400; % these values should be corrected,|
|screen_cols:=500; % by reading in a separate file after plain.mf|
\smallskip
-|def |^|openit|| = openwindow currentwindow|
-| from origin to (screen_rows,screen_cols) at (-50,300) enddef;|
-|def |^|showit|| = openit; let showit=showit_; showit enddef; % first time only|
+|def |^|openit|| = openwindow currentwindow from origen % and please correct|
+| to (screen_rows,screen_cols) at (-50,300) enddef; % "(-50,300)" too|
|def showit_ = display currentpicture inwindow currentwindow enddef;|
+|def |^|showit|| = openit; let showit=showit_; showit enddef; % first time only|
\endlines
-Plain \MF\ has several other terse commands like `@openit@' and `@showit@':
+Plain \MF\ has several other terse commands similar to `@openit@' and `@showit@':
\beginlines
|def |^|clearxy|| = save x,y enddef;|
|def |^|clearit|| = currentpicture:=nullpicture enddef;|
@@ -15092,7 +15122,7 @@ than normal, not heavier). The terminal screens are assumed to be
| fontmaking:=1; % yes, we are making a font|
| tracingtitles:=1; % yes, show titles online|
| pixels_per_inch:=2000; % almost 30 pixels per pt|
-| blacker:=.2; % make pens a teeny bit blacker|
+| blacker:=.1; % make pens a teeny bit blacker|
| fillin:=.1; % but compensate for heavy diagonals|
| o_correction:=1; % and keep the full overshoot|
| enddef;|
@@ -15463,7 +15493,7 @@ let INPUT = input; let input = enddef; let logo = endinput;
expandafter def expandafter ten expandafter = INPUT logo10;
showtoken ten.
\endtt
-It works! By the way, the line with three expandafters can be replaced by
+It works! By the way, the line with three @expandafter@s can be replaced by
a more elegant construction that uses @scantokens@ as follows:
\begintt
scantokens "def ten=" INPUT logo10;
@@ -15505,10 +15535,10 @@ show exactly how \MF\ proceeds. We have assumed that the unknown file
name can be parsed as a suffix; this solves the problem that a file cannot
end inside of a @text@ parameter or a false condition. \ (If we knew that
`@end@' were present, we could have replaced `|endinput|~|flushfilename|' by
-`|if|~|false:|' and redefined `|end|' to be `|fi|'.)
+`|if|~|false:|'\ and redefined `|end|' to be `|fi|'.)
Let's turn now to a simpler problem. \MF\ allows you to consider the
-`^{and}' of two Boolean expressions, but it always evaluates both
+`^{and}' of two boolean expressions, but it always evaluates both
expressions. This is problematical in situations like
\begintt
if pair x and (x>(0,0)): A else: B fi
@@ -15519,7 +15549,7 @@ unless $x$ is of type @pair@. The obvious way to avoid this error,
if pair x: if x>(0,0): A else: B fi else: B fi
\endtt
is cumbersome and requires |B| to appear twice. What we want is a
-``^{conditional and}'' operation in which the second Boolean expression is
+``^{conditional and}'' operation in which the second boolean expression is
evaluated only if the first one turns out to be true; then we can safely write
\begintt
if pair x cand (x>(0,0)): A else: B fi.
@@ -15558,7 +15588,7 @@ def cand text q = startif true q else: false fi enddef
\endtt
we could write things like
\begintt
-if {{pair x cand x>(0,0)}}: A else: B fi.
+if {{(pair x) cand x>(0,0)}}: A else: B fi.
\endtt
(Not that this buys us anything; it just illustrates a property of
undelimited text arguments.) \ Group delimiters
@@ -15606,7 +15636,7 @@ Of course, a person isn't supposed to say `max$(a)(b)(c)$'.
Here are two more applications of the idea: We want `^{inorder}$(a,b,c)$'
to be true if and only if $a\le b\le c$; and we want
`^@equally\_spaced@$(x_1,x_2,x_3)\,"dx"$' to produce the equations
-`$x_2-x_1=x_3-x_2=dx$'.
+`$x_2-x_1=x_3-x_2="dx"$'.
\begintt
def inorder(expr x)(text t) =
((x for u=t: <= u)
@@ -15677,7 +15707,7 @@ vardef min(text t) =
for u=t: switch_ u<u_: u_ := u ;fi endfor
u_ enddef;
def firstset_ primary u =
- setu_ u; let switch_ = if; if false: enddef.
+ save u_; setu_ u; let switch_ = if; if false: enddef.
\endtt
Incidentally, the author's ^^{Knuth} first programs for max and min
contained an interesting bug. They started with `@save@ "u\_"', and they
@@ -15758,7 +15788,7 @@ vardef piceq expr p of q =
(totalweight t=0) enddef;
\endtt
If $p$ and $q$ are numeric or pair expressions, we could relax the condition
-that they both be known by saying `@if@ known $p-q$: $p=q$ @else@:~@false@ @fi@';
+that they both be known by saying `@if@ known $(p-q)$: $p=q$ @else@:~@false@ @fi@';
transforms could be handled similarly by testing each of their six parts.
But there's no way to tell if booleans, paths, etc., have been equated
when they're both unknown, without the risk of irrevocably changing the
@@ -15800,7 +15830,7 @@ pixels. \ (Increasing the tolerance saves time because it
decreases the number of iterations within "solve"; you have to
balance time versus necessary accuracy.)
-The only tricky thing about this use of solve was the choice of the
+The only tricky thing about this use of "solve" was the choice of the
numbers 1 and~7 in `$f(1,7)$'. In typical applications we'll usually have
obvious values of the unknown where $f$ will be true and false,
but a bit of experimentation was necessary for the problem considered
@@ -15811,8 +15841,8 @@ another solution: $a=7.51442$, $b=-7.48274$, $c=-2.3097$. Furthermore,
it's interesting to observe that this system has no solution with
$c$ between $-1$ and~$+1$, even though $f(+1)$ is true and
$f(-1)$ is false! When $c\rightarrow0$, the quantity $a^3+b^3$
-approaches $-\infty$ when $c$~is negative, $+\infty$ when $c$~is
-positive. An attempt to `"solve" $f(1,-1)$' will divide by zero and
+approaches $-\infty$ when $c$~is positive, $+\infty$ when $c$~is
+negative. An attempt to `"solve" $f(1,-1)$' will divide by zero and
come up with several arithmetic overflows.
\hangindent=-42mm \hangafter=-7
@@ -15898,7 +15928,8 @@ vardef verticalline primary x =
(x,-infinity)--(x,infinity) enddef;
\endtt
For example, if $f(1)=1$, $f(3)=2$, and $f(15)=4$, this interpolation
-scheme gives `interpolate $(1,1)\to(3,2)\to(15,4)$ of~7' the value 3.37.
+scheme gives `interpolate $(1,1)\to(3,2)\to(15,4)$ of~7' the
+approximate value 3.37.
\subsection Drawing with ^{overlays}. Let's leave numerical computations
now and go back into the realm of pictures. Bruce ^{Leban} has suggested
@@ -15942,7 +15973,7 @@ when possible.
and read it in to some other \MF\ job, you face two problems:
(1)~\MF's @shipout@ command implicitly culls the picture, so that only
binary data is left. Pixel values $>0$ are distinguished from pixel
-values $<=0$, but no other information about those values will survive.
+values $\le0$, but no other information about those values will survive.
\ (2)~The result of ^@shipout@ can be used in another \MF\ job only if
you have an auxiliary program that converts from binary ^|gf| format
to a \MF\ source program; \MF\ can write |gf| files, but it can't
@@ -16088,7 +16119,7 @@ vardef taller primary p =
T = round directiontime down of r;
if t>T: t := t-n; fi
makepen(subpath(T-n,t) of r shifted .5down
- --subpath(t,T) of r shifted .5up -- cycle) enddef;
+ -- subpath(t,T) of r shifted .5up -- cycle) enddef;
\endtt
The result of @makepath@ has control points equal to their adjacent
vertices, so it could not be used with directiontime.
@@ -16119,7 +16150,7 @@ vardef taller primary p =
T = round xpart(r intersectiontimes penoffset down of q);
if t>T: t := t-n; fi
makepen(subpath(T-n,t) of r shifted .5down
- --subpath(t,T) of r shifted .5up -- cycle) enddef;
+ -- subpath(t,T) of r shifted .5up -- cycle) enddef;
\endtt
^^{intersectiontimes} ^^{subpath}
(The argument $p$ is copied into $q$, in case it's a ^{future pen};
@@ -16167,10 +16198,11 @@ def first_ primary u =
elseif pair u: pair u_[[[]]]; store_ u fi;
let switch_ = store_ enddef;
def store_ primary u = u_[[[incr n_]]] := u enddef;
-primarydef t Bernshtein nn =
+primarydef t Bernshtein nn = begingroup save r; r =
begingroup for n=nn downto 2:
for k=1 upto n-1: u_[[[k]]]:=t[[[u_[[[k]]],u_[[[k+1]]] ]]];
- endfor endfor u_[[[1]]] endgroup enddef;
+ endfor endfor u_[[[1]]] endgroup; numeric u_[[[]]];
+ r endgroup enddef;
\endtt
The most subtle thing about this code is the way it uses the `empty'
option of a ^\<for list> to dispense with ^{empty text arguments}.
@@ -16178,6 +16210,8 @@ Since \MF\ evaluates all the expressions of a ^@for@ loop before
reading the loop text, and since `|n_|' and `|u_|' are used here
only when no recursion is taking place, it is unnecessary to ^{save}
their values even when brackets are nested inside of brackets.
+However, the auxiliary variables `|u_[[[|$k$|]]]|' must not remain
+independent at the end.
Of course this trick slows \MF\ down tremendously, whenever brackets
appear, so it is just of academic interest. But it seems to work
@@ -16231,7 +16265,7 @@ in Chapter~11. For example, the |logo10| font that produces `\MF' in
\mode=lowres; input logo10
\endtt
where the ^{parameter file} |logo10.mf| appears in that chapter. Furthermore
-the slanted version `{\manual 89:;<=>:}\kern3pt' can be created by
+the slanted version `{\manual 89:;<=>:}\kern2pt'\ can be created by
inputting the parameter file |logosl10.mf|, which says simply
\begintt
% 10-point slanted METAFONT logo
@@ -16461,15 +16495,15 @@ opening and closing lines of ^|cmr10.mf|:
\smallskip
|font_identifier "CMR"; font_size 10pt#;|
\smallskip
-|u#:=20/36pt#; % unit width|
-|serif_fit:=0pt#; % extra sidebar near serifs|
-|letter_fit:=0pt#; % extra space added to all sidebars|
+|u#:=20/36pt#; % unit width|
+|width_adj#:=0pt#; % width adjustment for certain characters|
+|serif_fit#:=0pt#; % extra sidebar near lowercase serifs|
\vskip-3pt
\qquad\vdots
-|serifs:=true; % should serifs and bulbs be attached?|
-|monospace:=false; % should all characters have the same width?|
+|low_asterisk:=false; % should the asterisk be centered at the axis?|
+|math_fitting:=false; % should math-mode spacing be used?|
\smallskip
-|generate roman % switch to the driver file|
+|generate roman % switch to the driver file|
\endlines
The main differences are: \ (1) There's special code at the beginning, to
make sure that |cmbase.mf| has been loaded. The base file includes
@@ -16561,8 +16595,8 @@ The base file |cmbase.mf| begins as follows:
|let cmchar = relax; % `cmchar' should precede each character|
|let generate = input; % `generate' should follow the parameters|
\smallskip
-|newinternal slant, superness,| $\cdots$ | % purely numeric parameters|
-|boolean serifs, monospace,| $\cdots$ | % boolean parameters|
+|newinternal slant, superness,| $\ldots$ | % purely numeric parameters|
+|boolean serifs, monospace,| $\ldots$ | % boolean parameters|
\endlines
These few lines are straightforward enough. Although |cmchar| is defined
to be the same as ^|relax|, which does nothing, the definition of
@@ -16602,7 +16636,7 @@ Modern character program is supposed to say
\enddisplay
sidebearing adjustments are given in true, ``sharped'' units.
The ^@adjust\_fit@ routine essentially adds extra space at the left
-and right, corresponding to the sidebearing adjustments. An ad-hoc
+and right, corresponding to the sidebearing adjustments. An ad hoc
dimension called ``^"letter\_fit"$\0$'' is also added to all sidebearings,
behind the scenes.
@@ -16645,7 +16679,7 @@ Variables ^"l" and ^"r" are set to the actual pixel boundaries of the
character; thus, plain \MF's bounding box has $0\le x\le w$, but
Computer Modern's has $l\le x\le r$. ^{Rounding} has been done
very carefully so that the sidebearings will have consistent
-relationships across an entire font. Notice that ^"w"~has been
+relationships across an entire font. Notice that ^{$w$}~has been
recalculated; this means that @adjust\_fit@ can affect the digitization,
but---we hope---in a beneficial way.
@@ -16660,7 +16694,7 @@ characters will be $"mono\_charic"\0$.
|def mono_adjust_fit(expr left_adjustment,right_adjustment) =|
| numeric expansion_factor; mono_charwd# = 2letter_fit#|
| + expansion_factor*(charwd+left_adjustment+right_adjustment);|
-| forsuffixes $=u,jut,| $\cdots$ |:|
+| forsuffixes $=u,jut,| $\ldots$ |:|
| $ := $.#*expansion_factor*hppp; endfor|
| l := -hround(left_adjustment*expansion_factor*hppp)-letter_fit;|
| interim xoffset := -l;|
@@ -16723,12 +16757,12 @@ each driver file. This is what converts sharped units to pixels;
font as a whole. It's a long macro, but here are its important features:
\beginlines
|def font_setup =|
-| define_pixels(u,jut,| $\cdots$ |);|
-| define_whole_pixels(letter_fit,fine,crisp,| $\cdots$ |);|
-| define_whole_vertical_pixels(body_height,cap_height,| $\cdots$ |);|
-| define_whole_blacker_pixels(hair,stem,curve,| $\cdots$ |);|
-| define_whole_vertical_blacker_pixels(vair,slab,| $\cdots$ |);|
-| define_corrected_pixels(o,| $\cdots$ |);|
+| define_pixels(u,jut,| $\ldots$ |);|
+| define_whole_pixels(letter_fit,fine,crisp,| $\ldots$ |);|
+| define_whole_vertical_pixels(body_height,cap_height,| $\ldots$ |);|
+| define_whole_blacker_pixels(hair,stem,curve,| $\ldots$ |);|
+| define_whole_vertical_blacker_pixels(vair,slab,| $\ldots$ |);|
+| define_corrected_pixels(o,| $\ldots$ |);|
\smallbreak
| if monospace: mono_charwd# := 9u#; define_whole_pixels(mono_charwd);|
| mono_charic# := max(0,body_height#*slant);|
@@ -16746,7 +16780,7 @@ font as a whole. It's a long macro, but here are its important features:
\endlines
If $"letter\_fit"\0=0$, the `^"shrink\_fit"' is set to~1; otherwise
"shrink\_fit" is 0, 1, or~2, depending on how "letter\_fit" has
-rounded to an integer. This amount is essentially subtracted from~^"w"
+rounded to an integer. This amount is essentially subtracted from~^{$w$}
before each character in the font has been drawn. Experience shows that
this trick greatly improves the readability of fonts at ^{medium}
and ^{low resolutions}.
@@ -16787,7 +16821,7 @@ The example programs for period and em-dash say `@pickup@ "fine.nib"' and
the following way:
\beginlines
| clear_pen_memory;|
-| forsuffixes $ = fine,crisp,| $\cdots$ |:|
+| forsuffixes $ = fine,crisp,| $\ldots$ |:|
| $.breadth := $;|
| pickup if $=0: nullpen else: pencircle scaled $; $ := $-eps fi;|
| $.nib := |^|savepen||; breadth_[$.nib] := $;|
@@ -17107,7 +17141,7 @@ another~`f', replace the two f's by character code |oct"013"|
[namely `\char'13'\kern.5pt];
if it's an `i', retain the `f' but replace the `i' by character code
|oct"020"| [a dotless `\char'20'\kern.5pt];
-otherwise skip down to label `|1::|' for further instructions.
+otherwise skip down to label `|1::|'\ for further instructions.
When you're typesetting an `o' or~`b' or~`p', if the next input to \TeX\ is
`e' or~`o', add a half unit
of space between the letters; if it's an `x', subtract a half unit; if it's an
@@ -17130,23 +17164,24 @@ these examples, but we ought to exhibit it for completeness:
\beginsyntax \chardef\\=`\|
<ligtable command>\is[ligtable]<ligtable program><optional skip>
<ligtable program>\is<ligtable step>\alt<ligtable program>[,]<ligtable step>
-<optional skip>\is[,] [skipto]<code>\alt<empty>
+<optional skip>\is[,][skipto]<code>\alt<empty>
<ligtable step>\is<code><ligature op><code>
\alt<code>[kern]<numeric expression>
\alt<label><ligtable step>
<ligature op>\is[=:]\alt[\\=:]\alt[\\=:>]\alt[=:\\]\alt[=:\\>]%
\alt[\\=:\\]\alt[\\=:\\>]\alt[\\=:\\>>]
-<label>\is<code>[:]\alt<code>[::]\alt[\\\\:]
+<label>\is<code label>\alt<code>[::]\alt[\\\\:]
+<code label>\is\<code>[:]
<code>\is<numeric expression>\alt<string expression>
\endsyntax
A \<code> should have a numeric value between 0 and 255, inclusive,
after having been rounded to the nearest integer; or it should be a
string of length~1, in which case it denotes the corresponding
^{ASCII} code (Appendix~C\null). For example, |"A"| and |64.61| both
-specify the code value 65. Vertical bars to the left or right of `|=:|'
+specify the code value 65. Vertical bars to the left or right of `|=:|'\
tell \TeX\ to retain the original left and/or right character that invoked a
ligature. Additional `|>|' signs tell \TeX\ to advance its focus of attention
-instead of doing any further ligtable operations at the current
+instead of doing any further @ligtable@ operations at the current
character position.
{\sl Caution:\/} Novices often go overboard on kerning. Things usually
@@ -17211,15 +17246,15 @@ Here is the formal syntax:
\beginsyntax
<charlist command>\is[charlist]<labeled code>
<labeled code>\is<code>
- \alt<label><labeled code>
-<extensible command>\is[extensible]<label><four codes>
+ \alt<code label><labeled code>
+<extensible command>\is[extensible]<code label><four codes>
<four codes>\is<code>[,]<code>[,]<code>[,]<code>
\endsyntax
-Notice that a \<label> can appear in a ligtable, charlist, or extensible
-command. These appearances are mutually exclusive: No code may be used
-more than once as a label. Thus, for example, a character with a
-ligature/kerning program cannot also be extensible, nor can it be
-in a charlist (except as the final item).
+Notice that a \<code label> can appear in a @ligtable@, @charlist@, or
+@extensible@ command. These appearances are mutually exclusive: No code may be
+used more than once as a label. Thus, for example, a character with a
+ligature/kerning program cannot also be @extensible@, nor can it be
+in a @charlist@ (except as the final item).
\medbreak
The last type of information that appears in a |tfm| file applies to
@@ -17269,7 +17304,7 @@ and this value. The ^{x-height} is also the unit of height that
\TeX\ calls one `|em|'.
\item\bull^@font\_extra\_space@ (|\fontdimen7|) is the additional amount
added to the normal interword space between sentences, depending
-on the ``spacefactor'' as defined in {\sl The \TeX book}.
+on the ``space factor'' as defined in {\sl The \TeX book}.
\smallskip\noindent
Parameters are zero unless otherwise specified.
@@ -17490,9 +17525,9 @@ proofsheets in the experiments of Chapter~5.) \ (2)~Just before a
character image is shipped out, \MF\ implicitly executes the following
sequence of instructions:
\begindisplay
-@if@ round $"xoffset"\ne0$: \ @special@ |"xoffset"|; \
+@if@ round $"xoffset"<>0$: \ @special@ |"xoffset"|; \
@numspecial@ round ^"xoffset"; @fi@\cr
-@if@ round $"yoffset"\ne0$: \ @special@ |"yoffset"|; \
+@if@ round $"yoffset"<>0$: \ @special@ |"yoffset"|; \
@numspecial@ round ^"yoffset"; @fi@\cr
\enddisplay
@@ -17513,8 +17548,8 @@ that doubling the resolution approximately doubles the length of the
when character code~$c$ is being shipped out. \ (The `^|[|' is typed
before output conversion begins, and the `^|]|' is typed after; hence you
can see how much time output takes.) \ If "charext" is nonzero, after
-being rounded to an integer, the typed message is `|[|$c.x$|]|' instead;
-for example, `[65.3]' refers to character~65 with extension code~3.
+being rounded to an integer, the typed message is `|[|$c$|.|$x$|]|' instead;
+for example, `|[65.3]|' refers to character~65 with extension code~3.
\TeX\ allows only 256 characters per font, but extensions of \TeX\
intended for ^{oriental} languages will presumably use the "charext"
@@ -17786,7 +17821,7 @@ or directory name for the gray font. Furthermore the |gf| file might
^^{grayfontarea} ^^{labelfontat}
say, e.g.,
\begindisplay
-@special@ |"labelfontat"|; @numspecial@ 20
+@special@ |"labelfontat"|; \ @numspecial@ 20
\enddisplay
if you want the label font to be loaded at $20\pt$ instead of its ^{design
size}. The area name and the at size must be given after the font name
@@ -18072,7 +18107,7 @@ magnification in a nonstandard way:
|mg := mag; mag := 1; mode_setup;|
|if mg>1: hppp := hppp*mg; vppp := vppp*mg;|
| extra_endchar:=|
-| "if charcode>0:currentpicture:=currentpicture scaled mg;fi"|
+| "if charcode>0:currentpicture:=currentpicture scaled mg;fi;"|
| & extra_endchar; fi;|
\endlines
This circumlocution is the easiest way to guarantee that the ^|tfm| file
@@ -18088,7 +18123,7 @@ The next part of |grayf| computes the pixel representation, "pix\_picture".
| addto currentpicture also|
| currentpicture rotated 90 xscaled -1; fi|
| if unknown scale: scale := max(1,round(pixels_per_inch/300)); fi|
-| pix_wd := pix_ht := 4scale;|
+\goodbreak
| if rep>1: picture pix;|
| currentpicture := currentpicture shifted-(1,1); pix := currentpicture;|
| for r=1 upto rep-1: addto currentpicture also pix shifted(4r,0); endfor|
@@ -18238,8 +18273,8 @@ The corresponding program file `|slant.mf|' looks like this:
|for k=1 upto n:|
| beginchar(k,k*u#*s,n*u#,0);|
| pickup ruler; draw origin--(k*u*s,k*u); % draw the line|
-| unfill (lft-1,bot -1)--(rt 1,bot -1)|
-| --(rt 1,0)--(lft-1,0)--cycle; % clip the ends|
+| unfill (lft -1,bot -1)--(rt 1,bot -1)|
+| --(rt 1,0)--(lft -1,0)--cycle; % clip the ends|
| unfill ((lft -1,0)--(rt 1,0)|
| --(rt 1,top 1)--(lft -1,top 1)--cycle) shifted (k*u*s,k*u);|
| endchar; endfor|
@@ -18391,7 +18426,7 @@ the ^|\alternation| operation will typeset `|opopopopopopopopo|' and
The |\series| operation puts the background character between all the
others (e.g., `|opoqo|'). Special series containing the lowercase
letters of \TeX\ text fonts (including `\char'31', `\char'32',
-`\char'33', and ~\char'34') and the uppercase letters (including
+`\char'33', and~`\char'34') and the uppercase letters (including
`\char'35', `\char'36', and~`\char'37') are provided.
Although |\mixture| and |\alternation| show you the effects of
ligatures and kerning, |\series| does not.
@@ -18533,7 +18568,7 @@ would use this feature.)
\endlines
Two of the most important combinations of tests are treated now:
-^|\sample| prints the |\table| and the |text|; ^|\bigtest| gives
+^|\sample| prints the |\table| and the |\text|; ^|\bigtest| gives
you the works, plus a mysterious word that is traditional in type
specimens: ^^{hamburgefonstiv}
\beginlines
@@ -18783,7 +18818,7 @@ redefine them.
|**|, as command-line prompt, 31--32, 35--40, 187, 269, 279.
\sub as exponentiation sign, @59, @64, 72, @237, @251, +265.
|/| (slash), 328, 329.
-\sub \llap{\char`\*}as divided-by sign, @59, @62, @63, +72, 80, 82, 210--211.
+\sub \llap{\char`\*}as divided-by sign, @59, @62, @63, +72, 80, 82, 211.
\| (vertical line), 117, 297.
*|\| (backslash), +179, @236, @262.
\sub at beginning of command line, @31, @38, 40.
@@ -18808,7 +18843,7 @@ redefine them.
*|>| (greater than sign), @64, +170, 210, 237.
|>>| (shown value), 41, 62.
*|>=| (greater than or equal to), @64, 65, +170, 210, 282.
-*|,| (comma), 57, 72, 73, 129, 155, 165--167, 171, 317, 318.
+*|,| (comma), 57, 72, 73, 129, 155, 165--167, 171, 211--213, 218, 317, 318.
|,,|\thinspace, 51.
|.|~(period), 43, +50, 51.
`\char`\.', 306.
@@ -18829,7 +18864,7 @@ redefine them.
*|@#| (suffix of at point), @176, +177, +178, 251, @273--@274.
\newletter
`a', 192.
-`A', 163, 164, 248, 302--303.
+`A', 10--11, 163, 164, 248, 302--303.
|abort|, 312--313.
|abs| (absolute value), @66, 82, @238, +264.
accents, 315, 317.
@@ -18839,7 +18874,7 @@ Adams, John, 359.
addition of pictures, 115, @117, @245.
addition of vectors, 9, @68.
*|addto|, +118--+119, @144, @151, @242--@245.
-\<addto command>, +220.
+\<addto command>, 118, +220.
|adjust_fit|, 306--308.
{\AE}schylus, 47.
{\AE}sopus, 340.
@@ -18895,7 +18930,7 @@ Beethoven, Ludwig van, 185.
*|begingroup|, +155--+157, 175, 178, 210--215, 217, @236, @243, @275, @289.
|beginlogochar|, 160, 302.
Bell, Eric Temple, 11.
-bell-shaped distribution, 251.
+bell-shaped distribution, +183, 251.
Bernshte{\u\i}n, Serge{\u\i} \thinspace Natanovich, 14.
\sub polynomials, 14, 133, 152, 246, 298--299.
B\'ezier, Pierre Etienne, 14.
@@ -18904,7 +18939,7 @@ Bierce, Ambrose Gwinnett, ix.
|\bigtest|, +341.
Billawala, Nazneen Noorudin, 266, 294.
binary search, 176--177, @293--@294.
-black, 270, 332--333.
+|black|, 270, 332--333.
black-letter, 294.
black/white reversal, 115.
|blacker|, 93--94, 268, +270--+271.
@@ -18912,7 +18947,7 @@ black/white reversal, 115.
Boole, George, 170.
*|boolean|, 55, +56.
\<boolean expression>, 170, +210.
-Boolean expressions, 170, 257.
+boolean expressions, 170, 257.
\<boolean primary>, 170, +210.
\<boolean secondary>, 170, +210.
\<boolean tertiary>, 170, +210.
@@ -18956,7 +18991,7 @@ chance, 183--185.
*|charcode|, 106, 210, 212, +220, @275, 324.
*|chardp|, 106, 212, 220, @275, +315--+316, 324.
*|chardx|, 106, 212, 220, @276, +324, @334.
-*|chardy|, 212, +324.
+*|chardy|, 106, 212, 220, +324.
*|charexists|, +106, 210, 316, 324.
*|charext|, 106, 212, +220, 316, 324.
*|charht|, 106, 212, 220, @275, +315--+316, 324, @334, @335.
@@ -18982,7 +19017,7 @@ circles, 123--124, 148.
|cmr10.mf|, 305.
|cmsl10|, 101.
|cmtt10|, 306.
-\<code>, +317.
+\<code> and \<code label>, +317.
codes, 281--283.
Colburn, Dorothy, 107.
collective subscripts, 56, 177.
@@ -18991,14 +19026,14 @@ command line, 38, 187, 269, 277, 301.
commands, 155, 217--220, 230, 321.
comments, 43, 50--51.
commutativity, 247.
-comparison, @65--@66, 80, 170.
+comparison, @65, 80, 170.
compass directions, 26, 119, 206--207, 228--229.
complex numbers, 69.
\<compound>, +217.
compound statement, +155, 217.
Computer Modern, 35, 103--105, 203, 206, 279, 304--313.
-concatenation, of paths, @70--@71, @123, 127, 129, +130, @245.
-\sub of strings, @69, 84--85, +187, @278, @286, @312.
+concatenation, of paths, @70--@71, @123, 127--129, +130, 137, @245, @266.
+\sub of strings, @69, 73, 84--85, +187, @278, @286, @312.
\<condition>, +169.
conditional and/or, 288--289.
conditions, 169--171, 179, 219, 259.
@@ -19039,7 +19074,7 @@ Cundall, Frank, 299.
curves, 13--19, \see paths.
cusps, 136.
|cutdraw|, @151, +271--+272.
-|cutoff|, @150, +272.
+|cutoff|, @150--@151, +272.
*|cycle|, @15, @16, @24--@28, @69, +129--+131, 170, 171, 210, 213.
\newletter
|d|, 35, @76, 102, 204, +275.
@@ -19057,7 +19092,7 @@ debugging tricks, 229--231, 286.
\<decimal digit>, +50.
decimal point, 50--51.
decimal representation, 188.
-\<declaration>, 56, +171.
+\<declaration>, +56, 171.
\<declaration list>, +57.
declarations, 56--57.
declarative versus imperative, 87.
@@ -19104,12 +19139,12 @@ dimensions, 92, +267.
|direction|, @69, 70, @135, @235, +265.
\<direction specifier>, 129, +213.
|directionpoint|, @135, +265.
-*|directiontime|, @135, @+136, 211, 245, 265, @295.
+*|directiontime|, @135, @+136, 211, 245, 265, @298.
|dishing|, 152, 164.
*|display|, +191--+192, 220.
\<display command>, +220.
|displaying|, 269, 276, 278.
-distance, 76, 84.
+distance, 76, 84, \also |length|.
|ditto|, @187, +263.
|div|, +265.
division, @59, @62, @63, 80, 82.
@@ -19117,7 +19152,7 @@ division, @59, @62, @63, 80, 82.
Dopping, Olle, 181.
|dot|, 306, 311.
dot product, 69.
-|dotprod|, @69, 178, @238, 265.
+|dotprod|, @68--@69, 178, @238, 265.
|dotsize|, 332, 334.
double-quote mark, 50--51, 187.
*|doublepath|, 118, +119, @151, 220.
@@ -19131,8 +19166,8 @@ Drayton, Michael, 279.
drift, 102, 106.
driver files, 304--306.
*|dropping|, 118, +120, 220.
-D\"urer, Albrecht, 13, 19.
*|dump|, 217, +221, 262, @279, @311.
+D\"urer, Albrecht, 13, 19.
|.dvi|, 32, 40, 103, 106, 323, 327, 328.
\newletter
|e|, 27--29, 273.
@@ -19140,7 +19175,7 @@ D\"urer, Albrecht, 13, 19.
edge structure, 116--117, 296--297.
edges, 116.
editing, 46.
-efficiency, 39, 99, 141, 144, 147, 228, 230, 234, 244, 264, 265, 277,
+efficiency, 39, 99, 116, 141, 144, 147, 228, 230, 234, 244, 264, 265, 277,
291, 297, 298.
El Palo Alto, 124--126, 139, 228--229.
ellipses, 123, 126.
@@ -19149,7 +19184,7 @@ Ellis, Henry Havelock, 11.
*|elseif|, +169--+170, 179.
em dash, 306.
emergency stops, 226.
-empty option in {\bf for\/} list, 171, @299.
+empty option in {\bf for\/} list, 171, +172, @299.
empty statement, 155, 217.
empty text argument, 299.
*|end|, @31, @37, 155, 167, 217, 221, 226, 278, 287, 305, @321.
@@ -19246,7 +19281,7 @@ font metric information, 39, 220, 315--321.
|\fontname|, 342.
*|for|, @18, @39, @113, +171--+173, 179, 228, @285--@291, @299.
\<for list>, +171, 299.
-forbidden tokens, +173, 218--219, 286.
+forbidden tokens, 173, +218--+219, 286.
*|forever|, @61, +171--+173, @176, 179.
*|forsuffixes|, +171--+172.
{\sevenrm FORTRAN} language, 237.
@@ -19254,7 +19289,7 @@ forbidden tokens, +173, 218--219, 286.
four-point method for curves, 13--14, 133.
Fournier, Simon Pierre, 321. % Harry Carter says S.P. is right, not P.S.!
fractions, 61, @62--@63, +72, 73.
-*|from| 191, 220, @252, @277, @312.
+*|from|, +191, 220, @252, @277, @312.
|fullcircle|, @114, 123--124, 126, @135--@137, +263, @266.
Fulton, A\period\ G\period, 157.
function values by interpolation, 294--295.
@@ -19269,7 +19304,7 @@ Gardner, Martin, 126.
|gfcorners|, 277, +278, 327.
|GFtoDVI|, 32, 37, 187, 327--336.
|gimme|, 61--62.
-Giotto de Bondone, 139.
+Giotto di Bondone, 139.
|gobble|, @167, +262, @289.
|gobbled|, +262, @289--@290.
golden ratio, 11.
@@ -19290,7 +19325,7 @@ gray fonts, 327, 330--335.
|grayfontarea|, 329.
|grayfontat|, 329.
greater than or equal to, 65.
-greatest integer function, \see floor.
+greatest integer function, \see |floor|.
grid, 5, 109, 275.
Grimm, Jakob Ludwig Karl, 73.
Grimm, Wilhelm Karl, 73.
@@ -19343,12 +19378,12 @@ inaccessible token, 286.
incomplete string, 50--51.
inconsistent equations, 82, 313.
|incr|, @39, 176--177, +266.
-independent variables, +81--+83, 88, 224, 226.
+independent variables, +81--+83, 88, 224, 226, 299.
infinite loops, 172, 226--227.
|infinity|, @62--@69, +263, @266.
inflection points, 18--19.
|INIMF|, 221, 262, 279.
-|\init|, 342.
+|\init|, +337, 342.
\<initial value>, +171.
*|inner|, 180, +218--+219, 286--287, @307, @321.
|inorder|, 290.
@@ -19360,9 +19395,9 @@ integers, 65--66.
interacting with \MF, 42--45, 61, 188--189, 191--193, 219, 223--225.
*|interim|, +155--+156, 230, @243, @244, @271, @272.
\<interim command>, 155, +218.
-internal quantities, 54--55, 88, 218, 262.
+internal quantities, 54--55, 88, 218, 262, 265--266.
\sub table, 211--212.
-\<internal quantity>, 156, 218, 265.
+\<internal quantity>, 156, 218.
|interpath|, 134, +267.
interpolation, 2, 134, 294--295.
interrupting \MF, 219, 227--228, 313.
@@ -19373,7 +19408,7 @@ intersection, of lines, 84.
*|intersectiontimes|, +136, @178, 213, @265, @294, @298.
|inverse|, @143, +264.
inverse video, 115, 118.
-*|inwindow|, +191, @277.
+*|inwindow|, +191, 220, @277.
Io, 33, 40, 47.
\<is>, 165, 171, +218.
Isis, 40.
@@ -19389,12 +19424,12 @@ Johnson, Samuel, 167.
Johnston, Edward, 29.
|join_radius|, 266.
jokes, viii, 231.
-Journal of Algorithms, 137--139.
+{\sl Journal of Algorithms}, 137--139.
|jut|, 162, 308.
\newletter
Kafka, Franz, 340.
Kandinski\u\i, Vasili\u\i\ Vasil'evich, 3.
-\<keep or drop>, +118, 120.
+\<keep or drop>, +118, 220.
*|keeping|, 118, +120, 220.
|keepit|, 295.
*|kern|, @97, @316, +317.
@@ -19408,38 +19443,37 @@ Knuth, Nancy Jill Carter, ix, 134, 137.
\newletter
|l|, 308--309.
La Rochefoucauld, Fran\c cois VI, 313.
-\<label>, +317.
+\<label>, +317--+318.
\<labeled code>, +318.
|labelfont|, +275, 329.
|labelfontarea|, 329.
|labelfontat|, 329.
-|labels|, @107, +274--+275, 327--328.
+|labels|, @107, +274, 327--328.
labels in font metric information, 317--318.
-labels on "proofmode" output, 37, 187, 274--275.
+labels on |proof| mode output, 37, 187, 274--275.
|labels.top|, 328.
Lam\'e, Gabriel, 126.
|large_pixels|, 332.
|lcode_|, 274, 328.
le B\'e, Pierre, 207.
-least integer function, \see ceiling.
+least integer function, \see |ceiling|.
Leban, Bruce Philip, 242, 243, 270, 295.
|left|, @16, +263.
left-handed dangerous bend, 143.
|leftstemloc|, 96, 199, 302.
-*|length|, @66, @69, 72, 211, 238.
+*|length|, @66, @69, 72, 210, 238.
less than or equal to, 65.
*|let|, 53, 180, +218, @287--@289, @299, @311.
\<let command>, +218.
|letter_fit|, 307--308.
-\<leveldef>, +178.
-\<leveldef heading>, 165, +178.
+\<leveldef> and \<leveldef heading>, 165, +178.
|lft|, @23, @77, 80, 147, 151, +273.
lies, viii, 231.
Life, 121.
\<ligature op>, +317.
ligatures, 305--306, 315--317.
|lightweight|, 332.
-*|ligtable|, @97, @305, +316--+317.
+*|ligtable|, @97, @305--@306, +316--+317.
\<ligtable command>, +317.
\<ligtable program>, +317.
\<ligtable step>, +317.
@@ -19459,10 +19493,9 @@ logo of \MF, ii, 22--23, 95--99, 160--161, 184--185, 199--200, 204, 301--304.
|logo.mf|, 95--98, 199, 302--303.
logos, {\it i}, 97, @114, @137--@139.
|logo10.mf|, 95, 287, 301, 304.
-\<loop>, +171.
-\<loop header>, +171.
+\<loop> and \<loop header>, +171.
loop text, 171--172, 219, 286.
-loops, 169, 179, 226--227, 259, 290--291, 299.
+loops, 169, 171--173, 179, 226--227, 259, 290--291, 299.
low-resolution proofs, 99, 327.
|\lowers|, 339.
|lowres|, 196, 201, 230, +270.
@@ -19536,7 +19569,7 @@ multiplication, @59, @62--@64, 69, 79--80, 82.
music, 183, 185.
\newletter
`n', 201--203.
-`N', 184--185, 303.
+`N', 184--185, 302--303.
|\names|, 339.
National Science Foundation, ix.
Naur, Peter, 49, 89.
@@ -19568,7 +19601,7 @@ numeric expressions, 72--73, 257.
\<numeric secondary>, 72, 178, +211.
\<numeric tertiary>, 72, +211.
\<numeric token>, +50, 236.
-\<numeric token primary>, 72, +210.
+\<numeric token primary>, 72, +211.
numeric tokens, 49--50, 166.
\sub maximum value, 50.
\sub rounded fractional values, 50.
@@ -19576,9 +19609,9 @@ numeric tokens, 49--50, 166.
*|numspecial|, 220, @274, +323--+324, @327--@329.
|numtok|, @+274.
\newletter
-|o|, @23, @34, +93, 197, 200, 204, 302.
+|o|, @23, @34, +93, 197, 200, 204, 240, 302.
`o', 203.
-`O', 32--37, 199, 303.
+`O', 32--37, 161, 199, 302--303.
|o_correction|, 93--94, 268.
*|oct|, +188, 211, 281.
octal notation, 188.
@@ -19588,13 +19621,13 @@ octants, 119, 206--207, 228--230.
of-the-way function, \see mediation.
off by $x$, 82.
Office of Naval Research, ix.
-|offset|, 275, 379.
+|offset|, 275, 329.
|!| |OK|, 219, 224.
|\omitaccents|, 340.
one-point {\bf draw}, 22, 150, 200, 253.
online interaction, 42--45, 61, 188--189, 191--193, 219, 223--225.
|openit|, +277, 312.
-*|openwindow|, +191--+193, 220, @277, @312--@313.
+*|openwindow|, +191--+193, 220, @277, @312.
\<openwindow command>, 191, +220.
operands, 59.
operators, 59, 230.
@@ -19611,7 +19644,7 @@ output of \MF, 39, 42, 315--325.
|overdraw|, 114, 243.
overflow labels, 37, 328.
overlays, 295.
-overshoot, 23, 34, 93, 197, 200, 204.
+overshoot, 23, 34, 93, 197, 200, 204, 302.
\newletter
`P', 207.
Paget, Francis Edward, 279.
@@ -19659,9 +19692,9 @@ pen expressions, 147--148, 258, 298.
*|pencircle|, @21--@23, @28, @29, +147--+149, @150--@152, 198, 200, 214.
|penlabels|, 36, +274.
*|penoffset|, +150, 212, 230, @298.
-|penpos|, @26--@29, 37, @103, @162, +273, 310.
+|penpos|, @26--@29, 37, 80, @103, @162, +273, 310.
|penrazor|, @107, @112, 147, 150, +264, 297.
-pens, 21--39, 147--152, 297--298.
+pens, 21--29, 147--152, 297--298.
|penspeck|, +264, @271.
|pensquare|, 147, 152, +264, 275.
|penstroke|, 27--29, @138, +273.
@@ -19755,14 +19788,14 @@ reverse video, 115, 118.
Reynolds, Lloyd Jay, 153.
|right|, @26, @68, +263.
\<right-hand side>, +88, 171.
-*|rotated|, @21--@22, @25, 27, 44, @68, 73, @107, @114, @117, +141, 212, @238.
+*|rotated|, @21--@22, @25, 27, 44, @68, 73, @107, @114, @117, +141, 213, @238.
|rotatedabout|, +266.
|rotatedaround|, @138, 141, @142, @144, 159--160, +266.
|round|, @66, 196, 202, +264, @273.
rounding, 34--35, 50, 195--207, 308.
|rt|, @23, @77, 80, @103, 147, 151, +273.
|rtest.mf|, 311.
-|rule|, 234, 328.
+|rule|, 274, 328.
|rulepen|, +274, 275.
rules on proofsheets, 328--329.
|rulethickness|, 275, 329.
@@ -19778,7 +19811,7 @@ sans-serif, 105, 305, 308.
\<save command>, 155, +218.
|savepen|, @96, 147, +272, @310.
\<scalar multiplication operator>, 72, +211.
-*|scaled|, @21--@23, @68, 73, +141, 212, 244, 291.
+*|scaled|, @21--@23, @68, 73, +141, 213, 244, 291.
*|scantokens|, @61, +179, @180, 189, 251, @269, @270, @286--@288, @313.
scatter plots, 183.
\<screen coordinates>, 191, +220.
@@ -19811,7 +19844,7 @@ sharped dimensions, @32--@35, 91--99, 102--103, 268, 315.
*|showdependencies|, 81, 83, +219, @262.
|showit|, @31, 191, @276, +277, 295.
*|showstats|, +219.
-*|showstopping|, 211, @227, 230, @262.
+*|showstopping|, 211, 219, @227, 230, @262.
*|showtoken|, 180, +219, @221.
*|showvariable|, 175, 177, 180, +219.
|shrink_fit|, 308--310.
@@ -19835,7 +19868,7 @@ slant fonts, 329, 335--336.
|solve|, 176--177, +267, @292--@294.
|(some| |charht| |values...)|, 316.
Southall, Richard Francis, 176.
-spaces, 43, 50, 236.
+spaces, 43, 50, 236, 319.
sparks, +53--+55, 156, 175, 215, 219, 289.
*|special|, 220, @240--@241, @274, +323--+324, @327--@329.
\<special command>, +220.
@@ -19867,9 +19900,9 @@ strange paths, 110--111, 119, 121, 136, 152, 228--229.
Stravinski{\u\i}, Igor' F\"edorovich, 193.
stretchability, 319.
Strindberg, Johan August, 185.
-*|string|, 55, +56, 69.
+*|string|, 55, +56.
\<string expression>, 73, 187, +214.
-string expressions, 187--189, 258, 286.
+string expressions, @69, 187--189, 258, 286.
\<string primary>, 187, +214.
\<string secondary>, 187, +214.
\<string tertiary>, 187, +214.
@@ -19889,7 +19922,7 @@ Suetonius Tranquillus, Gaius, 181.
|(SUFFIX|$_n$|)|, 44, 251.
sum, of pictures, 115, @117, @245.
\sub of transforms, 178.
-\sub of vectors, 9.
+\sub of vectors, 9, @68.
|superellipse|, @126, @138, +267.
superellipses, 126, 161.
|superness|, 126.
@@ -19923,14 +19956,14 @@ tapered stroke, 28.
*|tertiary|, 165, 167.
\<tertiary>, 71, @137, +209.
*|tertiarydef|, 166, +178, @266.
-|test.mf|, 311--312.
+|test.mf|, 311--313.
|testfont.tex|, 40, 336--342.
-\TeX, 1, 34, 40, 91, 96, 98, 101--102, 315, 336--343, 361.
+\TeX, 1, 34, 40, 91, 96, 98, 101--103, 315, 336--343, 361.
*|text|, @161, +165--+167.
|\text|, 340.
|(TEXT|$_n$|)|, 45, 249, 251.
-text arguments, 219, 288--290, 299.
-|.tfm|, 39, 315--317, 333, 335.
+text arguments, 219, 288--291, 299.
+|.tfm|, 39, 315--321, 333, 335.
|!| |This| |can't| |happen|, 226.
Thomson, James, 189.
Thoreau, Henry David, 221.
@@ -19945,7 +19978,7 @@ Tinguely, Jean, 3.
|titlefont|, +275, 329.
|titlefontarea|, 329.
|titlefontat|, 329.
-*|to|, 191, 220, @252, @277, @312.
+*|to|, +191, 220, @252, @277, @312.
|<to| |be| |read| |again>|, 223.
Tobin, Georgia Kay Mase, ii, 240.
tokens, 42--43, +49--+51, 210.
@@ -20004,9 +20037,9 @@ typographic errors, 45, 224.
|!| |Undefined| |coordinate|, 224.
undelimited arguments, +167.
\<undelimited parameters>, +165.
-undelimited suffix parameters, +167, 176, 265, 270.
+undelimited suffix parameters, +167, 176, 266, 270.
underline characters, 49, +51, 173, 265, 270.
-|undraw|, 113, 118, 120, 242, +271.
+|undraw|, 113, 118, 120, @242, +271.
|undrawdot|, 113, +271.
unequal to, 65.
|unfill|, @25, 27, 109--110, 118, @126, +271.
@@ -20017,10 +20050,10 @@ Union Jack, 7.
|unitpixel|, +263, @333.
units of measure, 33, 91--99, 267--268.
\sub table, 92.
-|unitsquare|, @116, 128, 132, 136, +263.
+|unitsquare|, @116, 123--124, 128, 132, 136, +263.
|unitvector|, @238, +264.
-*|unknown|, 79--82, 143, +170, 210.
-unknown quantities, nonnumeric, 84--85.
+*|unknown|, +170, 210.
+unknown quantities, nonnumeric, 84--85, 143.
\sub numeric, 79--83.
*|until|, @18, 171.
|up|, @32, @129, +263.
@@ -20034,9 +20067,9 @@ vacuous expressions, 209, +215, 250, 262, 289, 292.
\<vacuous secondary>, +215.
\<vacuous tertiary>, +215.
valentine, 134.
-values, disappearance of, 56, 88, 156--157.
+values, disappearance of, 56, 83, 88, 156--157, 177--178, 218, 239, 299.
*|vardef|, 166, @175--@178, 289.
-\<vardef heading>, +178.
+\<vardef heading>, 165, +178.
\<variable>, 54, +55, 210.
variables, 53--57, 59.
\sub reinitializing, 88, 157.
@@ -20059,7 +20092,7 @@ Wilkins, John, ii, 283.
Willis, Ellen Jane, 157.
\<window>, 191, +220.
\<window spec>, 191, +220.
-\<with clause>, +118, 120.
+\<with clause>, +118, 220.
*|withpen|, 118, 220, @242.
*|withweight|, 118, 220, @242, @297.
|WNW|, 119, 228--229.
@@ -20072,7 +20105,7 @@ Xerox Corporation, 320.
*|xoffset|, 212, +220, @309, 315, 324.
xor, 120.
*|xpart|, @68, 72, @138, 142, 211.
-*|xscaled|, @21--@23, @68, 73, +141, 213, 244, 291.
+*|xscaled|, @21--@22, @68, 73, +141, 213, 244, 291.
*|xxpart|, 72, 142, @160, 211.
|xy_swap|, 297.
*|xypart|, 142, @160, 211.
diff --git a/systems/knuth/dist/mf/trap.72270gf b/systems/knuth/dist/mf/trap.72270gf
new file mode 100644
index 0000000000..5ef0e4f660
--- /dev/null
+++ b/systems/knuth/dist/mf/trap.72270gf
Binary files differ
diff --git a/systems/knuth/dist/mf/trap.fot b/systems/knuth/dist/mf/trap.fot
index 6bceb9f67e..b5551c805c 100644
--- a/systems/knuth/dist/mf/trap.fot
+++ b/systems/knuth/dist/mf/trap.fot
@@ -1,4 +1,4 @@
-This is METAFONT, Version 2.7182818 (INIMF)
+This is METAFONT, Version 2.71828182 (INIMF)
** &trap trap
(trap.mf
\*//*\trap\pass2!
@@ -36,7 +36,7 @@ xpart '=-ypart '-0.66667
{qq:=pen}
{showstats}
Memory usage 1462&588 (104 still untouched)
-String usage 41&161 (815&7634 still untouched)
+String usage 41&161 (816&7678 still untouched)
{[repeat the loop]}
! A group begun on line 163 never ended.
<to be read again>
diff --git a/systems/knuth/dist/mf/trap.log b/systems/knuth/dist/mf/trap.log
index 611ce589e2..1861267898 100644
--- a/systems/knuth/dist/mf/trap.log
+++ b/systems/knuth/dist/mf/trap.log
@@ -1,4 +1,4 @@
-This is METAFONT, Version 2.7182818 (preloaded base=trap 2014.1.7) 7 JAN 2014 18:11
+This is METAFONT, Version 2.71828182 (preloaded base=trap 1776.7.4) 4 JUL 1776 12:00
** &trap trap
(trap.mf
{if}
@@ -161,7 +161,7 @@ true-or-false value. I'm changing it to `false'.
path
l.25 path
p[][]p,w,qw; qw=(1,-2)..(2,-1)..(2.5,0.5)..(1,2)..(...
-After `exitif <boolean exp>' I expect to see a semicolon.
+After `exitif <boolean expr>' I expect to see a semicolon.
I shall pretend that one was there.
{pair}
@@ -1822,7 +1822,7 @@ row -2: | -4+ -3- -2+ -1-
{showstats}
Memory usage 1084&202 (749 still untouched)
-String usage 24&92 (858&11309 still untouched)
+String usage 24&92 (859&11353 still untouched)
{addto}
{(path)yscaled(0.01666)}
Path at line 82, before subdivision into octants:
@@ -3046,7 +3046,7 @@ For safety's sake I'll ignore the present command.
substring
l.124 ...aderbyte(48.5)substring
(-9,9)of"long"; for\=0:\
-A colon should follow a headerbyte or fontinfo location.
+A colon should follow a headerbyte or fontdimen location.
{-(9)}
{((-9,9))substring("long")}
@@ -3690,9 +3690,9 @@ XPR1)+2)-(1,(EXPR1)+2)rotated90
alpha=0.45p3~+7
{tracingcapsules:=1}
{showdependencies}
-xpart %CAPSULE1359=xx
-%CAPSULE1367=2yy-2
-%CAPSULE1375 = 3.3333xx+3.3333
+xpart %CAPSULE1370=xx
+%CAPSULE1378=2yy-2
+%CAPSULE1386 = 3.3333xx+3.3333
alpha=0.45p3~+7
{show}
{(1/3)*((3,6))}
@@ -3752,62 +3752,62 @@ o4=0.44444o2+0.88889o1
o5=0.44444o2+0.88889o1
oo=1.7o2+1.6o1-18
%CAPSULE382 = 3ooo-0.01o3
-xpart %CAPSULE1049 = 8000o2-4000o1+1000o3+9
-xpart %CAPSULE1383=xpart '
-ypart %CAPSULE1383=ypart '
+xpart %CAPSULE604 = 8000o2-4000o1+1000o3+9
+xpart %CAPSULE1394=xpart '
+ypart %CAPSULE1394=ypart '
alpha=0.45p3~+7
{numeric}
-### 4000o1 = -xpart %CAPSULE1049+8000o2+1000o3+9
-### -4.87383o2 = -oo-0.0004xpart %CAPSULE1049+0.39673o3-17.99643
+### 4000o1 = -xpart %CAPSULE604+8000o2+1000o3+9
+### -4.87383o2 = -oo-0.0004xpart %CAPSULE604+0.39673o3-17.99643
#### o6=-0.00027
### -0.04366o3 = -o4+0.46689oo+8.40439
### -o4 = -o5
### 0.22894o5 = -%CAPSULE382+0.10689oo+3ooo+1.92412
{begingroup}
{pair}
-### -alfa=-xpart %CAPSULE1494
+### -alfa=-xpart %CAPSULE368
{endgroup}
-{xpart((xpart %CAPSULE1494,0))}
-### -xpart %CAPSULE17=-%CAPSULE1176
+{xpart((xpart %CAPSULE368,0))}
+### -xpart %CAPSULE17=-%CAPSULE1376
{endgroup}
-{(%CAPSULE382)+(%CAPSULE1176)}
-### -%CAPSULE382=-%CAPSULE1893+%CAPSULE1176
-### -%CAPSULE1893=-ypart %CAPSULE1049
+{(%CAPSULE382)+(%CAPSULE1376)}
+### -%CAPSULE382=-%CAPSULE1364+%CAPSULE1376
+### -%CAPSULE1364=-ypart %CAPSULE604
{begingroup}
{save}
{(1)-(p$)}
{restoring p}
-### p$=-ypart %CAPSULE604+1
+### p$=-ypart %CAPSULE1360+1
{endgroup}
-{(2/3)*((-ypart %CAPSULE604+1,ypart %CAPSULE604))}
-### ypart %CAPSULE604=-xpart %CAPSULE604+1
-### -0.66667xpart %CAPSULE604=-xpart %CAPSULE1889
-{-((xpart %CAPSULE1889,-xpart %CAPSULE1889+0.66667))}
-### xpart %CAPSULE1889=-xpart %CAPSULE1172
-{((xpart %CAPSULE1049,ypart %CAPSULE1049))=((xpart %CAPSULE1172,-xpart %
-CAPSULE1172-0.66667))}
-## xpart %CAPSULE1172=-ypart %CAPSULE1049-0.66667
-## ypart %CAPSULE1049=-xpart %CAPSULE1049-0.66667
-### -xpart %CAPSULE1049=-xpart %CAPSULE1172
-{((xpart ',ypart '))=((xpart %CAPSULE1172,-xpart %CAPSULE1172-0.66667))}
-## xpart %CAPSULE1172=-ypart '-0.66667
+{(2/3)*((-ypart %CAPSULE1360+1,ypart %CAPSULE1360))}
+### ypart %CAPSULE1360=-xpart %CAPSULE1360+1
+### -0.66667xpart %CAPSULE1360=-xpart %CAPSULE1744
+{-((xpart %CAPSULE1744,-xpart %CAPSULE1744+0.66667))}
+### xpart %CAPSULE1744=-xpart %CAPSULE1675
+{((xpart %CAPSULE604,ypart %CAPSULE604))=((xpart %CAPSULE1675,-xpart %CA
+PSULE1675-0.66667))}
+## xpart %CAPSULE1675=-ypart %CAPSULE604-0.66667
+## ypart %CAPSULE604=-xpart %CAPSULE604-0.66667
+### -xpart %CAPSULE604=-xpart %CAPSULE1675
+{((xpart ',ypart '))=((xpart %CAPSULE1675,-xpart %CAPSULE1675-0.66667))}
+## xpart %CAPSULE1675=-ypart '-0.66667
## xpart '=-ypart '-0.66667
{begingroup}
{(0.5)*(ooo)}
{begingroup}
{numeric}
-### -ooo=-%CAPSULE1494
+### -ooo=-%CAPSULE1051
{endgroup}
-{(%CAPSULE1494)+(1)}
-### -%CAPSULE1494=-%CAPSULE1350+1
-{(1/2)*(%CAPSULE1350)}
-### -0.5%CAPSULE1350=-%CAPSULE1367
-{-(%CAPSULE1367)}
-### %CAPSULE1367=-%CAPSULE1893
-{(2)*(%CAPSULE1893)}
-### -2%CAPSULE1893=-%CAPSULE1885
-{(-0.5%CAPSULE1885-0.5)=(%CAPSULE1885)}
-## %CAPSULE1885=-0.33333
+{(%CAPSULE1051)+(1)}
+### -%CAPSULE1051=-%CAPSULE1378+1
+{(1/2)*(%CAPSULE1378)}
+### -0.5%CAPSULE1378=-%CAPSULE1370
+{-(%CAPSULE1370)}
+### %CAPSULE1370=-%CAPSULE1362
+{(2)*(%CAPSULE1362)}
+### -2%CAPSULE1362=-%CAPSULE1354
+{(-0.5%CAPSULE1354-0.5)=(%CAPSULE1354)}
+## %CAPSULE1354=-0.33333
{(oo)=(-0.33333)}
## oo=-0.33333
{endgroup}
@@ -4232,7 +4232,7 @@ xpart '=-ypart '-0.66667
{qq:=pen}
{showstats}
Memory usage 1462&588 (104 still untouched)
-String usage 41&161 (815&7634 still untouched)
+String usage 41&161 (816&7678 still untouched)
{[repeat the loop]}
! A group begun on line 163 never ended.
<to be read again>
@@ -4248,8 +4248,8 @@ by `endgroup'. So I've inserted `endgroup' now.
(end occurred when if on line 36 was incomplete)
(end occurred when elseif on line 21 was incomplete)
Here is how much of METAFONT's memory you used:
- 68 strings out of 883
- 3752 string characters out of 11386
+ 68 strings out of 884
+ 3752 string characters out of 11430
2897 words of memory out of 3001
289 symbolic tokens out of 2100
8i,43n,14r,8p,167b stack positions out of 30i,100n,300r,150p,500b
diff --git a/systems/knuth/dist/mf/trap.pl b/systems/knuth/dist/mf/trap.pl
index bae32a41fb..bae32a41fb 100644..100755
--- a/systems/knuth/dist/mf/trap.pl
+++ b/systems/knuth/dist/mf/trap.pl
diff --git a/systems/knuth/dist/mf/trap.typ b/systems/knuth/dist/mf/trap.typ
index 159c5ce7fc..9994dcc000 100644
--- a/systems/knuth/dist/mf/trap.typ
+++ b/systems/knuth/dist/mf/trap.typ
@@ -1,6 +1,6 @@
This is GFtype, Version 3.1
Options selected: Mnemonic output = true; pixel output = true.
-' METAFONT output 2014.01.07:1811'
+' METAFONT output 1776.07.04:1200'
35: beginning of char 5: -4096<=m<=4094 -2<=n<=1
(initially n=1) paint (4095)1
diff --git a/systems/knuth/dist/mf/trapin.fot b/systems/knuth/dist/mf/trapin.fot
new file mode 100644
index 0000000000..c1dc047847
--- /dev/null
+++ b/systems/knuth/dist/mf/trapin.fot
@@ -0,0 +1,78 @@
+This is METAFONT, Version 2.71828182 (INIMF)
+**
+Please type the name of your input file.
+**\input trap
+(trap.mf
+>> << == >> ::: ||`` ''--!! ??## && @@ $$[[]]{{ }}((5.5 0.5))
+>> ".."
+! Not implemented: (unknown numeric)++(string).
+<to be read again>
+ ;
+l.4 ...}} . (( 5.5.5 )) ++ "..";
+
+..
+! Missing `=' has been inserted.
+<to be read again>
+ ,
+l.5 begingroup save =; let=,
+ ; save,; newinternal $=,; let )...
+> errorstopmode=errorstopmode
+> readstring=readstring
+> 2
+> "2"
+> ,=,
+> (=tag
+> )=,
+<< == >> ::: ||`` ''--!! ??## && @@ $$[[]]{{ }}(([][]))=numeric
+<< == >> ::: ||`` ''--!! ??## && @@ $$[[]]{{ }}((5.5 0.5))=<< == >> :::
+||`` ''--!! ??## && @@ $$[[]]{{ }}((5.5 0.5))
+> year=month
+! OK.
+l.6 ...ring,2,"2",,,(,),<<,year;
+
+! Missing `:' has been inserted.
+<to be read again>
+ ;
+l.8 ...not cycle "":1.1 forever;
+ fi;
+> |=:|>=|=:|>
+! OK.
+l.9 ... endfor; showtoken |=:|>;
+
+! Arithmetic overflow.
+l.10 tracingedges:=1/.00001
+ ; tracingequations:=$+1; p~=trac...
+! Arithmetic overflow.
+l.10 ... p~=tracingedges+.00001;
+
+>> x
+! Internal quantity `$' must receive a known value.
+<to be read again>
+ ;
+l.12 ...os:=1; $:=ASCII""; $:=x;
+ p~:=p~;
+! Value is too large (32767.99998).
+l.12 ...:=ASCII""; $:=x; p~:=p~;
+
+! Missing `)' has been inserted.
+<to be read again>
+ ;
+<argument> ...m.proofing:=(-0.5;
+ shipout.nullpicture;special"3"
+foo->begingroup(TEXT2)
+ endgroup
+l.16 ...ture; special"3" endtext
+ ;
+Memory usage 291&41 (1922 still untouched)
+String usage 26&83 (892&11481 still untouched)
+! OK.
+l.17 ...ing:fi endfor showstats;
+ let!!=skipto;
+ )
+(see the transcript file for additional information)
+Beginning to dump on file trap.base
+ (preloaded base=trap 1776.7.4)
+1116 strings of total length 20570
+395 memory locations dumped; current usage is 317&67
+265 symbolic tokens
+Transcript written on trap.log.
diff --git a/systems/knuth/dist/mf/trapin.log b/systems/knuth/dist/mf/trapin.log
index 2fbafd0e6b..c07ae62774 100644
--- a/systems/knuth/dist/mf/trapin.log
+++ b/systems/knuth/dist/mf/trapin.log
@@ -1,4 +1,4 @@
-This is METAFONT, Version 2.7182818 (INIMF) 7 JAN 2014 17:51
+This is METAFONT, Version 2.71828182 (INIMF) 4 JUL 1776 12:00
**\input trap
(trap.mf
>> << == >> ::: ||`` ''--!! ??## && @@ $$[[]]{{ }}((5.5 0.5))
@@ -147,7 +147,7 @@ put one in, behind the scenes; this may fix the problem.
{for}
{showstats}
Memory usage 291&41 (1922 still untouched)
-String usage 26&83 (891&11438 still untouched)
+String usage 26&83 (892&11481 still untouched)
! OK.
l.17 ...ing:fi endfor showstats;
let!!=skipto;
@@ -173,7 +173,7 @@ Path at line 18, after choices:
{elseif}
)
Beginning to dump on file trap.base
- (preloaded base=trap 2014.1.7)
-1117 strings of total length 20614
+ (preloaded base=trap 1776.7.4)
+1116 strings of total length 20570
395 memory locations dumped; current usage is 317&67
265 symbolic tokens