Showing posts with label LaTeX. Show all posts
Showing posts with label LaTeX. Show all posts

Saturday, 20 October 2012

LaTeX in Blogger

Recently I found about MathJax, a tool that enables use of LaTeX in blogs and other web platforms. It's an excellent tool! At the Irreducible representations blog there is a nice and simple explanation how to add this feature to your own blog. I copy the explanation here:

To get MathJax to work in Blogger, just go to your Blogger account, click "Design" (top right of the page), and then "Edit HTML". After the first <head> you see, paste
<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>


And that's all! Now you can use standard LaTeX commands to format mathematical text. For example, the radiative transfer equation along a ray (e.g. see the lecture notes of Rob Rutten, Eq.2.24) can be written as:

\frac{\mathrm{d}I_{\nu}}{\alpha_{\nu}\mathrm{d} s} = S_{\nu} - I_{\nu}

and appears as: $$ \frac{\mathrm{d}I_{\nu}}{\alpha_{\nu}\mathrm{d} s} = S_{\nu} - I_{\nu} $$