MathML

MathML is XML to make nice mathematical formulas.

Instead of learning the MathML set of elements, MathML editors having a gui's are available as http://mathcast.sourceforge.net/home.html. Such an editor that is on-line is http://www.wiris.net/demo/editor/demo/en/. When done with the gui, MathML code can be created that looks as:

<math xmlns="http://www.w3.org/1998/Math/MathML">
<mi>E</mi>
<mo>=</mo>
<mfrac>
  <mrow>
    <mi>C</mi>
    <mo>&#215;</mo>
    <msup>
      <mi>U</mi>
      <mn>2</mn>
    </msup>
  </mrow>
  <mn>2</mn>
</mfrac>
</math>

The above code is the semantics of the formula, but nothing how it will be presented is defined. However modern browsers understand and render the formula. Since it contains the namespace declaration it can be embedded this way in xhtml.

Embedding the above code in docbook xml works too when converting to xhtml and the using a modern browser. But with other tools there are some issues since they do not know what to do. Apache FOP does not render anything and serna gives a validation message.

An alternatives is just include the formula as picture. The picture could be a SVG vector format that is even created automatically from MathML


Linurs startpage