MathML

From MobileRead
Jump to: navigation, search

MathML 2.0, a W3C Recommendation was released on 21 Feb 2001. A product of the W3C Math working group, MathML is a low-level specification for describing mathematics as a basis for machine to machine communication.

Contents

[edit] Overview

MathML provides a much needed foundation for the inclusion of mathematical expressions in Web pages.

This standard is a required part of HTML5 and is supported in ePub 3 and will be available when these are implemented in eBook Readers. It permits a program to compute a formula and thus the formula can be displayed in a format that is appropriate for the screen size. It can also be interpreted audibly to allow visually impaired persons to actually hear the formula.

Here is an example:

MathML-Renderer.jpg

[edit] Math elements

A few elements include:

  • An mi element represents a symbolic name or arbitrary text that should be rendered as an identifier. Identifiers can include variables, function names, and symbolic constants.
  • An mo element represents a mathematical operator. It should be used with traditional math operators and fence characters such as braces, parentheses, and "absolute value" bars; separators such as comma and semicolon; and mathematical accents such as a bar or tilde over a symbol. It may also include invisible operators like implied multiplication.
  • An mn element represents a number. Examples include:
    • <mn> 2 </mn>
    • <mn> 0.123 </mn>
    • <mn> 1,000,000 </mn>
    • <mn> 2.1e10 </mn>
    • <mn> 0xFFEF </mn>
    • <mn> MCMLXIX </mn>
    • <mn> twenty one </mn>
  • An mrow is an organizational presentation element showing a row of operations. mrow elements can be nested as needed.

Math can be a real pain when you study it in college, and when it comes time for a math assignment, it's quite easy to lose track of time trying to solve a difficult task, but you can always turn to the professionals.

[edit] Converting MathML

Online converter - This page can be used to create Math equations interactively. It supports the generation of MathML. It can also create GIF images.

ePUB version 2 is an emerging standard but it does not support MathML however it does support SVG. Now there is a free converter that will convert MathML to SVG. Of course ePub 3 does support MathML.

[edit] A larger example

This example implements a display of the quadratic equation. Quadratic.gif

 <mrow>
  <mi>x</mi>
  <mo>=</mo>
  <mfrac>
    <mrow>
      <mrow>
        <mo>-</mo>
        <mi>b</mi>
      </mrow>
      <mo>&#xB1;<!--PLUS-MINUS SIGN XB1--></mo>
      <msqrt>
        <mrow>
          <msup>
            <mi>b</mi>
            <mn>2</mn>
          </msup>
          <mo>-</mo>
          <mrow>
            <mn>4</mn>
            <mo>&#x2062;<!--INVISIBLE TIMES x2062--></mo>
            <mi>a</mi>
            <mo>&#x2062;<!--INVISIBLE TIMES x2062--></mo>
            <mi>c</mi>
          </mrow>
        </mrow>
      </msqrt>
    </mrow>
    <mrow>
      <mn>2</mn>
      <mo>&#x2062;<!--INVISIBLE TIMES--></mo>
      <mi>a</mi>
    </mrow>
  </mfrac>
 </mrow>

[edit] For more information

Personal tools
Namespaces

Variants
Actions
Navigation
MobileRead Networks
Toolbox