Home Blog Tech Stuff Sample MathML Content

Sample MathML Content

E-mail Print PDF

Just a few quick MathML examples here, stolen from Mozilla's MathML Torture Test page. This is only to demonstrate how you can seamlessly embed MathML XML markup directly within a XHTML document, in a Joomla! article. Note that you must serve your content with a suitable MIME type to just mix it into the document this way, and of course your browser needs to know how to render it.

You might as well forget Internet Explorer for this; it can't even handle some basic XHTML and CSS standards properly, least of all extensions such as MathML. But I believe there is an IE plug-in for MathML somewhere, and there are other tricks you can use (e.g. a special XSLT transform) to help out other browsers.

Opera has some limited support for MathML since 9.5 apparently, but as far as I know, Safari & Chrome are still lacking.

Firefox = King of the Web :P

# Rendered by TeX (Image) Rendered by Your Browser (MathML)
1 x 2 y 2
2 F 3 2
3 x + y 2 k + 1
4 x + y 2 k + 1
5 a b / 2
6 a 0 + 1 a 1 + 1 a 2 + 1 a 3 + 1 a 4
7 a 0 + 1 a 1 + 1 a 2 + 1 a 3 + 1 a 4
8 ( n k / 2 )
9 ( p 2 ) x 2 y p - 2 - 1 1 - x 1 1 - x 2
10 0 i m 0 < j < n P ( i , j )
11 x 2 y
12 i = 1 p j = 1 q k = 1 r a i j b j k c k i
13 1 + 1 + 1 + 1 + 1 + 1 + 1 + x
Last Updated on Monday, 28 September 2009 23:02  

Comments

DTD Hell: XHTML + SVG + MathML + RDFa from Will Daniels on Sun. Sep 27, 2009  reply 

I know there is a DTD for the first three, but I've no idea (yet) how to add MathML into the XHTML+RDFa DTD. Maybe XHTML 2 can handle this modularly, but I heard something about the W3C stopping work on that...needs some further investigation, which might never happen because I really don't want to learn about all that horrible, nasty, ugly DTD syntax. So perhaps some clever, helpful visitor will just tell me? ;)