MathML Blogs: MathJax

Saturday, March 26, 2011

MathJax

I have been testing MathJax since last 2 days. Its impressive and a great solution to display Math content in any browser including those in smartphones. I have seen it working in Internet Explorer, Fire Fox, Safari and Chrome. The rendering is beautiful.

The Math content can be authored in various formats including MathML and Tex and perhaps in other simple math formats.

All it takes to use MathJax is to include a few lines of code in the header of the document in between the <head> and </head> tags. Below are the code:

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

As you can see, the actual script, which is significantly large, resides in the Content Distribution Network and is utilized in your web pages. One can download the code and install in one's own web server. Even in that case, you will have to use the above 3 lines of code, but you have to change the src attribute to point to your own server address. However, if you are hosting Math content in blogs as this one hosted in server where you do not have control, or simply because you do not want to install the code in your own web server, you are really free to use the code off the CDN.

Please visit the website for MathJax to learn more.

No comments:

Post a Comment