Re: MathML in HTML5 pages with Firefox and Firebug add-on

It's great that the math is working.  What's disappointing is that it
(HTML5?  FF's implementation?) doesn't know enough about xml islands to
allow compatibility with IE/MathPlayer's handling of MathML.  In IE 6 & 7,
to trigger an app (in this case, MathPlayer) to run, it must be in some
namespace.  So while your example works in FF, this very similar example
which works in IE won't work in FF:

 <m:math xmlns:m='http://www.w3.org/1998/Math/MathML'>
     <m:mrow>
       <m:msup><m:mi>a</m:mi><m:mn>2</m:mn></m:msup>
       <m:mo>+</m:mo>
       <m:msup><m:mi>b</m:mi><m:mn>2</m:mn></m:msup>
       <m:mo>=</m:mo>
       <m:msup><m:mi>c</m:mi><m:mn>2</m:mn></m:msup>
     </m:mrow>
   </m:math>

In IE8, you can put the namespace/behavior association in the registry, so
that the following will work in both FireFox and IE8:

 <math xmlns='http://www.w3.org/1998/Math/MathML'>
     <mrow>
       <msup><mi>a</mi><mn>2</mn></msup>
       <mo>+</mo>
       <msup><mi>b</mi><mn>2</mn></msup>
       <mo>=</mo>
       <msup><mi>c</mi><mn>2</mn></msup>
     </mrow>
   </math>

MathPlayer 3's installer will add the appropriate registry entry.  I
strongly suggest adding the namespace declaration to the math element for
maximum compatibility in whatever examples anyone publishes.  It also makes
them compatible with XHTML.

Neil Soiffer
Senior Scientist
Design Science, Inc.
www.dessci.com
~ Makers of MathType, MathFlow, MathPlayer, MathDaisy, WebEQ, Equation
Editor ~



On Thu, Jan 21, 2010 at 1:14 PM, Joe Java <joe.java@eyeasme.com> wrote:

> Now that Firefox 3.6 is out it is easy to experiment with
> MathML in HTML5 pages.
>
> Just change the setting of the
> "html5.enable" entry to "true" in "about:config".
> This link will help you understand what to do
> http://kb.mozillazine.org/About:config
>
> The following is a valid HTML5 document with MathML
>
> <!DOCTYPE HTML>
> <html>
>  <head>
>    <meta charset="UTF-8">
>    <title>Pythagorean theorem </title>
>  </head>
>  <body>
>    <math>
>      <mrow>
>        <msup><mi>a</mi><mn>2</mn></msup>
>        <mo>+</mo>
>        <msup><mi>b</mi><mn>2</mn></msup>
>        <mo>=</mo>
>        <msup><mi>c</mi><mn>2</mn></msup>
>      </mrow>
>    </math>
>  </body>
> </html>
>
> Note HTML5 validators do NOT work with "math" tags at this time.
>
> For a bigger MathML in HTML5 example try
> https://eyeasme.com/Joe/MathML/HTML5_MathML_browser_test.html
>
> The recently released Firefox add-on "Firebug" version 1.5.0
> is GREAT for doing MathML development, get it at
> https://addons.mozilla.org/en-US/firefox/addon/1843
>
>
>
>

Received on Friday, 22 January 2010 06:08:35 UTC