Mathematical markup language


A mathematical markup language is a computer notation for representing mathematical formulae, based on mathematical notation. Specialized markup languages are necessary because computers normally deal with linear text and more limited character sets. A formally standardized syntax also allows a computer to interpret otherwise ambiguous content, for rendering or even evaluating. For computer-interpretable syntaxes, the most popular are TeX/LaTeX and MathML.

Notations for human input

Popular languages for input by humans and interpretation by computers include TeX/LaTeX and eqn.
Computer algebra systems such as Macsyma, Mathematica, Maple, and MATLAB each have their own syntax.
When the purpose is informal communication with other humans, syntax is often ad hoc, sometimes called "ASCII math notation". Academics sometimes use syntax based on TeX due to familiarity with it from writing papers. Those used to programming languages may also use shorthands like "!" for. Web pages may also use a limited amount of HTML to mark up a small subset, for example superscripting. Ad hoc syntax requires context to interpret ambiguous syntax, for example "<=" could be "is implied by" or "less than or equal to", and "dy/dx" is likely to denote a derivative, but strictly speaking could also mean a finite quantity dy divided by dx.
Unicode improves the support for mathematics, compared to ASCII only.

Examples

Markup languages for computer interchange

Markup languages optimized for computer-to-computer communication include MathML, OpenMath, and OMDoc. These are designed for clarity, parseability and to minimize ambiguity, at the price of verbosity. However, the verbosity makes them clumsier for humans to type directly.

Conversion

Many input, rendering, and conversion tools exist.
Microsoft Word included Equation Editor, a limited version of MathType, until 2007. These allow entering formulae using a graphical user interface, and converting to standard markup languages such as MathML. With Microsoft's release of Microsoft Office 2007 and the Office Open XML file formats, they introduced a new equation editor which uses a new format, "Office Math Markup Language". The lack of compatibility led some prestigious scientific journals to refuse to accept manuscripts which had been produced using Microsoft Office 2007.
SciWriter is another GUI that can generate MathML and LaTeX.
ASCIIMathML, a JavaScript program, can convert ad hoc ASCII notation to MathML.