Mathematical markup language

Last updated

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.

Contents

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 . 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
$\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²
$\neg(a > 2)\Rightarrow a \le2$neg (a > 2) drarrow a <= 2!(a > 2) => a <= 2¬(a > 2) ⇒ a ≤ 2

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

Related Research Articles

<span class="mw-page-title-main">LaTeX</span> Typesetting system

LaTeX is a software system for typesetting documents. LaTeX markup describes the content and layout of the document, as opposed to the formatted text found in WYSIWYG word processors like Microsoft Word, LibreOffice Writer and Apple Pages. The writer uses markup tagging conventions to define the general structure of a document, to stylise text throughout a document, and to add citations and cross-references. A TeX distribution such as TeX Live or MiKTeX is used to produce an output file suitable for printing or digital distribution.

In computer science, pseudocode is a description of the steps in an algorithm using a mix of conventions of programming languages with informal, usually self-explanatory, notation of actions and conditions. Although pseudocode shares features with regular programming languages, it is intended for human reading rather than machine control. Pseudocode typically omits details that are essential for machine implementation of the algorithm, meaning that pseudocode can only be verified by hand. The programming language is augmented with natural language description details, where convenient, or with compact mathematical notation. The purpose of using pseudocode is that it is easier for people to understand than conventional programming language code, and that it is an efficient and environment-independent description of the key principles of an algorithm. It is commonly used in textbooks and scientific publications to document algorithms and in planning of software and other algorithms.

TeX, stylized within the system as TeX, is a typesetting program which was designed and written by computer scientist and Stanford University professor Donald Knuth and first released in 1978. The term now refers to the system of extensions - which includes software programs called TeX engines, sets of TeX macros, and packages which provide extra typesetting functionality - built around the original TeX language. TeX is a popular means of typesetting complex mathematical formulae; it has been noted as one of the most sophisticated digital typographical systems.

Mathematical Markup Language (MathML) is a mathematical markup language, an application of XML for describing mathematical notations and capturing both its structure and content, and is one of a number of mathematical markup languages. Its aim is to natively integrate mathematical formulae into World Wide Web pages and other documents. It is part of HTML5 and standardised by ISO/IEC since 2015.

<span class="mw-page-title-main">GNU TeXmacs</span> Open-source word processor

GNU TeXmacs is a scientific word processor and typesetting component of the GNU Project. It originated as a variant of GNU Emacs with TeX functionalities, though it shares no code with those programs, while using TeX fonts. It is written and maintained by Joris van der Hoeven and a group of developers. The program produces structured documents with a WYSIWYG user interface. New document styles can be created by the user. The editor provides high-quality typesetting algorithms and TeX and other fonts for publishing professional looking documents.

Mathematical notation consists of using symbols for representing operations, unspecified numbers, relations, and any other mathematical objects and assembling them into expressions and formulas. Mathematical notation is widely used in mathematics, science, and engineering for representing complex concepts and properties in a concise, unambiguous, and accurate way.

Pretty-printing is the application of any of various stylistic formatting conventions to text files, such as source code, markup, and similar kinds of content. These formatting conventions may entail adhering to an indentation style, using different color and typeface to highlight syntactic elements of source code, or adjusting size, to make the content easier for people to read, and understand. Pretty-printers for source code are sometimes called code formatters or beautifiers.

<span class="mw-page-title-main">Formula editor</span> Computer program used to typeset mathematical works or formulae

A formula editor is a computer program that is used to typeset mathematical formulas and mathematical expressions.

In computer programming, pidgin code is a mixture of several programming languages in the same program, or pseudocode that is a mixture of a programming language with natural language descriptions. Hence the name: the mixture is a programming language analogous to a pidgin in natural languages.

The following tables compare general and technical information for a number of document markup languages. Please see the individual markup languages' articles for further information.

<span class="mw-page-title-main">Cambria (typeface)</span> Serif font family

Cambria is a transitional serif typeface commissioned by Microsoft and distributed with Windows and Office. It was designed by Dutch typeface designer Jelle Bosma in 2004, with input from Steve Matteson and Robin Nicholas. It is intended as a serif font that is suitable for body text, that is very readable printed small or displayed on a low-resolution screen and has even spacing and proportions.

<span class="mw-page-title-main">MathType</span> The Software for Type And Design Formulas and numerical expressions

MathType is a software application created by Design Science that allows the creation of mathematical notation for inclusion in desktop and web applications.

<span class="mw-page-title-main">STIX Fonts project</span> Mathematical OpenType typeface

The STIX Fonts project or Scientific and Technical Information Exchange (STIX), is a project sponsored by several leading scientific and technical publishers to provide, under royalty-free license, a comprehensive font set of mathematical symbols and alphabets, intended to serve the scientific and engineering community for electronic and print publication. The STIX fonts are available as fully hinted OpenType/CFF fonts. There is currently no TrueType version of the STIX fonts available, but the STIX Mission Statement includes the intention to create one in the future. However, there exists an unofficial conversion of STIX Fonts to TrueType, suitable for use with software without OpenType support.

<span class="mw-page-title-main">Mathematical operators and symbols in Unicode</span>

The Unicode Standard encodes almost all standard characters used in mathematics. Unicode Technical Report #25 provides comprehensive information about the character repertoire, their properties, and guidelines for implementation. Mathematical operators and symbols are in multiple Unicode blocks. Some of these blocks are dedicated to, or primarily contain, mathematical characters while others are a mix of mathematical and non-mathematical characters. This article covers all Unicode characters with a derived property of "Math".

OMDoc is a semantic markup format for mathematical documents. While MathML only covers mathematical formulae and the related OpenMath standard only supports formulae and “content dictionaries” containing definitions of the symbols used in formulae, OMDoc covers the whole range of written mathematics.

AsciiMath is a client-side mathematical markup language for displaying mathematical expressions in web browsers.

<span class="mw-page-title-main">MathJax</span> Cross-browser JavaScript library that displays mathematical equations in web browsers

MathJax is a cross-browser JavaScript library that displays mathematical notation in web browsers, using MathML, LaTeX and ASCIIMathML markup. MathJax is released as open-source software under the Apache License.

Caret is the name used familiarly for the character ^ provided on most QWERTY keyboards by typing ⇧ Shift+6. The symbol has a variety of uses in programming and mathematics. The name "caret" arose from its visual similarity to the original proofreader's caret, a mark used in proofreading to indicate where a punctuation mark, word, or phrase should be inserted into a document. The formal ASCII standard (X3.64.1977) calls it a "circumflex".

References

  1. Donald E. Knuth. The TeXbook (Computers and Typesetting, Volume A). Reading, Massachusetts: Addison-Wesley, 1984. ISBN   0-201-13448-9.
  2. 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), 151157.
  4. Drexel University (2007). "Math Typesetting for the Internet" . Retrieved 2007-04-16.
  5. UNICODE SUPPORT FOR MATHEMATICS
  6. UNICODEMATH, A NEARLY PLAIN-TEXT ENCODING OF MATHEMATICS
  7. 1 2 Buswell, Stephen; Devitt, Stan; Diaz, Angel; et al. (7 July 1999). "Mathematical Markup Language (MathML) 1.01 Specification (Abstract)" . Retrieved 2007-04-13. 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.
  8. "Microsoft Office dumped by Science and Nature". ZDNet. 2007-06-18. Retrieved 2012-10-27.
  9. "Science and Nature have difficulties with Word 2007 mathematics - Murray Sargent: Math in Office - Site Home - MSDN Blogs". 2007-06-04. Retrieved 2012-10-27.
  10. "SciWriter". Archived from the original on 2007-01-22. Retrieved 2007-04-13.
  11. Peter Jipsen (August 2005). "ASCIIMathML" . Retrieved 2007-04-13.