Home > jquery-mathml

jquery-mathml

Jquery-mathml is a project mainly written in JavaScript, it's free.

Superset of jQuery for working with MathML

jquery-mathml.js contains a patched version of jquery 1.4.4 to allow MathML objects to be modified more fluidly. This is very much a proof of concept work.

MathML is only supported by Gecko ( Firefox ) and Opera based browsers at the moment. Internet Explorer and WebKit browsers partially support MathML but their coverage is extremely poor.

See: http://trac.webkit.org/wiki/MathML%20Status

DEMO FOR FIREFOX 3.6+:

  • http://sdiehl.github.com/jquery-mathml/

Working:

  • selection of MathML nodes by id/class/attribute
  • styling MathML nodes ( partial fix for http://bugs.jqueryui.com/ticket/5647 )
  • isMath query

TODO:

  • innerHTML
  • display: none results in error message
  • add wrappers for native MathML styling attributes ( mathvariant, mathsize, ... ) as specified in: http://www.w3.org/TR/2009/REC-MathML2-20090303/chapter3.html#presm.commatt

Note:

Firefox 4 beta is lightyears ahead of other browsers in terms of MathML support, for example if you install the STIX fonts and take a look at the following page you'll find it's nearly identical to LaTeX.

  • https://eyeasme.com/Joe/MathML/HTML5_MathML_browser_test.html

License:

Dual MIT & GPL ... i.e. do whatever you want just include the jQuery authors and my name in any forks.

Contact:

Stephen Diehl ([email protected])