changeset 3186:a36faa9f9d9f

Add support for the FootNote macro by creating a DocBook-native footnote.
author Mikko Virkkil? <mvirkkil@cc.hut.fi>
date Wed, 05 Mar 2008 00:39:19 +0100
parents 5e0aede39dea
children 4232b56627c7
files MoinMoin/formatter/text_docbook.py
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/formatter/text_docbook.py	Wed Mar 05 00:30:33 2008 +0100
+++ b/MoinMoin/formatter/text_docbook.py	Wed Mar 05 00:39:19 2008 +0100
@@ -530,6 +530,14 @@
     def macro(self, macro_obj, name, args, markup=None):
         if name in self.blacklisted_macros:
             self._emitComment("The macro %s doesn't work with the DocBook formatter." % name)
+
+        elif name == "FootNote":
+            footnote = self.doc.createElement('footnote')
+            para = self.doc.createElement('para')
+            para.appendChild(self.doc.createTextNode(str(args)))
+            footnote.appendChild(para)
+            self.cur.appendChild(footnote)
+
         elif name == "Include":
             text = FormatterBase.macro(self, macro_obj, name, args)
             if text.strip():