Search This Blog

Wednesday, January 20, 2010

use emacs to generate highlighted code

1. set htmlize-output-type to 'inline-css

2. type the code in emacs, with the appropriate mode;

3. run the command htmlize-buffer, a new buffer will rise

4. replace "<body>" and "</body>" with "<div>" and "</div>", and cut the whole "div" (former "body") into editor of blogger (in html mode)

5. preview it. it looks exactly like in emacs.

1 comment:

Anonymous said...
This comment has been removed by a blog administrator.