GNU bug report logs - #9914
24.0.91; htmlfontify.el: Add support for code block fontification on ODT export

Previous Next

Package: emacs;

Reported by: Jambunathan K <kjambunathan <at> gmail.com>

Date: Mon, 31 Oct 2011 09:09:02 UTC

Severity: wishlist

Tags: patch

Found in version 24.0.91

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jambunathan K <kjambunathan <at> gmail.com>
To: Chong Yidong <cyd <at> gnu.org>
Cc: Vivek Dasmohapatra <vivek <at> etla.org>, 9914 <at> debbugs.gnu.org
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
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.

Vivek

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
   it. 

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
   `org-odt-format-source-code-or-example-colored'.

   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.






This bug report was last modified 13 years and 69 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.