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
1 2 3 4 5 6 7
Here are the instructions:
- 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
- Change settings in
_config.yml is configurations for Jekyll’s settings. find
Put MathJax CDN and configs in
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- 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
1 2 3
1 2 3
and it is done.
It’s useful if you want to depoloy your code on differnt machines.↩