This site is supported by donations to The OEIS Foundation.

MathML

From OeisWiki
(Redirected from Content MathML)
Jump to: navigation, search


This article page is a stub, please help by expanding it.


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.

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>&beta;</mi>
          <mn>6</mn>
        </msup>
      </mrow>
      <mrow>
        <mn>3</mn>
      </mrow>
    </mroot>
    <mo>=</mo>
    <msup>
      <mi>&beta;</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 =
n  = 1
n odd
  (−1)
⌊  n / 2⌋
xn
n!

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>&ApplyFunction;</mo>
    <mi>x</mi>
    <mo>=</mo>
    <munderover>
      <mo>&sum;</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>&infin;</mo>
    </munderover>
    <msup>
      <mrow>
        <mfenced separators="," close=")" open="(">
          <mrow>
            <mn>-1</mn>
          </mrow>
        </mfenced>
      </mrow>
      <mfenced separators="," close="&rfloor;" open="&lfloor;">
        <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

  1. Moritz Schubotz, Making Math Searchable in Wikipedia.
  2. Firemath - The MathML Editor (Firemath is an extension for Firefox; it is free software published under GPL v3.)
  3. The MediaWiki server also doesn't allow SVG code in wiki pages.
  4. Extension:MathJaxMediaWiki.org.

External links