rafaelmartins/blohg — pull request #7 by liuyxpp (2014-09-09 01:29:41+00:00)
Title: Add mathjax directive and icon role.

1. Now MathJax becomes more and more popular for displaying math equations. It displays math equations using native math fonts or web fonts and at the meantime the original TeX string is available to readers, while Google chart API only generates images of math equations which has lower resolution. This modification adds an mathjax directive which only wraps the TeX math string with an HTML div tag with "mathjax" class attributes which is convenient for further decoration by CSS. Actually, one can simply use the container directive in rst file like this
`.. container:: mathjax`
`$$ TeX math string $$`
to obtain the same result.

2. I have encountered a great icon package font-awsome and found it really necessary to add an icon role to ease adding icon in rst files. To add an icon from font-awsome, add this line to your html source file:
``.
While without icon role, we need to use raw role, first define
`.. role:: raw-html(raw)`
`:format: html`
Then use raw-html to add an a font-awsome icon:
:raw-html:\```\`
while use icon role, we only need add this to the rst file:
:icon:\``fa fa-some-icon-name`\`
It is also necessary to enhance icon role or to create a new role to generate an linkable icon, like
``
Or even make a button like
``
But these are not done yet.