Mathematical markup language

From Infogalactic: the planetary knowledge core
Jump to: navigation, search

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 (although increasing support for Unicode is obsoleting very simple uses). 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 (Mathematical Markup Language).

Notations for human input

Popular languages for input by humans and interpretation by computers include TeX[1]/LaTeX[2] and eqn.[3]

Computer algebra systems such as Macsyma, Mathematica (Wolfram Language), 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 \neg. Web pages may also use a limited amount of HTML to mark up a small subset, for example superscripting.[4] Ad hoc syntax requires context to interpret ambiguous syntax, for example ">=" could be "implies" or "greater 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.

Examples

TeX eqn ad hoc ASCII ad hoc Unicode formula
$a^2$ a sup 2 a^2 a^2
$\sum_{k=1}^N k^2 $ sum from { k = 1 } to N { k sup 2 } sum_{k=1}^N k^2 Σ_{k=1}^N k² \sum_{k=1}^N k^2
$\neg (a > 2) \Rightarrow a \le 2$ neg (a > 2) drarrow a <= 2 !(a > 2) => a <= 2 ¬(a > 2) ⇒ a ≤ 2 \neg (a > 2) \Rightarrow a \le 2

Markup languages for computer interchange

Markup languages optimized for computer-to-computer communication include MathML,[5] OpenMath, and OMDoc. These are designed for verbosity and to minimize ambiguity. However, the verbosity makes them clumsier for humans to type directly.[5]

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" (OMML). The lack of compatibility led some prestigious scientific journals to refuse to accept manuscripts which had been produced using Microsoft Office 2007.[6][7]

SciWriter is another GUI that can generate MathML and LaTeX.[8]

ASCIIMathML, a JavaScript program, can convert ad hoc ASCII notation to MathML.[9]

See also

References

  1. Donald E. Knuth. The TeXbook (Computers and Typesetting, Volume A). Reading, Massachusetts: Addison-Wesley, 1984. ISBN 0-201-13448-9.
  2. Lua error in package.lua at line 80: module 'strict' not found.
  3. Brian W. Kernighan and Lorinda L. Cherry. A System for Typesetting Mathematics, Communications of the ACM 18 (1975), 151–157.
  4. Lua error in package.lua at line 80: module 'strict' not found.
  5. 5.0 5.1 Lua error in package.lua at line 80: module 'strict' not found.
  6. Lua error in package.lua at line 80: module 'strict' not found.
  7. Lua error in package.lua at line 80: module 'strict' not found.
  8. Lua error in package.lua at line 80: module 'strict' not found.
  9. Lua error in package.lua at line 80: module 'strict' not found.

External links