4 ms·
As a rider to the stackexchange discussion: TeX/LaTeX did indeed have competition in the early days from, for example, troff. However, the eqn filter for troff
by cstross 15y ago
As a rider to the stackexchange discussion: TeX/LaTeX did indeed have competition in the early days from, for example, troff. However, the eqn filter for troff was designed to generate troff macros; some knowledge of troff is required to use it effectively, and (speaking as someone who worked in a UNIX techpubs team for a few years in his mis-spent youth) troff is not a terribly elegant or user-friendly language to say the least.
- _delirium 15y agoI was curious how troff/eqn and TeX syntaxes compared, and didn't find any nice side-by-side examples, so here's a quick translation of one from the troff manual (http://www.troff.org/prog.html#eqn http://www.troff.org/prog.html#eqn): .EQ G(z) ~=~ e sup { ln ~ G(z) } ~=~ exp left ( sum from k>=1 { S sub k z sup k } over k right ) ~=~ prod from k>=1 e sup { S sub k z sup k /k } .EN In TeX mathematical notation: $$G(z) = e^{\ln G(z)} = \exp \left( \sum_{k \geq 1} \frac{S_k z^k}{k} \right) = \prod_{k \geq 1} e^{S_k z^k / k}$$ The TeX is a bit more terse, especially in using ^ and _ for super/subscript instead of sup/sub. That can make a big readability difference in things like simple polynomials; a^2 + b^2 = c^2 is just that in TeX, but a lot more wordy in eqn. The troff/eqn looks a bit less like line noise, though, especially in things like "from" in the summation, and >= for \geq. Though really I'd guess that TeX's math notation caught on as the de-facto standard for "ASCII math" because TeX as a whole caught on, rather than because of its ASCII-math representation being better.
- neutronicus 15y agoHow does troff handle Greek letters and other exotic symbols? The simplicity of \gamma and friends was what won me over to TeX in college.
- 4ad 15y agoYou can simply type them in (at least in the Plan 9 version of troff).
- JoshTriplett 15y ago> The troff/eqn looks a bit less like line noise Not necessarily a feature. The eqn syntax does contain more letters and less symbols, but that gives it very low contrast, making it hard to scan the equation and "see" the math symbols through the formatting. When writing a large equation, it helps to have a large contrast between words/symbols and formatting commands. The TeX punctuation helps with grouping and delineation.
- rrhm 15y agoFurthermore, the LaTeX syntax makes it easier for the computer to parse the document and distinguish actual text from equation symbols.
- JadeNB 15y agoIt depends on the meaning of 'easier', I think. In both cases, 'the computer' can do it, meaning the program `troff` or the program `(la)tex`, and I'm not sure it's reasonable to call one or the other of those programs 'easier' for the computer; but perhaps you are thinking more of something like syntax highlighting? In that case, I would argue that it's not easy at all with (La)TeX. The obvious difficulty is people mucking about with cat- and char- codes; but, even if that's not happening, you've got things to worry about like old-style `$ $` and `$$ $$` delimiters. I've never seen a highlighter handle `$\text{$math$}$`, or even `\(\text{\(math\)}\)`, correctly.