Mathematical markup language explained

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, MathML (Mathematical Markup Language), OpenMath and OMDoc.

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 "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.[5] [6]

Examples

TeXeqnad hoc ASCIIad hoc Unicodeformula
$a^2$a sup 2a^2

a2

$\sum_^N k^2 $sum from to N sum_^N k^2Σ_^N k²
N
\sum
k=1

k2

$\neg (a > 2) \Rightarrow a \le 2$neg (a > 2) drarrow a <= 2(a > 2) => a <= 2¬(a > 2) ⇒ a ≤ 2

\neg(a>2)a\le2

Markup languages for computer interchange

Markup languages optimized for computer-to-computer communication include MathML,[7] 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.[7]

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.[8] [9]

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

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

See also

External links

Notes and References

  1. Donald E. Knuth. The TeXbook (Computers and Typesetting, Volume A). Reading, Massachusetts: Addison-Wesley, 1984. .
  2. Book: Lamport . LaTeX: A document preparation system, 2nd edition User's guide and reference manual . ISBN .
  3. Brian W. Kernighan and Lorinda L. Cherry. A System for Typesetting Mathematics, Communications of the ACM 18 (1975), 151 - 157.
  4. Web site: Math Typesetting for the Internet. Drexel University. 2007-04-16. 2007.
  5. http://unicode.org/reports/tr25/ UNICODE SUPPORT FOR MATHEMATICS
  6. https://www.unicode.org/notes/tn28/ UNICODEMATH, A NEARLY PLAIN-TEXT ENCODING OF MATHEMATICS
  7. Web site: Mathematical Markup Language (MathML) 1.01 Specification (Abstract). 2007-04-13. Buswell. Stephen . Devitt, Stan . Diaz, Angel. 7 July 1999. While MathML is human-readable it is anticipated that, in all but the simplest cases, authors will use equation editors, conversion programs, and other specialized software tools to generate MathML.. etal.
  8. News: Microsoft Office dumped by Science and Nature . ZDNet . 2007-06-18 . 2012-10-27 .
  9. Web site: Science and Nature have difficulties with Word 2007 mathematics - Murray Sargent: Math in Office - Site Home - MSDN Blogs . 2007-06-04 . 2012-10-27 .
  10. Web site: SciWriter . 2007-04-13 . https://web.archive.org/web/20070122005920/http://www.soft4science.com/products/sciwriter/index.html . 2007-01-22 . dead .
  11. Web site: ASCIIMathML . Peter Jipsen . August 2005 . 2007-04-13.