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='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>

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:

\[\left(1+\frac{x}{100d}\right)^{yd-1}m-\sum_{i=1}^{12y}\left(1+\frac{x}{100d}\right)^{30.43685(i-1)}p=0.\]

The resulting Latex Equation rendered is as below:

\[\left(1+\frac{x}{100d}\right)^{yd-1}m-\sum_{i=1}^{12y}\left(1+\frac{x}{100d}\right)^{30.43685(i-1)}p=0.\]

Another Example:

\[a_n(z)=\left(1+\frac{z}{n}\right)^n;\]

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

## 0 comments:

## Post a Comment