MathML: Difference between revisions

The educational technology and digital learning wiki
Jump to navigation Jump to search
 
Line 13: Line 13:
If your browser supports XHTML and MathML a simple example would look like this:
If your browser supports XHTML and MathML a simple example would look like this:


<?xml version="1.0"?>


  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"  
  <?xml version="1.0"?>
           "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd" &gt;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"  
           "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd" >


  &lt;html xmlns="http://www.w3.org/1999/xhtml"
  <html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:math="http://www.w3.org/1998/Math/MathML"
      xmlns:math="http://www.w3.org/1998/Math/MathML"
      xmlns:xlink="http://www.w3.org/1999/xlink"&gt;
      xmlns:xlink="http://www.w3.org/1999/xlink">
  &lt;head&gt;
  <head> <title>XTHML with MATHML</title> </head>
  &lt;title&gt;XTHML with MATHML&lt;/title&gt;
<body>
&lt;/head&gt;
  <p>
    <b>Corollary 2</b> [Contractive Sequence Theorem] <em>If
    <math xmlns='http://www.w3.org/1998/Math/MathML'><mo>(</mo><msub><mi>x</mi> <mi>n</mi></msub><mo>)</mo></math> is a sequence,
    for which there is a number
    <math xmlns='http://www.w3.org/1998/Math/MathML'>
          <mi>C</mi><mi>&lt;</mi><mn>1</mn></math>
      such that
      <math xmlns='http://www.w3.org/1998/Math/MathML'>
        <mo>|</mo><msub><mi>x</mi> <mrow><mi>n</mi><mo>+</mo><mn>2</mn></mrow></msub>
        <mo>-</mo>
        <msub><mi>x</mi><mrow><mi>n</mi><mo>+</mo><mn>1</mn></mrow></msub>
        <mo>|</mo><mo>&le;</mo><mi>C</mi><mo>&sdot;</mo><mo>|</mo>
        <msub><mi>x</mi> <mrow><mi>n</mi><mo>+</mo><mn>1</mn></mrow></msub>
        <mo>-</mo>
        <msub><mi>x</mi> <mi>n</mi></msub><mo>|</mo></math>,
      then <math xmlns='http://www.w3.org/1998/Math/MathML'><mo>(</mo><msub><mi>x</mi> <mi>n</mi></msub><mo>)</mo>
    </math> 
    converges;</em></p>
</body>
</html>


  &lt;body&gt;
  &lt;p&gt;Back to &lt;a href="http://tecfa.unige.ch/guides/xml/examples/mathml/"&gt;http://tecfa.unige.ch/guides/xml/examples/mathml/&lt;/a&gt;&lt;/p&gt;
  &lt;p&gt; &lt;b&gt;Corollary 2&lt;/b&gt; [Contractive Sequence Theorem] &lt;em&gt;If
    &lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;&lt;mo&gt;(&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;x&lt;/mi&gt; &lt;mi&gt;n&lt;/mi&gt;&lt;/msub&gt;&lt;mo&gt;)&lt;/mo&gt;&lt;/math&gt; is a sequence, for which there is a number &lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;&lt;mi&gt;C&lt;/mi&gt;&lt;mi&gt;&lt;&lt;/mi&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/math&gt; such
    that &lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;&lt;mo&gt;|&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;x&lt;/mi&gt; &lt;mrow&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mrow&gt;&lt;/msub&gt;&lt;mo&gt;-&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;x&lt;/mi&gt; &lt;mrow&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;/msub&gt;&lt;mo&gt;|&lt;/mo&gt;&lt;mo&gt;&le;&lt;/mo&gt;&lt;mi&gt;C&lt;/mi&gt;&lt;mo&gt;&sdot;&lt;/mo&gt;&lt;mo&gt;|&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;x&lt;/mi&gt; &lt;mrow&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;/msub&gt;&lt;mo&gt;-&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;x&lt;/mi&gt; &lt;mi&gt;n&lt;/mi&gt;&lt;/msub&gt;&lt;mo&gt;|&lt;/mo&gt;&lt;/math&gt;, then &lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;&lt;mo&gt;(&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;x&lt;/mi&gt; &lt;mi&gt;n&lt;/mi&gt;&lt;/msub&gt;&lt;mo&gt;)&lt;/mo&gt;&lt;/math&gt; 
  converges;&lt;/em&gt;&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;


Click [http://tecfa.unige.ch/guides/xml/examples/mathml/xhtml-with-mathml-test.xhtml here] to see if your browser can handle it.
Click [http://tecfa.unige.ch/guides/xml/examples/mathml/xhtml-with-mathml-test.xhtml here] to see if your browser can handle it.

Revision as of 20:40, 20 March 2007

Definition

  • MathML is about encoding the structure of mathematical expressions so that they can be displayed, manipulated and shared over the World Wide Web. A carefully encoded MathML expression can be evaluated in a computer algebra system, rendered in a Web browser, edited in your word processor, and printed on your laser printer.

The language

Hand-editing MathML is quite difficult. There are 30 MathML presentation elements (e.g. fractions), with about 50 attributes and around 100 elemens for content markup (e.g. operations such as + and functions). These elements are for encoding mathematical notation. Most elements represent templates or patterns for laying out subexpressions.

Integration with XHTML

MathML as extra vocabulary in XHTML

If your browser supports XHTML and MathML a simple example would look like this:


<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" 
         "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:math="http://www.w3.org/1998/Math/MathML"
      xmlns:xlink="http://www.w3.org/1999/xlink">
<head> <title>XTHML with MATHML</title> </head>
<body>

Corollary 2 [Contractive Sequence Theorem] If is a sequence, for which there is a number Failed to parse (syntax error): {\displaystyle <mi>C</mi><mi>&lt;</mi><mn>1</mn>} such that Failed to parse (syntax error): {\displaystyle <mo>|</mo><msub><mi>x</mi> <mrow><mi>n</mi><mo>+</mo><mn>2</mn></mrow></msub> <mo>-</mo> <msub><mi>x</mi><mrow><mi>n</mi><mo>+</mo><mn>1</mn></mrow></msub> <mo>|</mo><mo>&le;</mo><mi>C</mi><mo>&sdot;</mo><mo>|</mo> <msub><mi>x</mi> <mrow><mi>n</mi><mo>+</mo><mn>1</mn></mrow></msub> <mo>-</mo> <msub><mi>x</mi> <mi>n</mi></msub><mo>|</mo>} , then converges;

</body>
</html>


Click here to see if your browser can handle it.

Links

Standards

Software

Indexes
Commercial editors
Plugins

Tutorials

  • Robert Miner and Jeff Schaeffer, A Gentle Introduction to MathML, HTML