# Math Typesetting, Mathematica, MathML

Xah Lee, 2010-11-29

Here's a linear algebra notes i wrote in 1998, using Mathematica version 3, with much math typesetting. linearAlgebraNotes.nb. Mathematica 7 convert it to pdf very well. See: linearAlgebraNotes.pdf. Surprisingly, when converting to html, it actually generated a valid html with valid CSS. linearAlgebraNotes.html But further, it also exported to XML+MathML well: linearAlgebraNotes.xml (can be viewed with Firefox 3.6.12). Very well done!

A note about Mathematica's typesetting. Mma's typesetting capabilities is best on this earth. It was invented with Mathematica version 3 in 1996. It's not just a inert incomprehensible code as in TeX. For example, typing 「1/Sqrt[x^2 + y^3]」, press a button, then it gets rendered into a 2-dimensional math notation. Yet, Mma understands it as a live math expression. When writing math, you don't need to learn some inane specialized formatting language. You just type as you code in a computer language. In a programing language, you can define functions. For example, in Javascript 「f = function (x,y) {1/(x^2+y^3)}」. Usually, the function name is limited to as a sequence of ascii chars. In other langs such as Haskell, you can define arbitrary operators. Again, the operator is limited to ascii chars, and basically just this binary form 「a ⊗ b」. In Mathematica, you can define arbitrary functions or operators, including fancy operator of big brackets such as matrix.

Also, whatever complex math expressions are automatically formatted, meaning, automatically wrapped. All these capabilities, i'd attribute to 2 very simple ideas:

• (1) A 100% regular nested syntax (as in lisp; but lisp's syntax has many irregularities. (See: Fundamental Problems of Lisp))
• (2) Typesetting based on regular markup. (as in MathML)

Today, most mathematicians and engineers still use the extremely inane TeX/LaTeX. And much of open source offerings are based on TeX. MathML was a great idea (with much input from Wolfram Research), but it's a decade now and it's still practically not usable.