Processing math: 100%

Saturday, February 8, 2014

Math equations in Blogger with MathJax / Latex

After a few attempts, I was able to get this working. Go to Template > Edit HTML and paste the piece of code below just after your <head > tag

<script src='http://cdn.mathjax.org/mathjax/latest/MathJax.js' type='text/javascript'>
MathJax.Hub.Config({
extensions: [&quot;tex2jax.js&quot;,&quot;TeX/AMSmath.js&quot;,&quot;TeX/AMSsymbols.js&quot;],
jax: [&quot;input/TeX&quot;, &quot;output/HTML-CSS&quot;],
tex2jax: {
inlineMath: [ [&#39;&#39;,&#39;&#39;], [&quot;\\(&quot;,&quot;\\)&quot;] ],
displayMath: [ [&#39;&#39;,&#39;&#39;], [&quot;\\[&quot;,&quot;\\]&quot;] ],
},
&quot;HTML-CSS&quot;: { availableFonts: [&quot;TeX&quot;] }
});
</script>
Testing it out :
RSS = \sum_{i=1}^n(y_{i} -  \hat{y}_{i})^{2}

1 comment:

  1. Doesnt work on my blog -- http://machtishka.blogspot.in/2014/06/blog-post.html any suggestions ?? Have been trying n numbers of suggestions since last three hours , unable to write equations !!!! :-(

    ReplyDelete