Just For Fun


Archive for June 2010

Plan to modify Emacs org-mode

leave a comment »

Emacs org-mode is a nice tool for me to write notes. For me the most attractive feature is that I can write LaTex equations and export to html files.

However, the html file with equations look ugly, because the equation images are not properly aligned. I can’t tolerate a beautiful LaTex equation makes such an ugly webpage:

There is another light markup tool called jemdoc written in python, which also supports LaTex equations in html, but BEAUTIFULLY aligned. So I plan to study the codes for jemdoc, and immigrate the nice equation alignment to Emacs org-mode. I know a little bit python, and nothing on elisp, so I hope it won’t be too hard and take too much time.

Here is the idea in jemdoc:
1. Use a variable called “baseline”, whose value is the hight of equation $0123456789xxxXXxX$.
2. After generating each equation image, record the “height”.
3. offset = height – baseline + 1
4. In the generated html code for the equation image, set: style=”vertical-align: -height px”

If someone implement this idea before me, please let me know. I’ll be glad to try it.

Written by Jerry

June 10, 2010 at 3:58 pm

Posted in techniclick