Tuesday

Setting up MathJax in Google Blogger

If you want something like this in your posts...

$$\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$$

  1. Go to your blog settings.
  2. To design.
  3. Click edit html.
  4. Search this: </head>
  5. Copy and past the following right before </head>: 
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX", "output/HTML-CSS"],
    tex2jax: {
      inlineMath: [ ['$','$'], ["\\(","\\)"] ],
      displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
      processEscapes: true
    },
    "HTML-CSS": { availableFonts: ["TeX"] }
  });
</script>
<script type="text/javascript" src="path-to-MathJax/MathJax.js">
</script>
 
(See also: http://docs.mathjax.org/...

For an overview on the syntax see: https://math.meta.stackexchange.com/questions/5020/...


Help, doesn't work!


If you do not see an equation but only the raw input, check the HTML view of your post and make sure your equation is not surrounded by <code> tags. Google Blogger seems to do this automatically.

Where Lambda is a real number...

Recently have read something similar like "where Lambda is a real number", in an academic journal article (not exclusive to mathematicians). This was related to the following equation:


Wednesday

Understanding the module pattern for JavaScript beginners

When I first read Cherry's (2010) blog post a couple of years ago, I had some hard times understanding what is going on there. Cherry explains the module pattern very well but if you are a beginner in JavaScript, you might be left floundering.