From 682e11bd86e0438af307b66806dcd90f5b544342 Mon Sep 17 00:00:00 2001 From: grubert Date: Tue, 8 May 2007 07:43:40 +0000 Subject: [PATCH] Add assemble_parts to writer. git-svn-id: https://docutils.svn.sourceforge.net/svnroot/docutils/trunk@5072 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/HISTORY.txt | 1 + docutils/docutils/writers/latex2e/__init__.py | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/docutils/HISTORY.txt b/docutils/HISTORY.txt index a011a08eb..c402e189d 100644 --- a/docutils/HISTORY.txt +++ b/docutils/HISTORY.txt @@ -116,6 +116,7 @@ Changes Since 0.4 * docutils/writers/latex2e/__init__.py: + - Add assemble_parts to writer. - Add simply support for nested tables. - Fix verbatim in tables if use-verbatim-when-possible. - Use section commands down to subparagraph. diff --git a/docutils/docutils/writers/latex2e/__init__.py b/docutils/docutils/writers/latex2e/__init__.py index 3db4cf418..cbded8370 100644 --- a/docutils/docutils/writers/latex2e/__init__.py +++ b/docutils/docutils/writers/latex2e/__init__.py @@ -155,6 +155,9 @@ class Writer(writers.Writer): config_section = 'latex2e writer' config_section_dependencies = ('writers',) + visitor_attributes = ("head_prefix", "head", + "body_prefix", "body", "body_suffix") + output = None """Final translated form of `document`.""" @@ -172,6 +175,12 @@ class Writer(writers.Writer): self.body = visitor.body self.body_suffix = visitor.body_suffix + def assemble_parts(self): + writers.Writer.assemble_parts(self) + for part in self.visitor_attributes: + self.parts[part] = ''.join(getattr(self, part)) + + """ Notes on LaTeX -------------- -- 2.11.4.GIT