6 ms·
The tool `eqn`, which she wrote (joined by Brian Kernighan) is an "ancestor" of TeX: The mathematical syntax of TeX (design started 1977) was based on eqn (1975
by svat 5y ago
The tool `eqn`, which she wrote (joined by Brian Kernighan) is an "ancestor" of TeX: The mathematical syntax of TeX (design started 1977) was based on eqn (1975). For example, the eqn paper (https://research.swtch.com/eqn.pdf https://research.swtch.com/eqn.pdf) has the expression
sum from i=0 to infinity x sub i = pi over 2
which would have been entered as something pretty close to that in the first draft design of TeX (the second draft introduced the backslashes), and today as:
\sum_{i=0}^{\infty} x_i = {\pi \over 2}
and you can see the evolution. The Wikipedia page has more examples (https://en.wikipedia.org/w/index.php?title=Eqn_(software)&oldid=1061600145#Syntax_examples https://en.wikipedia.org/w/index.php?title=Eqn_(software)&ol... ). Knuth credits Lorinda Cherry explicitly a couple of times in the first draft design (https://www.saildart.org/TEXDR.AFT[1,DEK] https://www.saildart.org/TEXDR.AFT[1,DEK]):
> A special syntax is used in formulas, modeled on that of Kernighan and Cherry, Comm. ACM 18 (March 1975), 151-157. For example, ``sup 9'' in line 41 specifies a superscript 9, ``sub {n+1}'' in line 74 specifies a subscript n+1.
and in the last page/paragraph:
> To conclude this memo, I should explain how TEX is going to work on math formulas. However, I will have to sketch out the code in more detail and it is only fuzzy in my mind at the moment. […] it may be necessary to build the parse tree first as Kernighan and Cherry do.
(Yes indeed TeX builds the parse tree first, as we can see from the second draft: https://www.saildart.org/TEX.ONE[1,DEK] https://www.saildart.org/TEX.ONE[1,DEK] )
The eqn system was a pioneering and capable one: although Knuth did not use any of the code of troff/eqn as-is (not sure if it was available to him; in any case he was targeting "book" quality), clearly it influenced the design, and I imagine it inspired him about what was possible in the first place. Even after TeX became widely used, there have been some math books typeset with troff and eqn.
Reading about Lorinda Cherry's other accomplishments like `typo` and the Writer's Workbench, it's clear we've lost someone who was a pioneer in multiple respects.
- mukundesh 5y agoCompletely agree, 'eqn' was a pioneering achievement followed by TeX and Mathematica
- e12e 5y agoAfter having a look at: https://www.oreilly.com/library/view/unix-text-processing/9780810462915/Chapter09.html https://www.oreilly.com/library/view/unix-text-processing/97... and a few man pages, I figured I could play with eqn like so: eqn -Tpdf - <<eof | groff -me -T pdf > eqn.pdf .EQ sum from i=0 to infinity x sub i = pi over 2 .EN eof xdg-open eqn.pdf I did not have much success trying to force it throug groff/troff and render pretty in a (wayland) terminal - with neither `--text` (as below) or `--tty`. But perhaps there is no such "magic" renderer? eqn -Troff -Tutf8 - <<eof | groffer --text |less -R kEQ sum from i=0 to infinity x sub i = pi over 2 .EN eof
- smorrebrod 5y agoI am not aware of a powerful tty renderer. Groff looks like it's aimed at paper outputs first. Also eqn can be called with `groff -e` (other preprocessors also have their flag) and inf (instead of infinity) produces a correct infinity glyph.
- fjfaase 5y agoI somehow feel it is a pitty that Knuth went on to design his own method for describing mathematical expressions, as his seems to less semantic and more based on representation. Note how in his notation the two '_' have a total different semantic meaning, while in eqn different syntax is used. His method is a more consize, but even not that much, but her method is much closer to how the resulting expression is read. I did have a look at the paper mentioned and note that terms like 'sub' and 'sup' are also related to position. An even more semantic approach probably would use 'x power 2' instead of 'x sup 2'.
- medstrom 5y agoI've so often wanted to replace LaTeX snippets in my org-mode documents with machine-readable `eqn` snippets (or maybe SageMath snippets). I'm sure someone out there must be sitting on an unpublished groundbreaking setup that pulls this off.
- eole666 5y ago`eqn` looks way more readable than TeX.. All those \ are making my eyes bleed.