Using MathJAX

MathJAX is a javascript that allows you to use TeX and MathML code in your HTML pages, and have those formulae displayed correctly.

Here's a MathML example:

 

a2+b2=c2

 

You simply create HTML blocks using <math>MathML formulae</math>.

Here's another example, demonstrating matrices:

 

A=xyzw

Your browser should display a 2x2 matrix above this text.
Make sure your TinyMCE plugin settings are set to NOT clean code on save.

 

Here's a more complicated formula for standard deviation:

 

σ=1N∑i=1N(xi−μ)2.

Here's the curl of a vector field:


∇→×F→=(∂Fz∂y−∂Fy∂z)i+(∂Fx∂z−∂Fz∂x)j+(∂Fy∂x−∂Fx∂y)k

Installing and using MathJAX

Install MathJAX by including the MathJAX script in your HTML header. To do this in your current template, add the following code to your template directory's index.php:

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

or, for a local version,

<script type="text/javascript" src="/<?php echo $tmpTools->templateurl(); ?>/js/MathJax.js?config="TeX-AMS-MML_HTMLorMML"></script>

Then, make sure the TinyMCE plugin does not remove code from raw HTML in your article:

Components/Plugins/Tiny MCE Text Editor/ code cleanup - never.