This site is supported by donations to The OEIS Foundation.
MathML
Mathematical Markup Language (MathML) is an application of XML for describing mathematical notations and capturing both its structure and content. It aims at integrating mathematical formulae into World Wide Web pages and other documents. It is a recommendation of the W3C math working group. MathML is not intended to be written or edited directly by humans, but exceptions are more likely to be made for Presentation MathML than for Content MathML.
Contents
Content MathML
Content MathML (...)
Content MathML and mathematical search engines
Content MathML could potentially be used for mathematical search engines.[1]
Presentation MathML
Presentation MathML (...)
Examples
Example 1
The equation (rendered as a PNG image, via Extension:Math for the MediaWiki server used by OEIS Wiki)
from the LaTeX code
: {{math|\sqrt[3]{\beta^6} {{=}} \beta^2|$$}}
which may also be rendered as HTML+CSS
- 3√ β 6= β 2
from the code
: {{math| {{root|''{{Gr|beta}}''{{^|6}}|3}} {{=}} ''{{Gr|beta}}''{{^|2}} |&&}}
is expressible in MathML (very verbose and not practical to enter manually, better to use a tool like Firemath[2]) as
<math display="block"> <mrow> <mroot> <mrow> <msup> <mi>β</mi> <mn>6</mn> </msup> </mrow> <mrow> <mn>3</mn> </mrow> </mroot> <mo>=</mo> <msup> <mi>β</mi> <mn>2</mn> </msup> </mrow> </math>
where
- <mi>...</mi> contains an identifier;
- <mn>...</mn> contains a number;
- <mo>...</mo> contains an operator.
Unfortunately, the MediaWiki server doesn't allow MathML code in wiki pages[3], although MathJax[4] may convert LaTeX code into MathML (as well as into HTML+CSS and SVG) which can be rendered by modern browsers.
Example 2
The equation (rendered as a PNG image)
from the LaTeX code
: {{math|\sin x {{=}} \sum_{\stackrel{n{{=}}1}{n \text{ odd} } }^{\infty} (-1)^{\lfloor n/2 \rfloor} \, \frac{x^n}{n!}|$$}}
which may also be rendered as HTML+CSS
sin x =
(−1) ⌊ n / 2⌋
|
with the code
{{indent}}{{math| sin ''x'' {{=}} <!-- -->{{sum|''n''{{=}}1{{nl}}''n'' odd|infty|({{op|-}}1){{^|{{floor|''n''{{op|/}}2}}|HTM}}{{sp|en}}{{frac|''x''{{^|''n''|HTM}}|''n''!|HTM}}|HTM}} |&&}}
is expressible in MathML (verbose indeed) as
<math display="block"> <mrow> <mi>sin</mi> <mo>⁡</mo> <mi>x</mi> <mo>=</mo> <munderover> <mo>∑</mo> <mfrac linethickness="0"> <mrow> <mi>n</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow> <mi>n</mi> <mspace width="0.5em"/> <mtext>odd</mtext> </mrow> </mfrac> <mo>∞</mo> </munderover> <msup> <mrow> <mfenced separators="," close=")" open="("> <mrow> <mn>-1</mn> </mrow> </mfenced> </mrow> <mfenced separators="," close="⌋" open="⌊"> <mrow> <mfrac bevelled="true"> <mrow> <mi>n</mi> </mrow> <mrow> <mn>2</mn> </mrow> </mfrac> </mrow> </mfenced> </msup> <mfrac> <mrow> <msup> <mi>x</mi> <mi>n</mi> </msup> </mrow> <mrow> <mi>n</mi> <mo>!</mo> </mrow> </mfrac> </mrow> </math>
Notes
- ↑ Moritz Schubotz, Making Math Searchable in Wikipedia.
- ↑ Firemath - The MathML Editor (Firemath is an extension for Firefox; it is free software published under GPL v3.)
- ↑ The MediaWiki server also doesn't allow SVG code in wiki pages.
- ↑ Extension:MathJax—MediaWiki.org.
External links
- MathML—Wikipedia.org.
- Mathematical Markup Language (MathML) Version 3.0, W3C Recommendation 21 October 2010.
- MathML Central—A Wolfram Web Resource.
- MathJax.
- Can I use MathML? (Compatibility table for support of MathML in desktop and mobile browsers.)
- MathML considered harmful on http://www.livejournal.com/.
- MathML Torture Test—Mozilla Developer Network and individual contributors.
- MathML—Mozilla Developer Network and individual contributors.
- MathML element reference—Mozilla Developer Network and individual contributors.
- MathML attribute reference—Mozilla Developer Network and individual contributors.
- Content MathML examples