From: <dku...@us...> - 2007-12-20 22:09:26
|
Author: dkuhlman Date: 2007-12-20 23:08:32 +0100 (Thu, 20 Dec 2007) New Revision: 5490 Modified: trunk/sandbox/OpenDocument/README.txt trunk/sandbox/OpenDocument/odtwriter/__init__.py Log: Removed extra numbers in table of contents with sectnum directive. Modified: trunk/sandbox/OpenDocument/README.txt =================================================================== --- trunk/sandbox/OpenDocument/README.txt 2007-12-20 18:56:47 UTC (rev 5489) +++ trunk/sandbox/OpenDocument/README.txt 2007-12-20 22:08:32 UTC (rev 5490) @@ -38,6 +38,13 @@ History ======= +2007/12/20 -- Version 1.1a, again +--------------------------------- + +Removed extra numbers in table of contents and section titles when +the sectnum directive is used. + + 2007/12/20 -- Version 1.1a -------------------------- @@ -54,6 +61,7 @@ by 1. (2) The command line flag --title is now implemented. It overrides the document title in the source document if present. + 2007/12/19 -- Version 1.1a -------------------------- Modified: trunk/sandbox/OpenDocument/odtwriter/__init__.py =================================================================== --- trunk/sandbox/OpenDocument/odtwriter/__init__.py 2007-12-20 18:56:47 UTC (rev 5489) +++ trunk/sandbox/OpenDocument/odtwriter/__init__.py 2007-12-20 22:08:32 UTC (rev 5490) @@ -1992,6 +1992,10 @@ 'xlink:type': 'simple', }) self.set_current_element(el) + if (self.in_table_of_contents and + len(node.children) >= 1 and + isinstance(node.children[0], docutils.nodes.generated)): + node.remove(node.children[0]) def depart_reference(self, node): #self.trace_depart_node(node) |