Showing posts with label blogger. Show all posts
Showing posts with label blogger. Show all posts

Thursday, February 2, 2012

LaTeX Equations on Blogger

  1. In the sidebar, locate the Layout button
  2. Locate the HTML/Javascript Gadget
  3. In the Pop-up window, leave "Title" empty and copy-and-paste this code according to this post:
    <script src=\"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML\" type=\"text/javascript\"> </script> 

    Or this, if you want the secure https protocol to fetch the javascript file.
    <script type=\"text/javascript\" src=\"https://d3eoax9i5htok0.cloudfront.net/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML\"> </script>
  4. Now LaTeX equations can be written by $$a \neq b$$ or \[a \neq b\] for equation block, and $a \neq b $ for inline equations

    For example,
    $$ \sqrt{n}\left( \frac{1}{n}\sum_{i=1}^n x_i - \mu \right)\ \xrightarrow{d}\ \mathcal{N}(0,\,\sigma^2) $$
    yields $$ \sqrt{n}\left( \frac{1}{n}\sum_{i=1}^n x_i - \mu \right)\ \xrightarrow{d}\ \mathcal{N}(0,\,\sigma^2) $$