Previous Up Next

3.7.4  Translating an expression to MathML: mathml

The mathml command translates expressions to MathML.


Example.
Input:

mathml(1/4 + 1/4)

Output:

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
"http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd" [
<!ENTITY mathml "http://www.w3.org/1998/Math/MathML">
]>
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
 
<math mode="display" xmlns="http://www.w3.org/1998/Math/MathML">
 
<mfrac><mrow><mn>1</mn></mrow><mrow><mn>2</mn></mrow></mfrac>
 
</math><br/>
 
</body> </html>

which is the number 1/2 in MathML form, along with enough information to make it a complete HTML document.


Previous Up Next