/[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.28 by humppake, Thu Feb 13 16:23:01 2003 UTC revision 1.29 by humppake, Thu Feb 13 17:18:29 2003 UTC
# Line 426  class LaTeXTranslator(nodes.NodeVisitor) Line 426  class LaTeXTranslator(nodes.NodeVisitor)
426      def visit_caption(self, node):      def visit_caption(self, node):
427          self.body.append( '\\caption{\n' )          self.body.append( '\\caption{\n' )
428          for child in node.parent.children:          for child in node.parent.children:
429              if child.attributes.has_key('alt'):              if child.attributes.has_key('label'):
430                  self.body.append('\\label{%s}\n' % child.attributes['alt'])                  self.body.append('\\label{%s}\n' % child.attributes['label'])
431    
432      def depart_caption(self, node):      def depart_caption(self, node):
433          self.body.append('}')          self.body.append('}')
# Line 762  class LaTeXTranslator(nodes.NodeVisitor) Line 762  class LaTeXTranslator(nodes.NodeVisitor)
762              self.body.append(':]')              self.body.append(':]')
763    
764      def visit_figure(self, node):      def visit_figure(self, node):
765          self.body.append( '\\begin{figure}\n' )          self.body.append('\\begin{figure')
766            for child in node.children:
767                if child.attributes.has_key('option'):
768                    self.body.append(child.attributes['option'])
769            self.body.append('}\n')
770    
771      def depart_figure(self, node):      def depart_figure(self, node):
772          self.body.append( "\n\\end{figure}\n" )          self.body.append('\n\\end{figure')
773            for child in node.children:
774                if child.attributes.has_key('option'):
775                    self.body.append(child.attributes['option'])
776            self.body.append('}\n')
777    
778      def visit_footer(self, node):      def visit_footer(self, node):
779          self.context.append(len(self.body))          self.context.append(len(self.body))

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.29

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