Using LaTeX in Blogger

, , No Comments

In order to use Latex for writing mathematical equations in Blogger, add the following code just below the <head> of the HTML of the template you have selected for your blog.

<script src='' 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 } }

This code directly links with the latest MathJax.js file of the CDN of MathJax site.

You need not download the .js file and upload to your server.

Once done, you can write an equation in the HTML tab of the Post Editor, as below:


The resulting Latex Equation rendered is as below:


Another Example:


And the resulting Equation is: \[a_n(z)=\left(1+\frac{z}{n}\right)^n;\]


Post a Comment