News for hackers. Stuff that matters.
Re:Why TeX and LaTeX are the defacto standard for writing ma... by cstross on Sunday March 25, 2012 @07:49AM (#3752341)
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.
Re:Why TeX and LaTeX are the defacto standard for writing ma... by _delirium on Sunday March 25, 2012 @08:26AM (#3752397)
I 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):

    .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.

Re:Why TeX and LaTeX are the defacto standard for writing ma... by JoshTriplett on Sunday March 25, 2012 @03:11PM (#3753469)
> 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.

Re:Why TeX and LaTeX are the defacto standard for writing ma... by rrhm on Sunday March 25, 2012 @04:21PM (#3753706)
Furthermore, the LaTeX syntax makes it easier for the computer to parse the document and distinguish actual text from equation symbols.
Re:Why TeX and LaTeX are the defacto standard for writing ma... by JadeNB on Sunday March 25, 2012 @09:12PM (#3754472)
It 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.

Re:Why TeX and LaTeX are the defacto standard for writing ma... by neutronicus on Sunday March 25, 2012 @09:20AM (#3752513)
How does troff handle Greek letters and other exotic symbols? The simplicity of \gamma and friends was what won me over to TeX in college.
Re:Why TeX and LaTeX are the defacto standard for writing ma... by 4ad on Sunday March 25, 2012 @10:49AM (#3752722)
You can simply type them in (at least in the Plan 9 version of troff).