Friday, April 6, 2012

Switching to using MathJax for LaTex support

I reset my LaTex support in blogspot to use MathJax. Looks like it is rendering, $$A = B^T$$

Setting up LaTex support using MathJax is straightforward. Just put the following script before the </head> element in your blogger template.
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js">
MathJax.Hub.Config({
extensions: ["tex2jax.js","TeX/AMSmath.js","TeX/AMSsymbols.js"],
jax: ["input/TeX", "output/HTML-CSS"],
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
},
"HTML-CSS": { availableFonts: ["TeX"] }
});
</script>

3 comments:

  1. Thanks for this extremely helpful post. While you're at it - would you mind explaining to this CSS noobie how to get that scrolling panel with the code displayed in blogger like that? Thanks.

    ReplyDelete
  2. Hi enzuber,

    Apologies for the very late reply, but you should check out http://ramblingsoullt.blogspot.com/2012/03/syntaxhighlighter.html

    Thanks.

    ReplyDelete