Friday, February 1, 2013

Adding MathJax to Blogger

What is MathJax?

MathJax is a cool JavaScript program that allows bloggers and other people who edit websites to enter math typesetting text (like \( \LaTeX \)) onto their site. So, if used properly it can make equations and other mathematical formula look cool. Meaning...

Instead of this:
E = mc^2

You get this:
\[
  E = mc^2
\]

Adding MathJax to Blogger

  • Navigate to the main Blogger page for your blog and click on the "Template" tab, as highlighted below:
  

  • Next, click on the "Edit HTML" button below the little thumbnail of your blog:

  • Once the editing window comes up (this should contain raw HTML code), hit Ctrl+F, and then type "</script>" (without the quotations).
  • Now, in the editing window you should see the "</script>" text highlighted. Paste the following line of HTML code directly below the "</script>" tag:
<script src='http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' type='text/javascript'/>
  • Here's what mine looked like after I pasted the code:
  
  •  If your configuration looks right, then save the template. You should now be able to use math formatting languages in your blog, hurray!

2 comments: