kramdown (sic, not Kramdown or KramDown, just 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.

Install kramdown

First of all make sure you have ruby installed on your box:

1
2
$ ruby --version # or
$ which ruby

If command “which ruby” returns nothing, then you should install it first.

1
2
$ sudo apt-cache search ruby # to chech out the available ruby package
$ sudo apt-get install ruby[*.*] # to install *.* version of ruby

Also you can use RVM, aka Ruby Version Manager, to install/manage your ruby entries, but actually I am not able to install ruby 1.9.2 approperately following the instruction from Octopress site on my PC which is ubuntu 12.04.

Install kramdown
1
$ sudo gem install kramdown

Change _config.yml and Gemfile to include kramdown

Change markdown engine to kramdown

Change markdown engine to kramdown _config.yml
1
2
3
[...]
markdown: kramdown
[...]

Add kramdown to Gemfile

Add kramdown to Gemfile
1
2
3
4
5
[...]
gem 'pygments.rb', '~> 0.2.12'
gem 'kramdown', '~> 0.13'
gem 'RedCloth', '~> 4.2.9'
[...]

Next, install gem dependencies

1
2
gem install bundler
bundle install

Add MathJax.js to head.html

So far, we have installed kramdown, and attach the dependency of kramdown to project, the last thing we have to do is including MathJax.js to your html head, since by default MathJax.js is not included in html head.

Add MathJax
1
2
$ vim [repo-root]/source/_includes/head.html #where repo-root is the repository root, optional. 
$ #add "<script src="http://kramdown.rubyforge.org/MathJax/MathJax.js" type="text/javascript"></script>" (without quote) to head.html 

## Show Cases

And,