425 |
|
|
426 |
def visit_caption(self, node): |
def visit_caption(self, node): |
427 |
self.body.append( '\\caption{\n' ) |
self.body.append( '\\caption{\n' ) |
428 |
|
atts = node.attributes.copy() |
429 |
|
if atts.has_key('alt'): self.body.append('\\label{%s}\n' % atts['alt']) |
430 |
|
|
431 |
def depart_caption(self, node): |
def depart_caption(self, node): |
432 |
self.body.append('}') |
self.body.append('}') |
841 |
|
|
842 |
def visit_image(self, node): |
def visit_image(self, node): |
843 |
atts = node.attributes.copy() |
atts = node.attributes.copy() |
844 |
|
if atts.has_key('alt'): |
845 |
|
for child in node.children: |
846 |
|
child.setAttribute('alt', atts['alt']) |
847 |
href = atts['uri'] |
href = atts['uri'] |
848 |
self.body.append('\\centering\n') |
self.body.append('\\centering\n') |
849 |
if atts.has_key('alt'): self.body.append('\\label{%s}\n' % atts['alt']) |
if atts.has_key('alt'): self.body.append('\\label{%s}\n' % atts['alt']) |