On Tue, Jan 11, 2022 at 9:11 PM Bakul Shah <bakul@iitbombay.org> wrote:
> Don Knuth talks at length about how TeX & MetaFont came about etc. in his Web of Stories interview in parts 50 through 70. In Part 56 he does say he looked at "the system developed at Bell Labs", presumably troff.

Among the Bell Labs technical reports I read when I was younger, a trilogy by MD McIlroy on the challenges drawing ellipses stand out: https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.49.3440&rep=rep1&type=pdf

These stuck in my mind and some relatively short time later, I read how the analogous problem was approached in TeX. The solution there was to treat the shape as if it were drawn using a pen with a diamond-shaped nib. From the MetaFont book:

Similarly, some diagonal lines of slope~1 digitize to be twice as dark as others, when a truly
circular pen is considered. But the diamond-shaped nib that \MF\ uses
for a pencircle of diameter~1 does not have this defect; all straight
lines of the same slope will digitize to lines of uniform darkness.
Moreover, curved lines drawn with the diamond nib always yield one pixel per
column when they move more-or-less horizontally (with slopes between \$+1\$
and \$-1\$), and they always yield one pixel per row when they move vertically.
By contrast, the outlines of curves drawn with circular pens produce
occasional ``blots.'' Circles and ellipses of all diameters can profitably
be replaced by polygons whose sub-pixel corrections to the ideal shape
will produce better digitizations; \MF\ does this in accordance with the
interesting theory developed by John~D. ^{Hobby} in his Ph.D.
dissertation (Stanford University, 1985).

If I can be so bold as to offer an interpretation: Doug's approximations treat ellipses as mathematical objects and algorithmically determine what pixels are closest to points on the infinitesimally-thin curves, while Knuth's (or one his students') method acknowledges that the curve has a width defined by the nib; any "pixel" the nib touches becomes part of the figure. Perhaps I'm wrong on the details, but it hardly matters; my point is that there was clearly interesting work done in the area in both places. I find it impossible that neither Knuth nor Hobby were unaware of McIlroy's work and vice-versa; of course he would have known about and examined troff just as the Bell Labs folks knew about TeX. These were hot areas of practical research! This is also a good reminder that not only was Unix itself a subject of research, but it supported a lot of other research at Bell Labs and elsewhere. On this list, we tend to focus on the tool, but that tool was put to use building many more things as well.

> [snip]
> I must say I am a fan of TeX/LaTeX and not a fan of nroff/troff -- I don't like the troff look and I don't like the markup.

I've always admired the look of troff. I wonder if, in retrospect, that is due to me mentally tying the presentation with so many formative documents that were strong early influences. Similarly, I love the look of Tex (even the CM fonts). They are of course different, but I find each beautiful in different ways.

> The nice thing is we can choose whatever typesetting tools we want!

This!

- Dan C.