0

I have last printing of MetafontBook (8th printing, Volume C). Since that printing (and hence since all other printings), two very curious corrections appeared in errata:

1)

enter image description here

Question concerning this correction:

A suffix is either an empty set, or any number of <tag>s or <subscript>s in any combination (see syntax rules on p.54). So, a <subscript> is a subset of suffix. Therefore it is not clear why it is said

suffixed or subscripted

as if they were separate properties.

2)

enter image description here

It is worth to put here definition of <suffix list>:

<suffix list> -> <suffix> | <suffix list>,<suffix>

Question concerning this correction:

What is any concrete specific example for this case?

1

What does "suffixed" mean? Normally you would say something like "a variable with a suffix". But a suffix can also be empty according to the syntax rules, so this would mean that every variable is suffixed. Therefore the suffix rule is not the best reference for "suffixed". So we have to use an intuitive meaning of "suffixed". Now variables like x.a and x[2] appear and sometimes behave different, for example x.a and x.b are completely different, but x[1] and x[2] are much more connected. So especially after the comment

But ‘x.k’ is not the same; it is the tag ‘x’ suffixed by the tag ‘k’, not the tag ‘x’ subscripted by the value of variable k.

a reader could assume that x[k] is not "suffixed". So while "suffixed" alone should be enough, but that could lead to misunderstandings in some cases, so it is easier to just add "or subscripted".

An example for the suffix list problem is

newinternal x;
forsuffixes s = x1: show s; endfor
end;

This fails because x can not be suffixed, therefore x1 is invalid. Therefore x, which is an internal quantity and therefore a variable, is not a suffix because otherwise x1 would also be a suffix and allowed in a suffix list.

In my opinion the problem here is that this seems to be a problem with suffix list rather than the suffix definition: Assuming internal variables are not suffixes, then

newinternal x;
y.x1 = 1;
end;

shouldn't work either,but this is accepted by Metafont.

So the more accurate rule might be: An internal quantity is a suffix and Exercise 7.4 is true, but a suffix list is

<external suffix> -> <empty> | <subscript><suffix> | <external tag><suffix>
<suffix list> -> <external suffix> | <suffix list>,<external suffix>
  • Sorry, it is not clear to me what you mean by "here" in "it is therefore clearer to add both names here". Could you please re-phrase this sentence? – Igor Liferenko Mar 11 at 8:41
  • If I understood correctly, variables a.b1, a.b2c1, a.b3 2 1 are called subscripted, and a.1b, a.3b.c are called suffixed. Is there any reason behind using the same terms to mean different things in different contexts? – Igor Liferenko Mar 11 at 9:00
  • @IgorLiferenko I tried to reformulate the first paragraph. – Marcel Krüger Mar 11 at 10:30
  • Are you willing to post a bug report about the <suffix list> problem? (I can do it) – Igor Liferenko Mar 12 at 1:25
  • Moreover, not only x<tag> is invalid in <suffix list> (as said in second correction), but also x<subscript> is invalid (as in your first example). And x<tag> is valid in your second example too. – Igor Liferenko Mar 12 at 1:45
0

This a small addition to the accepted answer - the summary of my understanding.


Correction 1):

the phrase "or subscripted" is there to add subscripted variables to "intuitive" meaning of "suffix".

The matter is that in MetaFontBook there are two meanings of the word "suffix": "general" (syntax rule on p.54) and "intuitive" (something non-empty other than subscript).

Correction 2):

the following examples with x<tag> and x<subscript> do not work:

newinternal x;
forsuffixes s = x.k: show s; endfor
end
newinternal x;
forsuffixes s = x[1]: show s; endfor
end

the following examples with x<tag> and x<subscript> work:

newinternal x;
y.x.k = 1;
end
newinternal x;
y.x[1] = 1;
end

So, second correction must be corrected not only as said in the accepted answer, but also to add "x<subscript>" to "x<tag>".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.