# Writing Math Equations on Octopress

Octopress is a wonderful blogging framework for hackers, but it does not support math typesetting by default. What hacker doesn’t use Latex math?

The followings are configs to make you write latex math equations in Octopress. Then you can translate this

into this

Voilà!

## Here are the instructions:

1. Use kramdown instead of rdiscount

kramdown is a free GPL-licensed Ruby library for parsing and converting a superset of Markdown. It is completely written in Ruby, supports standard Markdown and latex math equations.

gem install kramdown

1. Change settings in _config.yml

_config.yml is configurations for Jekyll’s settings. find markdown and change rdiscount to kramdown

1. Change gem 'ridiscount' to gem 'kramdown in Gemfile1.

2. Put MathJax CDN and configs in source/_layouts/default.html.

1. Fix MathJax right-click bug

I found the solution on luikore’s blog. The problem was when you right-click on a MathJax formula, the whole browser becomes white. To fix it, open sass/base/_theme.scss and change the div under body from

to

and it is done.

1. It’s useful if you want to depoloy your code on differnt machines.