CTAN Comprehensive TeX Archive Network

Directory tex-archive/obsolete/graphics/metapost/base/source/texk/web2c/triptrap

README
web2c/triptrap -- The trip and trap tests are Knuth's torture tests for
TeX and Metafont.  The MetaPost test is also named `trap', so I've
renamed the conflicting files to `mftrap...' and `mptrap...'.  (The
contents of all files remain absolutely unaltered, of course.)

The tests are exercised in the web2c distribution via `make trip trap mptrap'
(from the top-level or web2c/ directories).  They do not and cannot
exercise the path searching capabilities; for that, a few ``normal''
test runs before and after installation should suffice.

{trip,mftrap,mptrap}.diffs -- show the diffs from Knuth's originals as
generated on my development machine. tripman.tex, trapman.tex, and
mptrap.readme explain precisely what is and is not acceptable.
Generally, for trap and MetaPost trap, dates and times, a number of
  constants and one call to BLANKRECTANGLE will be different.
For trip, again some constants will be different. The floating point
  numbers in glue set ratios may be slightly different (but all the box
  dimensions must be the same), and the y* and down* commands in the
  trip.dvi file may be somewhat different. The hyphenation exceptions
  are different because the exception routine now does not count
  identical hyphenations separately, i.e., \hyphenation{a-a a-a} only
  generates one exception in the table.  See the messages below for why
  this is a good/necessary thing (if the hyphenation exception table is
  to be dynamic at all).

texmf.cnf -- sets up various constants the way the tests want them.  Not
all constants can be changed, alas, but this suffices to avoid building
a separate binary just to run the tests.

*.in -- fed to the programs as standard input, to avoid manual intervention.

All the other files are test sources and output.
It's a mistake to change them.


About the hyphenation exception thing:

Date: Mon, 1 Apr 96 11:04:29 BST
From: wgs@maths.ucd.ie (Wayne G. Sullivan)
To: kb@cs.umb.edu (K. Berry)
Subject: Re: hyph_size +1

Upon consideration I found another change needed for dynamic hyph_size.
Actually, it is one I used earlier but removed for the sake of the trip.log.
Knuth's treatment of hyhpenation exceptions has an unpleasant "feature"
in that if the same "word" is given in \hyphenation{...}, the code does not
replace the existing entry, but adds a new entry which comes before all
other entries of the specific "word" (which includes the language code
as its last "letter"), so that the earlier entries are inaccessible. The
point is that the exceptions table retains useless data. 
Try this with the current version of TeX:
        \hyphenation{ab ab ab ab ... ab ab}
Use any word you like for "ab" so long as it has at least two letters. With
\tracingstats>0, you get lots of hyphen exceptions, but only the last for
"ab" is accessible. I could copy this behavior using a simple hash code,
but it seems [pointless]. Instead, when a word is repeated in "\hyphenation"
the new code simply replaces the old entry, so no extra space in the
exception tables is consumed. Since there is no way to recover the previous
entry for a hyphenation exception which has been superseded, I can see no
point in keeping the old data. The location of hyphens is kept as a linked
list in TeX's mem array. This data for a superseded hyphenation exception
could also be flushed, but it makes more differences in trip.log because
the memory stats are different. These entries are unlikely to consume much
space, so there is little harm in leaving them.

Anyway the additional change needed corresponds to the following:

diff -c tex.ch.old tex.ch
*** tex.ch.old  Fri Mar 29 17:25:28 1996
--- tex.ch      Mon Apr  1 10:08:54 1996
***************
*** 2177,2182 ****
--- 2177,2183 ----
  until u=str_start[k+1];
  {repeat hyphenation exception; flushing old data}
  flush_string; s:=hyph_word[h]; {avoid |slow_make_string|!}
+ decr(hyph_count);
  { We could also |flush_list(hyph_list[h]);|, but it interferes
    with the trip.log. }
  goto found;

Thus it is only additional change is to decrement the hyph_count when a
repeat hyphenation exception is encountered. This is really essential only
for the "ini" version. The reason is to know exactly how many hyphenation
exceptions to undump. The change might as well be included in all versions,
because it handles repeated hyphenation exceptions in a more efficient way
than the original code. I checked through trip.tex. There is only one word
included in hyphenation exceptions, but it is given two different hyphenations.
Thus the original trip.log states 2 hyphenation exceptions, while the one
using simple hashing shows only 1 -- the single exception has been entered
twice. 

[...]

Wayne

Files

Name Size Date Notes
README 4692 2013-06-16 16:38
mftrap_diffs 2347 2013-06-16 16:38
mftrap_fot 1709 2013-06-16 16:38
mftrap_log 121714 2013-06-16 16:38
mftrap_pl 10388 2013-06-16 16:38
mftrap1_in 14 2013-06-16 16:38
mftrap2_in 14 2013-06-16 16:38
mftrapin_log 4593 2013-06-16 16:38
mptrap_diffs 3642 2013-06-16 16:38
mptrap_fot 2571 2013-06-16 16:38
mptrap_log 135523 2013-06-16 16:38
mptrap_pl 10880 2013-06-16 16:38
mptrap_readme 1994 2013-06-16 16:38
mptrap1_in 18 2013-06-16 16:38
mptrap2_in 12 2013-06-16 16:38
mptrapin_log 5430 2013-06-16 16:38
mtrap_0 1130 2013-06-16 16:38
mtrap_1 1280 2013-06-16 16:38
mtrap_log 34163 2013-06-16 16:38
mtrap_mp 5800 2013-06-16 16:38
texmf_cnf 2210 2013-06-16 16:38
trap_148 905 2013-06-16 16:38
trap_149 3114 2013-06-16 16:38
trap_150 754 2013-06-16 16:38
trap_151 8148 2013-06-16 16:38
trap_197 439 2013-06-16 16:38
trap_200 1915 2013-06-16 16:38
trap_5 669 2013-06-16 16:38
trap_6 418 2013-06-16 16:38
trap_mf 11899 2013-06-16 16:38
trap_mp 14040 2013-06-16 16:38
trap_mpx 891 2013-06-16 16:38
trap_typ 4552 2013-06-16 16:38
trapf_pl 1633 2013-06-16 16:38
trapman_tex 18248 2013-06-16 16:38
trip_diffs 3360 2013-06-16 16:38
trip_fot 2443 2013-06-16 16:38
trip_log 183969 2013-06-16 16:38
trip_pl 16990 2013-06-16 16:38
trip_tex 22676 2013-06-16 16:38
trip_typ 18060 2013-06-16 16:38
trip1_in 13 2013-06-16 16:38
trip2_in 14 2013-06-16 16:38
tripin_log 12900 2013-06-16 16:38
tripman_tex 19342 2013-06-16 16:38
tripos_tex 59 2013-06-16 16:38
writeo 11 2013-06-16 16:38
writeo_2 75 2013-06-16 16:38
Guest Book Sitemap Contact Contact Author