[comp.text] Comments on TeX - The Program

forrest@blia.BLI.COM (Jon Forrest) (09/28/87)

I recently bought "TeX - The Program" and have spent a fair amount
of time reading it. What strikes me is the extent to which Knuth
had to lower himself in order to accomodate Pascal and the state
of the art in Pascal compilers back in the early 80's.

It appears to me after a much too brief period of study that
TeX could be a lot smaller and probably simplier if Knuth had been
able to use a environment containing the function of something
like the Unix Standard I/O Library. (This is only a hypothetical
example; I'm not actually proposing this.)

It is said that a convey can travel no faster than its slowest ship.
With TeX as it is, we'll eventually reach our destination but
what a long, strange trip it will be.

I'm hope that this posting will stimulate discussion of this topic.
It is in no way intended to belittle Knuth or TeX.

Jon Forrest

ucbvax!mtxinu!blia!forrest
{pyramid|voder}!blia!forrest

ken@rochester.UUCP (09/30/87)

|It appears to me after a much too brief period of study that
|TeX could be a lot smaller and probably simplier if Knuth had been
|able to use a environment containing the function of something
|like the Unix Standard I/O Library. (This is only a hypothetical
|example; I'm not actually proposing this.)

I think the blame should be placed on the Pascal language. Pascal TeX
is one big monolithic program and takes ages to compile. Pascal has no
(standard) facilities for file handiling and separate compilation.  I
suspect that even if Knuth had C and Unix, he would have stuck to
read/write/open, etc. and written his own library on top, because some
of the subtler semantics of stdio can vary between systems (e.g.
behaviour of tolower on lowercase letters between systems).  Just a
surmise, no flames please.

As a matter of interest, Common-TeX is only about 500k of code so C
does help reduce verbosity.  Certainly TeX would be more modular in C.

What I'd like to know from those brave souls who have managed to
rewrite TeX in C is (1) if the translation was literal, how difficult
was it to translate the code, and (2) if only the algorithms were
retained, how difficult was it to rewrite TeX in C?

	Ken

north@hector.UUCP (Steve North) (09/30/87)

The really amusing thing about TeX is that it seems designed to make it
unlikely that you can send your friends a TeX file that they can print,
because they may not have "cmramrmagicfont at 14pt"

We all know the canonical TeX hacker advice: Of course dummy you have
the old PXL GF AMR CM fonts why don't you be manly and bring up METAFONT
and design your own hobbit fonts at 23.5 pt surely you have an extra 10MB
of disk space."

Maybe LaTeX helps?  I try to avoid anything in which the word FRAGILE appears
in the documentation but a lot of people use it but then a lot of people smoke
cigarettes too.  Would anyone care to estimate the fraction of contributions
to the TeXhax mailing list that deal with fonts?

Now this.
Parturiunt montes, nascetur ridiculus mus!

ken@cs.rochester.edu (Ken Yap) (10/01/87)

|The really amusing thing about TeX is that it seems designed to make it
|unlikely that you can send your friends a TeX file that they can print,
|because they may not have "cmramrmagicfont at 14pt"
|
|We all know the canonical TeX hacker advice: Of course dummy you have
|the old PXL GF AMR CM fonts why don't you be manly and bring up METAFONT
|and design your own hobbit fonts at 23.5 pt surely you have an extra 10MB
|of disk space."
|
|Maybe LaTeX helps?  I try to avoid anything in which the word FRAGILE appears
|in the documentation but a lot of people use it but then a lot of people smoke
|cigarettes too.  Would anyone care to estimate the fraction of contributions
|to the TeXhax mailing list that deal with fonts?
|
|Now this.
|Parturiunt montes, nascetur ridiculus mus!

Actually, not as likely as you make it sound.

(1) Most people stick to what they get with LaTeX and the standard size
changing commands. This means most sites will have the fonts.

(2) Some drivers allow font substitution.

More often than not, a DVI file generated elsewhere, even on say a VM
system, will print alright on our Unix system. However I strongly
prefer to have TeX input, for the same reason I want sources for the
programs I intend to work on. In such cases, it is normally 20 seconds
work to locate any weird font declarations and make them sane.

Most of the traffic in TeXhax seems to be centered on two kinds of topics:

(1) How can I get a left aligned, numbered, indented and italicized
thingy in my document on even pages (or some variant thereof :-)).

(2) How can I get a driver/previewer for my 1969 Shakerattleandroll
23-1/2 by 63 column terminal :-).

	Ken

tla@kaiser.UUCP (T Anderson) (10/01/87)

...

> Maybe LaTeX helps?  I try to avoid anything in which the word
> FRAGILE appears in the documentation but a lot of people use it but
> then a lot of people smoke cigarettes too.  Would anyone care to
> estimate the fraction of contributions to the TeXhax mailing list
> that deal with fonts?

FRAGILE only refers to commands that behave differently when used as
arguments to other commands than when used directly in horizontal or
vertical mode.  As far as I know, they are no more likely than any
command to behave differently on someone else's system.  They are
simply macros that must be evaluated before passing.  Avoiding them
is like avoiding all non-quoted commands in LISP.  The command
\protect is essentially like eval in LISP and forces earlier 
evaluation of the macro it is attached to.  


			     --	Terry L Anderson
				AT&T Bell Laboratories -- Liberty Corners
				UUCP:     ...!ihnp4!kaiser!tla
				TeleMail: Terry.Anderson
				(201) 580-4428