[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#9914: 24.0.91; htmlfontify.el: Add support for code block fontificat

From: Jambunathan K
Subject: bug#9914: 24.0.91; htmlfontify.el: Add support for code block fontification on ODT export
Date: Mon, 12 Mar 2012 14:48:10 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (windows-nt)

Thanks Chong.

> Jambunathan: Could you write a ChangeLog entry for these changes?

There are 5 patches.  The patches are generated with "git format-patch"
so the changelogs are embedded within the patch themselves. I had
downloaded htmlfontify separately and put it under local git before
generating the patches.


org-odt.el is part of regular Emacs-24.1 pretest builds.  

You will find it convenient to proceed as follows.

0. Put the modified htmlfontify.el in to load-path.

1. Export test.org file to ODT with C-c C-e O (or you can use the
   test.odt file used in the bug report) Open the test.odt with
   LibreOffice, if you need some visual cues on what the patch does.

2. Open the test.odt file in archive-mode or equivalently you can unzip

3. Under test.odt/content.xml file you can see the OpenDocument tags
   used for markup.

4. Under test.odt/styles.xml you can see the various style-names (the
   css equivalent) for the various faces.

For some insight in to how these changes in htmlfontify are used,

1. Changes in content.xml is being generated by

   The main entry point in to htmlfontify library is
   `htmlfontify-string' - Fontification happens line by line as opposed
   to en-bloc.

2. Changes in styles.xml is being generated by
   `org-odt-insert-custom-styles-for-srcblocks'.  An Orgmode file can
   have multiple src blocks of different languages.  So a single export
   of Org file can potentially run multiple htmlfontifys.  As a result
   styles are collected, duplicates eliminated and unique stylenames
   dumped to styles.xml at the end of the export.

I will be happy to provide further clarifications.

Jambunathan K.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]