/[gzz]/gzz/metacode/latex2e.py
ViewVC logotype

Diff of /gzz/metacode/latex2e.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.25 by jvk, Wed Feb 12 16:52:48 2003 UTC revision 1.26 by humppake, Wed Feb 12 17:31:22 2003 UTC
# Line 425  class LaTeXTranslator(nodes.NodeVisitor) Line 425  class LaTeXTranslator(nodes.NodeVisitor)
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('}')
# Line 839  class LaTeXTranslator(nodes.NodeVisitor) Line 841  class LaTeXTranslator(nodes.NodeVisitor)
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'])

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26