Thursday 18 June 2015

Latex in Blogger

To be able to input latex equations in blogger, mathjax has to be used. Although several methods are available online, only this one works for my blogger.
To enable it, click template on the left side of the blogger edit page, then click edit HTML. Add the following code right after the first <head>

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

No comments:

Post a Comment