Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

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'>    
    MathJax.Hub.Config({
        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 } }
    });
</script>

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

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

share|improve this question
add comment

3 Answers

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.

share|improve this answer
add comment

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.
share|improve this answer
add comment

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">
  MathJax.Hub.Config({TeX:{equationNumbers:{autoNumber:"AMS"}}});
</script>
<script type="text/javascript"
  src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
</script>

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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