### Xah Lee

Shared publicly  -

The following essay, is edited version of my email messages, on the harm of TeX. Problems of TeX. TeX is detrimental because it harbors ignorance of the structural content embodied in most math notations in most fields. What TeX does is typesetting, as opposed to math expression encoding.
3

You cited XeTeX. You should also have a look at LuaTeX, much more interesting in my opinion.
I have used TeX and LaTeX a lot in the absence of a better alternative. However, I became recently sick by the fact that you spent more time writing markup than writing text, especially with beamer and tikz/pgf. Moreover, the TeX language is outdated.﻿
Xah Lee

thanks for suggesting LuaTeX. Great to know. Adding to the page.﻿
Xah Lee

iirc, Knuth designed TeX to be 100 years right? looks like it's not working out.﻿

"What TeX does is typesetting", well, yes. Is this a surprise with a typesetter?

I have never heard anyone say that Knuth designed TeX with any intent other than to be a typesetter good enough for typesetting The Art of Computer Programming and any similar books he felt like writing. When it got good enough for that, he let it lapse into very light maintenance mode. The man's an academic, not a mad military dictator!﻿
Xah Lee

yes, but the point is that it's the wrong focus, wrong direction, and created a wide-spread pestilence, damaged the computing industry or education in massive scale, largely due to its free nature and him being a top computer scientist. The damage is similar to how unix (or vi, perl) have done to the world.

a better language would be:

format[x^2/sqrt(3 + 2 a b)]

instead of some diddlysquat markup preceding every char that botched the entire structure and relationship of symbols in math expressions.

So, you can agree, or disagree, with the above. But to say he's academic, or that TeX is for typesetting, is not relevant to the discussion at hand. (but, of course, such comment can still be interesting and valuable, as your comments are, but not this one. :D)﻿

There are a couple of things that are difficult wit TeX in the real world nowadays. One of them is the input/output encodings: TeX plays alone in this area. Which means it is portable and does the job, but does not interacts very well with the system or other programs. Another is the active characters: TeX is a macro langauge, that's alright to me. But active characters are a mess because they can be programmed to do things you can't control, especially when there are that many developpers of LaTeX packages. Interactions between packages are difficult to trace. TeX should have been a low-level language. But it took a lot of time to specify a high level language (LaTeX), and TeX does not provide isolation between low-level and high-level. This is what is scary about TeX today.  That said, it does work and fill in a job that no other tool does: it is a batch typesetter of high-quality. So much effort has been put into it that is hard to believe that someone will rework it.﻿

, quite. The problem is that a non-macro language is even worse for applications like this, where most input to the program is normally turned into output without specific changes. I think Lout got some things better than TeX (it was much more readable, and had a lovely functional-language-style page layout algorithm as nice as TeX's line layout algorithm). But it never learnt to handle character sets with >256 code points, so it's nearly useless in the modern world :(﻿

Your main point (at least what I consider your main point) is that TeX induces a huge waste of time on the mathematicians : they're doing too much typesetting, and thus less mathematics. I don't want to discuss this, but I fail to see how LuaTeX and XeTeX can be seen as a fix for this issue. They both support unicode and fonts better, LuaTeX offers a new language (Lua) in addition to TeX. Is that any good for mathematicians-who-want-to-focus-on-maths ?﻿
Xah Lee

+Nicolas Richard i haven't used LuaTeX. I think at least it improve TeX by basing it on a more workable programing language.

XeTeX improves TeX in that it reduces TeX's complexity, by using unicode directly, so symbols can be set up in editors to be typed by just simple keystrokes and makes the source code much more readable.

but yes these 2 don't address the main point. Namely, TeX doesn't embody the structure of math formulas.

what i think is far much better is one that embodies the math structure. There are 2 that i know of. Mathematica and MathML.

For Mathematica, see example here at the top of the page. e.g.

Sum[1/n, {n,1,k}] ≻ Integrate[ 1/x ,{1,k+1}] = Log[k + 1]

Sum[ (-1)^n/(2*n + 1), {n, 0, ∞}] = 1 - 1/3 + 1/5 + 1/7 + … = π/4

Integrate[ f[x] ,{x,a,b}] = F[b] - F[a]

f'[a] = Limit[ (f[a+h]-f[a])/h,{h,0}]

Overbar[z/w] = Overbar[z]/Overbar[w]

r = Abs[z] = Sqrt[x^2+y^2]

{{1,2},{3,4}} * {{0,1},{0,0}} = {{0,1},{0,3}}

• preserving the syntactic structure of math expressions

• the syntax also works as a executable programing language. (the above in M actually return answers, and the expression components can be manipulated just as in a programing language. (the symbols are actually variables and functions))

• much easier to type, and is readable, and can also use Unicode chars directly.

for MathML, it suffers from verbosity.﻿

TeX is not a math software, and that's not a problem : a math software is useless to write many of the modern mathematical papers. Let's take the first of the "recent" paper published on the arxiv in mathematics. http://arxiv.org/pdf/1310.0432 -- How would Mathematica or any other math software help in writing such an article, e.g. equation (3) (the first two are a joke...) ? How would you embody that one ? Perhaps I'm biased in favour of LaTeX since I never use Mathematica, and I'll be happy to learn.﻿
Xah Lee

i don't see any math publishing software would have difficulty with that.

the equation (4), with big curly braces under, may be harder. That's what you meant? Am not sure M or other can do it. (am pretty sure M can, just needs a bit looking into. M can also do those arrow diagrams of category theory, for example)﻿

, quite. Mathematica's job is doing mathematics: it is not a typesetter. However, it is plausible, indeed likely, that Mathematica's notation is every bit as good as TeX's (I hesitate to say better: TeX's was, after all, designed by a working mathematician) -- but as long as Mathematica isn't a typesetter, and TeX is, mathematicians will use what's available.

(As for MathML, don't make me laugh. Horrific syntax, by-and-large horrible typesetting, and when you see decent typesetting it's generally done by machine-translating the MathML into TeX and displaying the output!)

One clue is: when you see mathematicians talking via protocols like email and IRC that don't permit the writing of full-blown equations, what do they use? Well, in some domains it is indeed Mathematica or, for that matter, R notation -- but the huge majority in my experience use TeX. They are, after all, pretty much universally used to it. They've been writing papers using it for decades, and, very much unlike MathML, its syntax is extremely stable and not guaranteed to change at W3C's whim.﻿

btw, while I agree TeX's syntax -- especially for non-math-mode -- is pestilential, its not being a GUI is a slight advantage for a decent typesetter. Implementing the TeX linebreaking algorithm (or any decent linebreaking algorithm) in a GUI would mean that sometimes typing extra words would mean that the cursor leapt backwards. You could have a GUI, but it would have to have an approximation of the typeset output only. (This is what, e.g. LyX does.)﻿

There is nothing special about equation (3), but it has a few notations that TeX can do rather easily, and which I assume can't be simplified using a math software.﻿
Xah Lee

btw, Stephen Wolfram's prestigious awards and recognition is probably no less than Knuth, if not more. In particular in physics.  ﻿
Xah Lee

the stableness and popularity of TeX, is due to \$free\$. much like the garbage from RFC and unix, that kills everything else. As i like to say, drugs given out free.

it also, kills any progress and use of MathML. MathML has been around for more than a decade now.﻿
Xah Lee

also, the much taunted line break algorithm of Knuth, is rather quite stupid, to say directly. Mathematica for example, does it for arbitrarily complex formula (continued fractions, nested integral, sum, mix of all the above), and basically does it for every line of code. This is since 1998 when M 3 came out. ﻿

I don't know where you're going, and I won't try to follow you on this argument. Bashing free software/unix culture for no good reason and comparing TeX's algorithm to breaking an equation at a random place is not a discussion. At least not the kind of discussion I want to get involved in. Thanks for sharing your thoughts.﻿
Xah Lee

yes, am rambling off a bit with my political opinion. Thank you for sharing your thoughts, still. I appreciate it. ^_^﻿

, physics? Wolfram? You're not talking about A New Kind of Science, are you? 'cos there's a word for that book: borderline crackpottism. It's got all the signs: man not well known in field X works alone for years and releases a Great New Discovery in field X to enormous hype, published in a book, not a paper; there are almost no citations in said said book, it is clear that the author had not read existing papers in field X, and the discovery is unfalsifiable. (Well, OK, he discovered some interesting things about certain restricted classes of cellular automata -- while claiming to have discovered many other things about cellular automata which were well known long before. But any claim that this has anything at all to do with actual physics is, well, crackpot.)﻿

, the stableness of TeX is because Knuth froze it and because he went to almost unbelievable lengths to ensure that it would always produce precisely the same output for a given piece of input. It was not something that fell out by chance, certainly not because it was free -- indeed, it took careful wording of the Free Software Definition to consider TeX free software because of its thou-shalt-not-change-its-behaviour-without-changing-the-name-too rules. (Have you seen Knuth's memorable rant when one Linux distro changed the shape of one single letter in Computer Modern? That's how much he cared.)

The line break algorithm is awesome (and has been widely copied), and has nothing to do with math mode at all: indeed line breaking is disabled in math mode. So I don't know what you're talking about. (Its page break algorithm is crappy. Lout beats it there.)﻿
Xah Lee

“Have you seen Knuth's memorable rant when one Linux distro changed the shape of one single letter in Computer Modern?”

where? i googled for a min but didn't see it.﻿
Xah Lee

Wolfram is youngest to win McAuthor award... among other things. He's recognized physicist in teen or early 20s, with theorem named after him. The New Kinda Science (ANKOS) brouhaha is some 2 or 3 decades later.

i've read about all reviews of ANKOS there is (at least almost all that ever existed online). Controversial indeed. I also read the book 2 to 3 times, on the first 6 chaps and the later math logic chapter... he sent a copy to me :D﻿

, the McArthur Award does not indicate that you are a great physicist. It doesn't indicate anything at all. It's a grant to people the McArthur Foundation thinks are smart (and young-ish). That's all.

He's a sufficiently minor physicist that I hadn't heard of him in that context (but then that applies to most physicists, there are lots of them). But, hey, if he's got his mathematical chops that explains why Mathematica is so good at what it does :)﻿