Octopress is a wonderful blogging framework for hackers, but it does not supportmath typesetting by default. What hacker doesn’t use Latex math?
- Frustration with Spike.js.
- Html5 Boilerplate based templates. Kramdown markdown parser and Pygments highlighter.
The followings are configs to make you write latex math equations in Octopress.Then you can translate this
into this
Voilà!
Updated github-pages, jekyll and jekyll-feed gems by running gem install github-pages, gem install jekyll and gem install jekyll-feed. I had to do this step as a simple bunle update wasn't installing the latest version. Modify those gems in the Gemfile to the latest version. Run bundle update; Finally run bundle exec jekyll serve.
Here are the instructions:
- Use kramdown instead of rdiscount
kramdown is a free GPL-licensed Ruby library for parsing and converting asuperset of Markdown. It is completely written in Ruby, supports standardMarkdown and latex math equations.
- Change settings in
_config.yml
Jekyll Kramdown Youtube
_config.yml
is configurations for Jekyll’s settings. find markdown
andchange rdiscount
to kramdown
Change
gem 'ridiscount'
togem 'kramdown
inGemfile
1.Put MathJax CDN and configs in
source/_layouts/default.html
.
- Fix MathJax right-click bug
Jekyll Kramdown-parser-gfm
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
Jekyll Kramdown Full
and it is done.
It’s useful if you want to depoloy your code on differnt machines.↩