|
From: Aahz <aa...@py...> - 2002-10-22 01:50:24
|
I've got the following kludge::
def visit_footnote_reference(self, node):
name = node['refid']
id = node['id']
number = node['auto']
for footnote in self.document.autofootnotes:
if name == footnote['name']:
break
self.body.append('<text:footnote text:id="%s">\n' % id)
self.body.append('<text:footnote-citation text:string-value="%s"/>\n' % number)
self.body.append('<text:footnote-body>\n')
self.body.append(self.start_para % '.body')
for child in footnote.children:
if isinstance(child, nodes.paragraph):
self.body.append(child.astext())
self.body.append(self.end_para)
self.body.append('</text:footnote-body>\n')
self.body.append('</text:footnote>')
raise nodes.SkipNode
What I really ought to do is call for a walkabout on the footnote node,
but I can't quite figure out how to do that. There's also the issue of
figuring out how to sequence in the <text:footnote-body> tag -- adding
it as part of depart_label() just doesn't appeal to me.
The flip side is that what I've currently got isn't picking up
intra-paragraph formatting. <sigh>
--
Aahz (aa...@py...) <*> http://www.pythoncraft.com/
Project Vote Smart: http://www.vote-smart.org/
|