Donald Knuth's comments on Active TeX
|updated 8 September 2003|
Active TeX goes back to 1998, which is when Jonathan Fine created proof-of-concept Active TeX macros.
Proof of concept Active TeX macros act1.bun (40Kb).
In 1998 Jonathan Fine sent a copy of the proof-of-concept Active TeX macros to Donald Knuth, and solicited his comments. He kindly obliged, and with his permission we reproduce below his comments (Jonathan Fine's replies are in italic).
From: Donald E. Knuth, Stanford University, California, USA
To: Jonathan Fine, 203 Coldhams Lane, Cambridge, UK
August 6, 1998
Thanks for sending me version 0.1 of Active TeX in March. I just had time to look at it, and it taught me some interesting tricks.
You asked for comments, so I'm glad to note down the few suggestions I have --- although I suspect you have already made the same observations long ago.
First, you added dump to act1.tex, but you didn't remove dump from the comments on lines 18 and 19 of the file. Conversely, in readme.tex where you did remove dump from line 40, you forgot to remove the now-puzzling reference to semicolons on line 38. Thank you, Jonathan Fine replies.
The file act1.tex is generally written in a consistent way, but I think it would be slightly more tidy either to remove the semicolon in the definition of \pre.helper or to insert one in the definition of \app. You should also add a semicolon after "let skip0 skip@", I think. Thank you.
Why are only 128 of the 256 characters made active? And wouldn't \loop ... \repeat be an easier way to define \all.chars.active? I don't know yet what to do with the chars 128-255. My method runs quicker that \loop.
In sample.tex you mean `applies' where you have `applied'. In demo.tex you mean `demonstration' not `demostration'; also `it's' not `its'. In tinytags.tex, `they are useful'. Thank you.
You've used \newsymbols only once, and I suppose nobody will ever need to use it hundreds of times. But the maximum number of times would increase from 255 to 256 if you were to initialize \symbols-no to -1. Thank you.
The tiny.tex example might be a little more informative if you used, say, lowercase <em> (or mixed upper and lower case) instead of <EM>. <EM> is the usual way of writing an SGML tag.
Maybe the error messages of mocksgml.tex should use french spacing in the typewriter type part. I decided to keep it simple.
The code in tinytags.tex and pp.tex seems to imply that // is a comment delimiter, but in fact a single slash is the delimiter. You should probably make act1 pass single slashes through. I wish to disallow, like C++, a '/' as comment delimiter.
I think I know why you used \TeX instead of TeX in tinytags.tex (because of the uppercase T). Correct. So TeX is not read as a parameter.
And I suppose the incorrect solution at the end of ex1.tex has something to do with Char being an expandable token that might have parameters or be a conditional, etc. Correct.
Altogether I can indeed report "hours of happy activity", although the time would have been less pleasant if I hadn't known how to read TeX's tracing output without an escape character. By having -1 as the fixed value of \escapechar I can write more efficient code and save a \count register (let -1 escapechar!). But the point is taken.
7 April 1999
Dear Professor Knuth
Here are my responses.
[Responses as above]
The version you so kindly reviewed was designed to demonstrate the concept. Probably, it will be developed no further. I am now working on a production version, that starts at iniTeX.
Thank you for your interest and kind words.
For more information, or to report faults email us firstname.lastname@example.org.