Restore docutils compatibility.

This commit is contained in:
Georg Brandl 2009-07-09 11:59:52 +02:00
parent b809740f66
commit 536476287e
2 changed files with 4 additions and 4 deletions

View File

@ -303,11 +303,11 @@ class HTMLTranslator(BaseTranslator):
if node['uri'].lower().endswith('svg') or \
node['uri'].lower().endswith('svgz'):
atts = {'data': node['uri'], 'type': 'image/svg+xml'}
if 'width' in node:
if node.has_key('width'):
atts['width'] = node['width']
if 'height' in node:
if node.has_key('height'):
atts['height'] = node['height']
if 'align' in node:
if node.has_key('align'):
self.body.append('<div align="%s" class="align-%s">' %
(node['align'], node['align']))
self.context.append('</div>\n')

View File

@ -254,7 +254,7 @@ class LaTeXTranslator(nodes.NodeVisitor):
# ... and all others are the appendices
self.body.append('\n\\appendix\n')
self.first_document = -1
if 'docname' in node:
if node.has_key('docname'):
self.body.append('\\hypertarget{--doc-%s}{}' % node['docname'])
# "- 1" because the level is increased before the title is visited
self.sectionlevel = self.top_sectionlevel - 1