Mathml equation mapping

My Firefox 3.6 browser seems to perfectly display the Mathml equations in the W3C test suite. But if I copy the code to my web page, for example, here , all Firefox produces something like xyxy instead of correctly displaying the W3C page. What am I missing here>

EDIT : I just tried this on Chrome and Chrome, skipped the test itself, providing it as xyxy . Needless to say, this made the math on my own web page the same.

EDIT 2 . I tried it in a new html document. Does not work:

 <!DOCTYPE html> <html lang="en"> <head> <title></title> </head> <body> <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML" mode="display"> <mfrac> <mi>x</mi> <mi>y</mi> </mfrac> </math> <math display="block" xmlns="http://www.w3.org/1998/Math/MathML" mode="inline"> <mfrac> <mi>x</mi> <mi>y</mi> </mfrac> </math> </body> </html> 

I swear the W3C rendering equations are just fine, though ...

+6
mathml
source share
4 answers

A file named mml-prb.xhtml . Pay attention to the extension.

+1
source share

Including

 <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=MML_HTMLorMML"></script> 

and then using

  <math xmlns="http://www.w3.org/1998/Math/MathML"> <mroot> <mrow> <mi>x</mi> </mrow> <mn>4</mn> </mroot> </math> 

works in Chrome and Firefox

Update:

Since mathjax cdn is shutting down, change

 <script type="text/javascript" async src="https://cdn.mathjax.org/mathjax/2.7-latest/MathJax.js?..."> </script> 

to

 <script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?..."> </script> 
+6
source share

since others said you need to use xml for FF3, if you want to use mathml-in-html5, which was used as text / html, you need firefox 4 (or webkit nightlies)

+1
source share

You must use xml and serve it as such (for example, use the correct mimetype type), which means you need to use the xhtml and mathml tags with the corresponding namespaces. Take, for example, the use of W3C.

Note. HTML5 is not xml

0
source share

All Articles