# Mathematics on Web

At some point of time course material of Processing will go online. I believe in true web and hence the presentations are in HTML. Last two days I was struggling to put some mathematical formulas with out breaking the web. The best I could find was MathJax. Its an open source JavaScript display engine for mathematics that works in all modern browsers. No plugins required and uses @font-face for displaying. Its future proof as I am writing all my formulaes in MathML. Its good to know its compatible with screenreaders used by people with vision disabilities.

Here are some examples. Right click on the formulas to get more details.

Rogers–Ramanujan identities




Maxwell’s Equations

$\begin{array}{rl}\mathrm{\nabla }×\stackrel{⃗}{\mathbf{B}}-\phantom{\rule{thinmathspace}{0ex}}\frac{1}{c}\phantom{\rule{thinmathspace}{0ex}}\frac{\mathrm{\partial }\stackrel{⃗}{\mathbf{E}}}{\mathrm{\partial }t}& =\frac{4\pi }{c}\stackrel{⃗}{\mathbf{j}}\\ \mathrm{\nabla }\cdot \stackrel{⃗}{\mathbf{E}}& =4\pi \rho \\ \mathrm{\nabla }×\stackrel{⃗}{\mathbf{E}}\phantom{\rule{thinmathspace}{0ex}}+\phantom{\rule{thinmathspace}{0ex}}\frac{1}{c}\phantom{\rule{thinmathspace}{0ex}}\frac{\mathrm{\partial }\stackrel{⃗}{\mathbf{B}}}{\mathrm{\partial }t}& =\stackrel{⃗}{\mathbf{0}}\\ \mathrm{\nabla }\cdot \stackrel{⃗}{\mathbf{B}}& =0\end{array}$


All I had to do was insert a javascript in my wordpress header file. But I am already loading too many javascript files in my header, So I added a custom field in my wordpress called “math”. If its set to yes then it loads this MathJax otherwise it wont. Also I had to put the MathML code inside a pre tag to keep it clean.

Can you see it? if not what browser and OS are you using?

### 10 Responses

1. mixdev says:

I can see it. And is awesome.

2. Pavanaja U B says:

Thanks for the link. Great find

3. Ms. Jen says:

Yes, I can see the forumlas. I am using Firefox 5 on a Mac.

4. Manju says:

Works in Firefox but does not work in Google reader in Firefox

5. S Anand says:

Works on Chrome — but not via Google Reader :-( I guess the RSS feed would be broken almost irrespective of the choice of library…

• Thejesh GN says:

Yes, until we have in built support for MathML like HTML.

6. Thejesh GN says:

Takes a while but works on my android too. Now that’s nice.

7. Veera says:

Cool.. Moreover, the formulas are selectable and zoom-able! Great library..

On viewing the MathML source for the formulas, I guess it would have taken hell a lot of effort to visualize the formula and write it down each and every node. :)

It seems like the syntax uses the <table> structure. So, it opens up an opportunity to come up with a JavaScript based IDE (any table editor would do) to visually write these formulas..

• Thejesh GN says:

Most of the mathematical tools like Mathematica generate MathML directly.

Yes, probably we could come up with a JS based editor to create the formulas in MathML.

8. He ping says:

OVer ast ten years, the local fractional calculus revealed to be a useful tool in various areas ranging from fundamental science to various engineering applications, because it can deal with local properties of non-differentiable functions defined on fractional sets. In fractional spaces, a basic theory of number and local fractional continuity of non-differentiable functions are presented, local fractional calculus of real and complex variables is introduced. Some generalized spaces, such as generalized metric spaces, generalized normed linear spaces, generalized Banach’s spaces, generalized inner product spaces and generalized Hilbert spaces, are introduced. Elemental introduction to Yang-Fourier transforms, Yang-Laplace transforms, local fractional short time transforms and local fractional continuous wavelet transforms is presented based on local fractional calculus.