Sunday, December 2, 2012

MathJax for Blogger

For basic MathJax support in Blogger, all you have to do is edit the HTML of your template and put the following before </head>:
<script type='text/x-mathjax-config'>
MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']],
                     displayMath: [['\\[','\\]'], ['$$','$$']]}});
<script src='' type='text/javascript'>
This is all you have to do if you aren't using Blogger's dynamic views. The principal issue with this method is that RSS readers do not render the LaTeX. This was the justification for the LaTeX for Blogger user script. But MathJax looks so much better on a retina screen!

It is possible to have the best of both worlds, and maybe one day I'll blog how...
$$\int_0^1 x^2 dx = \frac{1}{3}$$ Source:

Edit: Set your mobile template to "Custom" to pick up the MathJax on mobile.