Just For Fun

李亚普诺夫斯基的混乱天堂

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:
ugly_html

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: