To set up MathJax, one recommendation is to post this code into Blogger design:

<script src='http://cdn.mathjax.org/mathjax/latest/MathJax.js' type='text/javascript'>    
        HTML: ["input/TeX","output/HTML-CSS"],
        TeX: { extensions: ["AMSmath.js","AMSsymbols.js"], 
               equationNumbers: { autoNumber: "AMS" } },
        extensions: ["tex2jax.js"],
        jax: ["input/TeX","output/HTML-CSS"],
        tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ],
                   displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
                   processEscapes: true },
        "HTML-CSS": { availableFonts: ["TeX"],
                      linebreaks: { automatic: true } }

But I failed to find header and design in my Blogger.

Can someone show me the process how to paste this code?


3 Answers 3


For this to work, I think you have to be using a Designer or Layout template, not one of the new Dynamic ones.

If you are doing that, then edit your Blogger template in the usual way (Dashboard > Template > Edit HTML) See Blogger Hints and Tips: How to Edit your Blogger Template for some more info about this.

Paste your code in the header, best immediately before the </head> closing tag.

If this does not work, something in your template makes it break. Let us know which one you are using.


Here is an easy system:

  1. Write your maths in LyX;
  2. Save your LyX document locally;
  3. Convert LyX to HTML with TeX formulas using eLyXer—use the command line: elyxer.py --mathjax remote inputfile.lyx outputfile.html;
  4. Just cut and paste the outputfile.html straight into Blogger.

Believe it or not, I'm using MathJax with a 'Classic' Blogger template. I simply insert the following code in each post in which MathJax is needed:

<script type="text/x-mathjax-config">
<script type="text/javascript"

Because my main page is limited to a table of contents, this technique does not cause the scripts to be loaded multiple times on the main page. I'm not sure whether that would matter.

Alternatively, one can include the code in the blog template, at the top of the <head> tag.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.