gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] gzz/metacode latex2e.py umlrst.py


From: Asko Soukka
Subject: [Gzz-commits] gzz/metacode latex2e.py umlrst.py
Date: Tue, 11 Feb 2003 08:26:47 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Asko Soukka <address@hidden>    03/02/11 08:26:47

Modified files:
        metacode       : latex2e.py umlrst.py 

Log message:
        directives.unchanged 'width' value to work with UML and /figure in latex

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/metacode/latex2e.py.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/metacode/umlrst.py.diff?tr1=1.34&tr2=1.35&r1=text&r2=text

Patches:
Index: gzz/metacode/latex2e.py
diff -u gzz/metacode/latex2e.py:1.10 gzz/metacode/latex2e.py:1.11
--- gzz/metacode/latex2e.py:1.10        Mon Feb 10 00:36:15 2003
+++ gzz/metacode/latex2e.py     Tue Feb 11 08:26:47 2003
@@ -3,8 +3,8 @@
 """
 :Author: Engelbert Gruber (hacked by the Gzz project)
 :Contact: address@hidden
-:Revision: $Revision: 1.10 $
-:Date: $Date: 2003/02/10 05:36:15 $
+:Revision: $Revision: 1.11 $
+:Date: $Date: 2003/02/11 13:26:47 $
 :Copyright: This module has been placed in the public domain.
 
 LaTeX2e document tree Writer.
@@ -230,7 +230,8 @@
                     _ISO639_TO_BABEL[settings.language_code]
         self.head_prefix = [
               self.latex_head % (self.d_options,self.d_class),
-              '\\usepackage{babel}\n',     # language is in documents settings.
+#/cite didn't work with babel (jvk)
+#              '\\usepackage{babel}\n',     # language is in documents 
settings.
               '\\usepackage{shortvrb}\n',  # allows verb in footnotes.
               self.encoding,
               # * tabularx: for docinfo, automatic width of columns, always on 
one page.
@@ -832,8 +833,11 @@
     def visit_image(self, node):
         atts = node.attributes.copy()
         href = atts['uri']
-        ##self.body.append('\\begin{center}\n')
-        self.body.append('\n\\includegraphics{%s}\n' % href)
+        self.body.append('\n\\centering\n')
+        if atts.has_key('width'):
+            self.body.append('\n\\includegraphics{%s}{%s}\n' % (atts['width'], 
href))
+        else:
+            self.body.append('\n\\includegraphics{%s}\n' % href)
         ##self.body.append('\\end{center}\n')
 
     def depart_image(self, node):
Index: gzz/metacode/umlrst.py
diff -u gzz/metacode/umlrst.py:1.34 gzz/metacode/umlrst.py:1.35
--- gzz/metacode/umlrst.py:1.34 Tue Feb 11 07:30:13 2003
+++ gzz/metacode/umlrst.py      Tue Feb 11 08:26:47 2003
@@ -27,7 +27,7 @@
     """
     uml_directive.arguments = (1, 0, 0)
     uml_directive.options = {'caption': 
docutils.parsers.rst.directives.unchanged,
-                             'scale': 
docutils.parsers.rst.directives.nonnegative_int,
+                             'width': 
docutils.parsers.rst.directives.unchanged,
                              }
     uml_directive.content = 1
 
@@ -63,8 +63,10 @@
     trans = mputils._slashify(umltool.settings['to_tmpdir'])
     #print trans
     src = trans+attributes['name']+"_gen.eps"
-    uml_node = docutils.nodes.image(uri=src, alt="UML: "+attributes['name'],
-                                    _uml=attributes['name'])
+    options['uri'] = src
+    options['alt'] = "UML: "+attributes['name']
+    options['_uml'] = attributes['name']
+    uml_node = docutils.nodes.image(src, **options)
 
     #if we have a caption, we want to make it a figure (or do we?)
     if options.has_key('caption') and len(options['caption']) > 0:




reply via email to

[Prev in Thread] Current Thread [Next in Thread]