The longevity of plain TeX

Microsoft Word was first released for MS DOS in October, 1983. Some five months earlier, Donald Knuth, a professor of computing at Stanford University, published “The TeX Book.” This was a jokey manual for, and a deft demonstration of, his TeX publishing program whose stable version first appeared in 1982.

Each of these contemporary works was an innovation in the use of computers to process and print text. But they could not be more different.

MS Word is a complex word processor. It is now up to its 16th version: utterly incompatible with the 1983 version. Only a museum could find the hardware (5 1/4 inch floppy-discs; MS DOS; an 8086 system) necessary to run MS Office 1.

TeX is a simple markup for fine publishing. As of March 2014, Tex is up to version 11 or thereabouts (Knuth uses pi as a numbering scheme; TeX is officially up to version 3.14159265 ). Yet TeX (2014) is almost identical with TeX (1982). Everything written in TeX in 1983 still publishes as beautifully as it did more than 30 years ago. The programs that were included in the TeX book in 1983 still compile (see below). In fact, they work still better in 2014 because computers — almost any will run TeX — are much speedier. Also, over the past 31 years, errors found in the code by bug ‘bounty-hunters’ have been removed. Knuth admitted to one bug in his most recent version (an omitted space in the code). He has issued his last (?) reward cheque ($327.68) to the bug reporter and speculates no other bugs remain.

How many programs can promise this? That in 30 years time, they will still work just as they used. That the documents you created when you still had great hair/wore hot pants to college/watched “Cheers” every week on TV will be just as easy to change or print as they were then, and will look identical? Very few.

TeX is only text markup, like HTML, on its surface. But, at heart, it is a programming language. Knuth created it to publish, beautifully, his real work: the monumental The Art of Computer Programming. It thus became the foundation for a heap of other programs (‘macros’ of TeX, in reality). LaTeX, ConTeX, XeTeX… and ‘one of these days’ LaTeX3. But Knuth has rigorously refused to allow further development of his code.

I have formerly dabbled only in the (derivative) waters of these TeX descendents (LaTeX etc). They are ‘higher level abstractions’ that offer great power for relatively little effort. But each of the many documents written in these environments is vulnerable to the improvements that the macro authors (or the LaTeX maintainers) introduce. The main LaTeX ‘distributions’ — gigabyte bundles of macros built on LaTeX and the like — change every year or so. Documents only two and three years old may break. Recently, one of mine, that I wanted to update, did. It cost me a couple of hours of fiddling to find the problem (a conflict of two imported macros) and to fix it before I could apply my own text changes.

When I saw that Knuth had published his 2013 one-change ‘update’ (the next review of reported ‘bugs’ is scheduled for 2021) I realized that I should have considered the reliability of plain TeX more carefully. I did not because… well, its like writing code in Assembler. Powerful, but tedious and unsafe. It requires a craftsman’s experience (and tool-kit) to do it well.

But simple things can be made simply in TeX. As the TeX Book says, right at the start, you don’t need to know much to compose a page of prose, nicely laid out, with page numbers and footnotes. HTML has much more complexity than TeX at this level.

So here, just for fun, is the first document I have ever compiled in (plain) TeX. It’s a letter taken from Appendix E of the Tex Book. It’s source is two short files (cut-and-pasted from the book). One contains the letter itself and one contains the page formatting instructions.

Plain Tex Letter

No Comments

Leave a Reply

Your email is never shared.Required fields are marked *