From BNB@ams.org Mon Jul 20 14:55 MET 1998 Date: Mon, 20 Jul 1998 08:55:52 -0400 (EDT) From: bbeeton Subject: ten years ago this month MIME-version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-Length: 26509 here's a message from don knuth addressing a lot of little questions that arose either in tugboat or in texhax ten years ago. the same questions still seem to come up from time to time, so maybe this little dose of history will do some good. -- bb -------------------- Date: 09 Jul 88 2345 PDT From: Don Knuth To: BB@SAIL.Stanford.EDU Subject: sundry matters for a saturday This is going to be a rather long letter, as I've just spent more than 16 hours (during 2.5 days) reading more than 100 issues of TeXhax! I have mountains of other mail to read next, so I thought it would be best just to write you a note containing all the things that struck me as was doing this exercise, instead of trying to send lots of little messages to people whose email addresses are inscrutable to me. (I've never learned how to send mail properly to other networks, and the number of keystrokes seems to be getting longer each month; so I expect some software is available to help, but I don't have the inclination to learn it these days when mail is not the greatest joy in my life!) From last July to this June I've been totally immersed in finishing Concrete Mathematics (a 640-page book, which you know about because it is the one dedicated to Euler in several senses). At last it is done and A-W tells me they expect bound copies before July 31 --- Hurray! I plan to write a short piece for TUGboat, explaining about the Concrete fonts and their relation to Euler fonts and the macros I used for Euler fonts. (But I've got some earlier deadlines to meet first... with summer visitors I'll do research on random graphs, and I'm presenting a "major" paper about the evolution of TeX at a conference in Germany at the end of September.) As you can see from Computers & Typesetting, my normal rate of output is approximately one printed page per calendar day (since those five volumes plus the new material in Volume 2 totalled about 3600 pages in ten years). Therefore the creation of a 640-page book in less than twelve months meant I was doing twice as much as normal. I was able to keep halfway sane only by not reading my mail, so Phyllis nicely sorted it into categories and let it accumulate in eight large boxes. So far I've read through the electronic mail and the newsy journals like the Notices (nice new format) and TUGboat and Focus and the Intelligencer. It was extremely encouraging to see the acceptance of TeX by mathematicians everywhere, judging by many different reports in the Notices. -------- I'll be using long dashes to give some structure to this letter, since I'm going to ramble on about lots of different things! First, I really like the cover design of TUGboat 9.1; thank you. -------- More about TUGboat 9.1, here's a copy of a note I just wrote Pierre, inspired by his article: >Bravo for your superb discussion of Turkish hyphenation! Well done TeXnically >and well written expositorially. > >I don't think there's any reason to shy away from using @ instead of \`, >as far as plain TeX is concerned. But the symmetry between \` and \' is >appealing. > >Now on to page 43, where you discuss Unix stuff: >The "strange path" errors at 118dpi can be patched without much trouble (like >the change to GREEKU on page 37 of the change list that's bound with TUGboat >9#1). Namely, the patched code will test to see if some point that should be >to the right of another is actually to the left because of the perverse >rounding of other points at low res. I don't have time to do this test any >more myself, but I made several dozen such changes just before releasing the >new CM in 86. I'm sure you don't have time either; but somebody does, let's >hope, and I'll pay $2.56 for a good bugfix! > >What I did was to say tracingall just before the offending statement >(first isolating the offending character on file test.mf, and using >"mode=whatever; mag=whatever; input ztest" after setting z.mf to cmtex10.mf >or whatever parameters were involved), then saying >"showvariable x,y;" and plotting the x,y coordinates on a piece of paper >so that it became obvious what had gone wrong. -------- Still more about TUBgoat I mean TUGboat 9.1: Hoenig's remark on page 46 is great, "the spelling checker works like lightening"!! Maybe it's an advantage to have FEWER words in a spelling checker dictionary... On page 57, Stephen misses a lot of the expandable primitives in his 2(b) --- he doesn't mention \jobname, \romannumeral, \input, \meaning, \noexpand, etc. or conditionals (the latter being the trickiest). Finally, on the ad for the Montr\'eal TUG meeting, it would have been better to use a logo font for METAFONT... -------- Re Dick Palais's final column in this year's Notices, page 396, in the last paragraph (middle column) there are many consecutive hyphenated lines! This has happened elsewhere too; it suggests increasing \doublehyphendemerits because TeX could probably find a better solution if told to be a little fussier. Also, in a later issue (page 507, right column, line 10), the interword spacing was allowed to get VERY tight. I think the spaceshrink needn't be quite that drastic. Sure the columns are narrow, but words need to be separated by more than .05em! -------- Funny thing in TUGboat 8.3 page 304 Her-rmann could join the list on page 266! -------- Do you have any more of my pieces saved up for future TUGboats, other than the exercises for TeX: The Program? By the way, Bart wanted to see that; I suppose it is timely; have I sent camera copy? -------- And now to TeXhax. I'll identify by year then issue number (e.g., "87.98" means V87 #98). Some of these remarks you may wish to forward to the people concerned, when and if you have time; I haven't time myself, except in one case noted below. -------- 87.98 Eschenberg People don't seem to know that they can say "\let\par=\cr \obeylines" instead of bothering to define \autocr. -------- 87.104 re KSTfonts: No, I had nothing to do with those fonts, they existed years before I began to work on TeX. -------- 88.17 Stephan v. B brings up the interesting problem of changing \parskip just AFTER a paragraph has begun. His analysis doesn't make sense to me (or perhaps I'm missing something): if the empty hbox in his example occurs just after a page break, the top line should still be fine; it wouldn't move up into the header position, it would move up to where the empty hbox is. (Unless the height of the first line is more than the baselineskip, of course.) But he should say \nobreak before \vskip-\baselineskip, otherwise there might be a page break and his previous page will be too short. With that patch, his solution seems to be OK, albeit "inelegant". The solution by Reid in 88.19 IS elegant. This would be a good topic for you to discuss in your annual Q&A session in the summer TUG meeting, if you're not already fully booked with examples: Many people are unaware that "\noindent\par" is essentially a no-op except for contributing \parskip glue. (It doesn't make a blank line.) Reid uses this fact by getting rid of the paragraph indentation box with \lastbox, thus making the horizontal list empty (as if the paragraph had begun with \noindent) so the paragraph is effectively flushed and you can start over. But Reid's solution isn't stated perfectly: (a) He shouldn't refer to the paragraph indentation as "glue", it's really a box (as he knows); (b) if the paragraph began with \noindent there's no indentation box present, but he apparently thinks there's a box of width zero --- in this case \lastbox is void but \wd0 will still come out 0pt so he's OK; (c) \endgraf would be safer than \par when this trick is combined with others. -------- 88.17 Jim Walker's elegant solution to Hosek's "Tom Jones puzzle" would likewise be a good note for TUGboat. -------- 88.21 and 87.89 I intentionally omitted ligatures from cmr5 because this font is so extended and letterspaced the results look better without. The f-ligatures are put in fots only when combinations like "fi" look wrong due to interference of bulbs (or, in sans-serif fonts, when the characters are too dark in conjunction), not because there's a `fi' character in our language! In 6-point type a ligature fi looks better than the two characters f and i; in 5-point type it doesn't. (See the `magnified five-point type' example on page A16 for two fi non-ligatures! I believe the first edition had ligatures in this example, and I decided to drop them after looking closer at it.) -------- 88.26 "making fonts for ln03" Charles LaBrec comments that there may be a bug in the program for lowercase e, because the barline is placed vertically at y1=good.y bar_height wrt tiny.nib, while the actual bar thickness is unrelated to tiny.nib. He's right, as far as I can tell; the bowl that comes down to this position is drawn with tiny.nib, but that's no reason for it to be at a good y coordinate. And later the actual bar thickness, .6[thin_join,vair], isn't necessarily an integer; again there's no reason to do the rounding. So I could have left off the "good.y" when defining y1. (The same holds for ae and oe.) However, I've decided not to change this, since it only affects the barline by one pixel at most (and the barline of e can well afford to move up in this font). There's no instability (no "pimple" possibility) in a straight barline. And I may have had some obscure reason that I've forgotten; so I don't want to take a chance on rocking the boat. Only serious flaws should be corrected from now on... But if anybody wants to drop the "good.y", they can do it (it's like hand-tuning the fonts). Any change that improves the perceived appearance of the fonts without changing the TFM files is OK by me. I do think LaBrec's extensive LN03 experiments would be of interest to a large community. He should be encouraged to submit a note to TUGboat about the write-white changes he came up with. -------- 88.28 Flynn asks about detecting the current font. Nobody seems to have responded with the correct answer, namely \expandafter\if\the\font\tentt \else \fi (\ifx also works here). -------- 88.30 Hankerson's "bad pos" experience (re IBM 3812) This is worrisome: Apparently my updates to the sources aren't getting through. Here's a person who seems to have installed MF very recently (his cm base file was preloaded on 19 Mar 88), but he gets an error that can only occur if he has an old file GREEKU.MF (not containing the correction to page E179 dated 13 Oct 86). Also, he's still running version 1.0 of MF. If he got his software from K&S, presumably they have uptodate CM sources. If he got it from Maria Code, can it be that she still hasn't got the updates from 1986 on her VMS tape? -------- 88.36 Stephan's question about column widths isn't answered here. If I didn't put the answer in Appendix D, I'm pretty sure I told somebody... It's fairly easy to do this with \lastbox and \unskip in alternation, because TeX always produces an alternating sequence of boxes and tabskip glue (even when columns have been spanned it puts out boxes for the spanned columns). However, TeX doesn't put empty boxes at the right of short rows; so you need to know how many columns there were. -------- 88.37 Double-column output is discussed here and many other places, and people keep asking about triple columns too. Somebody should write to TeXhax reminding the world about Craig Platt's nice little note in TUGboat some years ago. -------- 88.42 Yap (and 88.50 Sullivan) on fonts with different nonzero checksums. There was a bug in the circle and line fonts used with LaTeX, causing the TFM file to be different at different magnifications (e.g. with SliTeX they are magnified). I fixed that bug long ago (well, last July); so I hope the corrected sources are getting to the world. Leslie has been maintaining the standard *.tex and *.sty files for LaTeX, but I'm not sure if he or anybody else is keeping the LaTeX *.mf files current. Somebody in a more recent issue (I forget where) claims that the arrowheads in line10 etc are in the wrong position. I didn't spot any problems in my tests last year, so I'll be surprised if that is really so; indeed, I have proofmode sheets (dated 8 July 1987 I see!) that display perfect alignment between arrowheads and the lines used for vectors, at resolution 2602pixels/inch. The rumor about misplaced arrowheads is therefore false. (One or two characters did have the wrong height or something, as I recall, before I fixed that font, so the picture environment macro may have gotten a bit confused.) -------- 88.45 Hill on underlined text for lawyers. Solutions by Sullivan and Lau in 88.52; discussion by others indicating that a font of underlined characters is best. But nobody mentions getting underlines in the spaces between words. This can be done, if desired, with leaders instead of glue; the lines will break (and leaders removed between lines) as usual when a paragraph is made. But it's easiest to provide only frenchspacing; I don't have an easy way to account for the space factors. Here's a short test file I just tried: \def\usp{\leaders\hrule height-.2pt depth.6pt\hskip\fontdimen3\font plus\fontdimen4\font minus\fontdimen5\font} \obeyspaces \let =\usp \tracingall A B c. D e f. \showlists Interestingly (to me anyway), you get a normal space after the D, not a leader-with-rule space. I wonder if Jacques's sneaky trick by which he implemented the complex French convention of quotes within quotes would lead to a way to use leaders for underlining parts of paragraphs... -------- 88.45 Nonbreaking hyphens Here's a letter I just sent to jimc at math.ucla: >I just spent 16 hours reading the past 100 issues of TeXhax, and >when I finished I didn't recall seeing an answer to your query in V88#45. >Here's what I hope somebody told you in the meanwhile: > >Your definition of \q- didn't work because TeX doesn't put >"\penalty\exhyphenpenalty" into your text after an explicit hyphen, >it puts "\discretionary{}{}{}" there; TeX doesn't look at the >current value of \exhyphenpenalty until it breaks a paragraph into lines, >and every occurrence of \discretionary{}{}{} is then treated the same. > >Exercise 14.6 explains how to suppress all line breaks after explicit >hyphens; but you specifically want to have selective control, with >some hyphens permitting breaks and others not. > >One way to do what you wanted is > \def\q-{{\hyphenchar\font=0`-'}} >since TeX won't regard the - as an explicit hyphen if it doesn't match >the \hyphenchar of the current font. > >Another way, which is less subtle and less efficient but who cares really, is > \def\q-{\hbox{`-'}} >since you can always suppress line breaks by putting things in boxes. >(I mention this on line 11 of page 93.) ------ 88.48 longrightarrow Ian Moor says "\longrightarrow comes out with the left half of the stem one pixel lower than the right half... it seems to be a font bug... is there a fix?" Yes, the fix is to get CM fonts (I hope). I vaguely recall that these characters didn't line up, years ago, but the problem was fixed already in the later versions of AM fonts. Hence I think this person must have an extremely old AMSY10 or maybe the old original CMSY10. On the other hand, the new CM routines for minus and for rightarrow aren't identical. The minus sign is drawn with rule.nib; the rightarrow is drawn by filling a contour using crisp.nib, which is a null pen in cmsy. In both cases the thickness of the stroke is rule_thickness, which is an integer number of pixels; and the center of the horizontal stroke is math_axis, which is at a "good.y" raster position with respect to rule_thickness. Therefore MF should put the stroke at the same place in both cases (unless I am outfoxing myself again). If there's a nonsquare aspect ratio, I'm not sure what might happen, since that can get very tricky; but Moor speaks of a previewer, so I suppose he's talking square pixels. If anybody with square pixels finds that the minus sign isn't at precisely the same height as the right arrow, I'd sure like to know what mode_def can do that. (Well, I don't REALLY want to know, because I really want to finish Volume 4; but as a scientist I have a compulsion to track down the causes of supposedly impossible things....) -------- 88.52 Hosek comments that cmr17 looks `anemic' compared to 18pt Century. Maybe so, and I'm not wounded deeply by such criticism; but let me get my two cents' worth in anyway explaining what I had in mind! I didn't have much time to test the 17pt fonts (and I don't remember if I even was able to look at on the APS before going to print --- probably not, as I had to leave for Boston), but my goal was not to make a font especially for title pages but rather to make a font with approximately the same "color" (grayness) as the other point sizes. Also, the letters are tighter together than in a magnified font of smaller size. I think cmr17 came out reasonable from those criteria. But a font specifically for titles should usually be bolder. My understanding is that a font family (different point sizes of the same name) is supposed to have consistent color. I tried to make cmr5 look about as gray as cmr10 (although cmr5 scaled 2000 is bolder than cmr10). It may well be that the 18pt Century font Hosek was comparing was really a demibold, but not called that since the customer just wanted something for titles and the nomenclature wasn't terribly important in 1900. -------- 88.54 The dictionary problem with double columns. Yes your \xdef suggestion is a good way to capture \topmark; but another instructive way is to put it into a box. I see that Skinner mentions this in 88.57. -------- 88.55 Joachim doesn't dig "\finalhyphendemerits=0". He seems to think this prevents a line break somehow. What it really does is say that we don't mind if the second-last line ends with a hyphen. (That was a memorable bug in CML many years back, right?) -------- 88.58 MF via WEB2 problem Ouch, that's not pleasant to see --- probably symptomatic of what people are doing out in the field --- installing MF and trying it first on CM fonts instead of on the TRAP test! A lousy way to proceed. -------- 88.58 contains a great phrase: Elsewhere we've been called TeXies, TeXophiles, and TeXites; but TeXegetes is a clear winner! -------- 88.58 Peter Flynn asks for oldstyle numerals in the csc fonts. I'm not so sure; I think I looked at a bunch of Monotype font specimens before I did this one, and if they had oldstyle I probably would have followed. Isn't the oldstyle zero pretty hard to tell from the lowercase o? And his example with digits 822 is puzzling since 8 is the same in both styles (so is 6). I guess there's no compelling reason to change. But anyway he tried unsuccessfully to solve the problem by making digits active. Several other people had similar troubles in other TeXhax notes, I forget where. They forget that they have to make the character active when they're defining it AND when they're using it later... The "right" way is illustrated in my TUGboat article about Macros for Jill. For example, here's what he wanted to do: \font\tencsc=cmcsc10 \def\oszero{{\teni0}} \def\osone{{\teni1}} % 2,3,4,5,7,9 to be done similarly; 6 and 8 can stay {\catcode`0=\active \catcode`1=\active \gdef\sc{\tencsc \catcode`0\active \catcode`1\active \let0=\oszero \let1=\osone}} Here's my 10th test of {\sc small caps with 1001 variations}. \nopagenumbers\bye Of course this is a "fragile" construction, since you can't change catcodes inside a \centerline, say, as normally defined in plain TeX; a more complicated definition of \centerline (analogous to the way I did \footnote) would allow dynamic catcodes. Perhaps I should have done that...too late now! -------- 88.61 No hyphenation after a hyphen It's not quite right to say "the penalty plus skip allows a break"; rather "the penalty allows a break, and the skip restarts an attempt at hyphenation". But the \penalty0 isn't needed, since there's already a \penalty\exhyphenpenalty present [well, what's actually present is \discretionary{}{}{}, which amounts to the same]; and even with \slash, the \hskip would allow a break. [There's an \allowhyphens macro defined in Appendix D but not in plain TeX (see TeXbook index); perhaps I should have put it into PLAIN.] Anyway, in the example the person gave, I would have just inserted a discretionary hyphen after seeing an underfull or overfull box. (Same in the 2-inch-wide newspaper example somebody else sent in; one of the names in the second-last line could have been hyphenated. Such changes take less than 1% of the time of copy preparation, so I really don't believe everything should be fully automatic.) -------- In general it's clear that Malcolm is doing an incredible service as moderator of TeXhax, and we should make sure that he gets at least 1% of the thanks he deserves. I don't know his email address at Stanford, but I did send an effusive note of thanks to texhax-request.... -------- After reading all these TeXhax, I'm impressed by the TeXpertise demonstrated by so many people. But there were also some things I was hoping to find that weren't there. For example, I didn't see a single item from Mexico (and just one from Spain). Are our computer networks set up in such a way as to exclude our Southern neighbors? The people south of the border are quite creative and we can learn from each other if we have better communication, so I'm disappointed to see it lacking. Another thing I missed: Nobody is experimenting with new versions of the CM fonts; that's so much fun, why haven't they tried?? Everybody plays with and reports mode_defs (99 people independently tried to solve the write-white problem); but nobody is encouraged to make even trivial modifications like a slanted typewriter 9pt. Somebody asked for a new version of AMNARO, but didn't realize that a novice could come up with it very quickly. (My daughter designed five special versions of CM fonts for the title page of her high-school graduation programs --- in less than an hour, with no previous experience!) The old AMNARO was my hasty attempt to match the headline font in a newspaper clipping from 1910 or so, when Jill was trying to emulate it in a family history report, and I remember that I hacked it together for her in almost no time. The TESTFONT.TEX routines and the explanation of parameters at the beginning of Volume E aren't that inscrutable are they? Alas, I must have failed. Nowhere in all those TeXhax did I see any mention of such font experiments, except in 88.52 where Don Hosek points out somewhere I said that I've limited the "standard" fonts drastically (thousands of reasonable possibilities exist) but provided some as demonstrations of what can be done. Sigh, people don't even try to make the ones they know they need (LaTeX's cmcsc9 and cmcsc8); they merely try mag=.9 and mag=.8. I guess we don't have to worry about bad fonts proliferating; we've scared everybody from even experimenting in the easy-fun ways! -------- Still another thing I wish had been happening: DRF designed a beautiful "AMF" format (extending TFM) and an extended symbolic form (analogous to PL) to go with it, together with utilities analogous to TFtoPL and PLtoTF... as you know. This allows device drivers to substitute, for any character in a font, any combination of characters in any number of other fonts. It's a super design, and Arbortext implements it in DVIAPS and other drivers DRF wrote for them years ago. So why don't they publicize it? So many people are worried about how to use Postscript fonts and other printer-resident fonts, but the fonts don't have accents etc. This convention solves all that. I don't think Arbortext gains anything by keeping mum about it. Nor do they lose by publishing it as a standard method of font-mapping. They are way ahead, having an implementation, so they needn't prevent other driver/previewer writers from devising similar implementations (non trivial but possible).... Similarly, Adobe tells what Postscript does but they don't reveal their algorithms about how they implement it. Standards are a GOOD THING, and this is one important kind of standard that should not be kept under wraps any longer. Please discuss this with Dave Rogers. I learned about the format only when looking at DVIAPS.WEB (having lost the documentation for our APS operator). As you may recall I mailed you an excerpt when I found it; I should have suggested publication in TUGboat already then, but I was preoccupied with Concrete Math. -------- Finally, I just got a note from Edgar Fu\ss, who says he wrote you about a suspected problem with version 2.92. I've responded to him that the behavior he observed ("Transcript written on ?.") is exactly correct, not an error. When a user does something that's really crazy (read nasty), TeX has to keep going; but TeX needn't worry about giving optimum service in the presence of perversity! The string pool is in use when a file name is being scanned, and if the user wants to put the file name on two separate lines TeX just doesn't choose to remember the name of the log file. Thus, it's not a bug, it's a feature (better to do that than to expire or to go to great pains for little gain). I have, however, just made a small change to TeX and MF, suggested by Chris Thompson. When TeX is almost out of memory, this change will allow it to run slightly longer in certain cases (and TeX's actions before dying will be somewhat more logical). The new change doesn't fix a bug, so I needn't have made it; but the dynamic allocation routines are of general interest, so I do want them to reflect my true intentions. Chris noticed that they didn't behave "continuously", as they stood. Thus, the SAIL sources of TEX.WEB[tex,sys] and MF.WEB[mf,sys] and all the TRIP and TRAP test stuff on [tex,sys] has changed again today and should be UNDEKed by somebody and moved to SCORE. The version numbers haven't changed (it's still TeX 2.93 and MF 1.5), because I decided that this change is just an optimization not a correction. It comes just adjacent to the previous change so it's best considered part of the previous change. -------- So sorry to have rambled on and on like this; now I can go to sleep, in preparation for several hundred letters to read tomorrow! (The snail-mail kind.) (Mostly about math and CS.)