Project | WXT | Basics | Download | Documentation | Samples


If you want to present mathemathical formulas in your material, you can do this in many ways:

  1. Images. You may use a program like Open Office or Microsoft Office. Use the Formula editor and make formula objects on a page. You can then freeze a screenshot of the page, clip out the formula and save it as an image.
  2. Images againYou may use one of the many tools, online or offline, that produce imgages from LaTex.
  3. MathML. You may write MathML code directly in your material.
  4. Google. You may write LaTeX code directly in a the src attribute in an img-element and let Google prepare an image of the formula, See Google Chart Formulas [20] . The robustness of this approach depends of course on the stability of the Google tool.
  5. LaTex You may write let WXT convert LaTex to images.
  6. Open Office You may make an Open Office document and let WXT extract the formulas as MatML, see ODTFormulas .
  7. You may use an XML document describing formulas either as LaTex (latex), MathMl (mathml), LaTeX (google) or image (image). See Formulas .
  8. You may define one formula either as matml, latex, google or imagel. See Formula .

The advantages of involving WXT (5,6,7,8) is that you may find and edit your formulas in one (or a limited) places and you may produce lists of used formulas, Formula List


Note that browsers haved different capabilities when we get to MathML. You should check this out before deciding how to present math to a wider audience.

WXT is at the moment aimed as HTML5, which means that generated MatML may not work on all browser.

Formula file


<?xml version="1.0" encoding="UTF-8"?>
    <formula id="f1" type="latex">
    <value>\sqrt[3]{x^3 + y^3 \over 2}</value>
    <formula id="f21" type="image">
    <subtext>Vector length</subtext>
    <formula id="f31" type="mathml">
    <subtext>Simple sum</subtext>
    <value><![CDATA[<math xmlns="">
                    <mo stretchy="false">∑</mo>
                    <mo stretchy="false">(</mo>
                    <mo stretchy="false">)</mo>

Schema for formula files

<?xml version="1.0" encoding="UTF-8"?>
<!--W3C Schema generated by XMLSpy v2011 (>
<xs:schema xmlns:xs="">
    <xs:element name="value" type="xs:string"/>
    <xs:element name="subtext" type="xs:string"/>
    <xs:element name="formulas">
                <xs:element ref="formula" maxOccurs="unbounded"/>
                        <xs:attribute name="catalog" type="xs:string" use="optional"/>
    <xs:element name="formula">
                <xs:element ref="subtext" minOccurs="0" maxOccurs="1"/>
                <xs:element ref="value" minOccurs="1" maxOccurs="1"/>
            <xs:attribute name="type" use="required">
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="image"/>
                        <xs:enumeration value="latex"/>
                        <xs:enumeration value="mathml"/>
                        <xs:enumeration value="google"/>
            <xs:attribute name="id" type="xs:string" use="required"/>