759 |
self.body.append( '\\begin{figure}\n' ) |
self.body.append( '\\begin{figure}\n' ) |
760 |
|
|
761 |
def depart_figure(self, node): |
def depart_figure(self, node): |
762 |
self.body.append( '\\end{figure}\n' ) |
self.body.append( "n\\end{figure}\n" ) |
763 |
|
|
764 |
def visit_footer(self, node): |
def visit_footer(self, node): |
765 |
self.context.append(len(self.body)) |
self.context.append(len(self.body)) |
837 |
def visit_image(self, node): |
def visit_image(self, node): |
838 |
atts = node.attributes.copy() |
atts = node.attributes.copy() |
839 |
href = atts['uri'] |
href = atts['uri'] |
840 |
self.body.append('\n\\centering\n') |
self.body.append('\\centering\n') |
841 |
if atts.has_key('width'): |
if atts.has_key('alt'): self.body.append('\\label{%s}\n' % atts['alt']) |
842 |
self.body.append('\n\\includegraphics[width=%s]{%s}\n' % (atts['width'], href)) |
self.body.append('\\includegraphics') |
843 |
else: |
if atts.has_key('width'): self.body.append('[width=%s]' % atts['width']) |
844 |
self.body.append('\n\\includegraphics{%s}\n' % href) |
self.body.append('{%s}\n' % href) |
845 |
##self.body.append('\\end{center}\n') |
##self.body.append('\\end{center}\n') |
846 |
|
|
847 |
def depart_image(self, node): |
def depart_image(self, node): |