| 1 |
$Id: README 57558 2021-01-30 01:42:07Z karl $ |
| 2 |
(This file is public domain.) |
| 3 |
|
| 4 |
web2c/triptrap -- The trip and trap tests are Knuth's torture tests for |
| 5 |
TeX and Metafont. The MetaPost test is also named `trap', so |
| 6 |
renamed the conflicting files to `mftrap...' and `mptrap...'. |
| 7 |
The contents of all files remain absolutely unaltered, of course. |
| 8 |
|
| 9 |
The tests are exercised in TeX Live via `make triptrap' in the web2c/ |
| 10 |
directory. |
| 11 |
|
| 12 |
{trip,mftrap,mptrap}.diffs -- show the diffs from Knuth's originals as |
| 13 |
generated on my development machine. tripman.tex, trapman.tex, and |
| 14 |
mptrap.readme explain precisely what is and is not acceptable. |
| 15 |
Generally, for trap and MetaPost trap, dates and times, a number of |
| 16 |
constants and one call to BLANKRECTANGLE will be different. |
| 17 |
For trip: |
| 18 |
- Some compile-time constants will be different. |
| 19 |
- The floating point numbers in glue set ratios may be slightly |
| 20 |
different (but all the box dimensions must be the same). |
| 21 |
- The y* and down* commands in the trip.dvi file may be somewhat |
| 22 |
different. |
| 23 |
These three kinds of differences are allowed by the trip manual. |
| 24 |
|
| 25 |
- The hyphenation exceptions are different because the exception |
| 26 |
routine now does not count identical hyphenations separately, i.e., |
| 27 |
\hyphenation{a-a a-a} only generates one exception in the table. See |
| 28 |
the messages below for why this is a good/necessary thing (if the |
| 29 |
hyphenation exception table is to be dynamic at all). Knuth has said |
| 30 |
this discrepancy is ok. |
| 31 |
|
| 32 |
For trap, additionally, the capsule numbers have sometimes been |
| 33 |
different, because the master trap.log was not updated completely after |
| 34 |
the 2.7182818 (2014) tune-up, as confirmed by Knuth. The 2.7182818 (2021) |
| 35 |
tuneup restores correct values. |
| 36 |
|
| 37 |
texmf.cnf -- sets up various constants the way the tests want them. Not |
| 38 |
all constants can be changed, alas, but this suffices to avoid building |
| 39 |
a separate binary just to run the tests. |
| 40 |
|
| 41 |
*.in -- fed to the programs as standard input, to avoid manual intervention. |
| 42 |
|
| 43 |
All the other files are test sources and output. |
| 44 |
It's a mistake to change them. |
| 45 |
|
| 46 |
|
| 47 |
About the hyphenation exception thing: |
| 48 |
|
| 49 |
Date: Mon, 1 Apr 96 11:04:29 BST |
| 50 |
From: [email protected] (Wayne G. Sullivan) |
| 51 |
To: [email protected] (K. Berry) |
| 52 |
Subject: Re: hyph_size +1 |
| 53 |
|
| 54 |
Upon consideration I found another change needed for dynamic hyph_size. |
| 55 |
Actually, it is one I used earlier but removed for the sake of the trip.log. |
| 56 |
Knuth's treatment of hyhpenation exceptions has an unpleasant "feature" |
| 57 |
in that if the same "word" is given in \hyphenation{...}, the code does not |
| 58 |
replace the existing entry, but adds a new entry which comes before all |
| 59 |
other entries of the specific "word" (which includes the language code |
| 60 |
as its last "letter"), so that the earlier entries are inaccessible. The |
| 61 |
point is that the exceptions table retains useless data. |
| 62 |
Try this with the current version of TeX: |
| 63 |
\hyphenation{ab ab ab ab ... ab ab} |
| 64 |
Use any word you like for "ab" so long as it has at least two letters. With |
| 65 |
\tracingstats>0, you get lots of hyphen exceptions, but only the last for |
| 66 |
"ab" is accessible. I could copy this behavior using a simple hash code, |
| 67 |
but it seems [pointless]. Instead, when a word is repeated in "\hyphenation" |
| 68 |
the new code simply replaces the old entry, so no extra space in the |
| 69 |
exception tables is consumed. Since there is no way to recover the previous |
| 70 |
entry for a hyphenation exception which has been superseded, I can see no |
| 71 |
point in keeping the old data. The location of hyphens is kept as a linked |
| 72 |
list in TeX's mem array. This data for a superseded hyphenation exception |
| 73 |
could also be flushed, but it makes more differences in trip.log because |
| 74 |
the memory stats are different. These entries are unlikely to consume much |
| 75 |
space, so there is little harm in leaving them. |
| 76 |
|
| 77 |
Anyway the additional change needed corresponds to the following: |
| 78 |
|
| 79 |
diff -c tex.ch.old tex.ch |
| 80 |
*** tex.ch.old Fri Mar 29 17:25:28 1996 |
| 81 |
--- tex.ch Mon Apr 1 10:08:54 1996 |
| 82 |
*************** |
| 83 |
*** 2177,2182 **** |
| 84 |
--- 2177,2183 ---- |
| 85 |
until u=str_start[k+1]; |
| 86 |
{repeat hyphenation exception; flushing old data} |
| 87 |
flush_string; s:=hyph_word[h]; {avoid |slow_make_string|!} |
| 88 |
+ decr(hyph_count); |
| 89 |
{ We could also |flush_list(hyph_list[h]);|, but it interferes |
| 90 |
with the trip.log. } |
| 91 |
goto found; |
| 92 |
|
| 93 |
Thus it is only additional change is to decrement the hyph_count when a |
| 94 |
repeat hyphenation exception is encountered. This is really essential only |
| 95 |
for the "ini" version. The reason is to know exactly how many hyphenation |
| 96 |
exceptions to undump. The change might as well be included in all versions, |
| 97 |
because it handles repeated hyphenation exceptions in a more efficient way |
| 98 |
than the original code. I checked through trip.tex. There is only one word |
| 99 |
included in hyphenation exceptions, but it is given two different hyphenations. |
| 100 |
Thus the original trip.log states 2 hyphenation exceptions, while the one |
| 101 |
using simple hashing shows only 1 -- the single exception has been entered |
| 102 |
twice. |
| 103 |
|
| 104 |
[...] |
| 105 |
|
| 106 |
Wayne |