From charlesreid1

This is all following this site: http://www.idryman.org/blog/2012/03/10/writing-math-equations-on-octopress/

Installing/Configuring It

Now get to the deployment. You'll be installing a gem called kramdown, which supports Latex maths stuff:

cd ~/codes/charlesreid1.github.io/
gem install kramdown

Replace all instances of rdiscount with kramdown in _config.yml:

s/rdiscount/kramdown/g

Replace all instances of rdiscount with kramdown in Gemfile:

s/rdiscount/kramdown/g

and change the version number to 0.13.8, or whatever version you installed.

Lastly, make MathJax available to all the site static content: edit source/_layouts/default.html and put this before the <body> tag

<!-- mathjax config similar to math.stackexchange -->
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
  jax: ["input/TeX", "output/HTML-CSS"],
  tex2jax: {
    inlineMath: [ ['$', '$'] ],
    displayMath: [ ['$$', '$$']],
    processEscapes: true,
    skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
  },
  messageStyle: "none",
  "HTML-CSS": { preferredFont: "TeX", availableFonts: ["STIX","TeX"] }
});
</script>
<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML" type="text/javascript"></script>

Finally you can fix the right-click bug that the blog above mentions, which was mentioned on another blog.

Edit sass/base/_theme.scss

Change

body {
  > div {
    background: $sidebar-bg $noise-bg;

to

body {
  > div#main {
    background: $sidebar-bg $noise-bg;

and you're done.

Using It

To use it, just put latex between a pair of dollar signs in your markdown:

$$
H \psi = E \psi
$$