[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/metacode latex.py latex2e.py
From: |
Asko Soukka |
Subject: |
[Gzz-commits] gzz/metacode latex.py latex2e.py |
Date: |
Sat, 15 Feb 2003 05:22:54 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Asko Soukka <address@hidden> 03/02/15 05:22:54
Modified files:
metacode : latex.py latex2e.py
Log message:
alternative -> environment, :environment: figure* for two column
figures, ..figure:: table and environment:: table for tables after :)
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/metacode/latex.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/metacode/latex2e.py.diff?tr1=1.36&tr2=1.37&r1=text&r2=text
Patches:
Index: gzz/metacode/latex.py
diff -u gzz/metacode/latex.py:1.3 gzz/metacode/latex.py:1.4
--- gzz/metacode/latex.py:1.3 Thu Feb 13 12:24:40 2003
+++ gzz/metacode/latex.py Sat Feb 15 05:22:54 2003
@@ -38,7 +38,9 @@
directives._directives['bibliography'] = bibliography_directive
#Some additional options and changes for latex2e.py
+images.figure.arguments = (0, 1, 1)
images.image.options['height'] = directives.unchanged;
images.image.options['width'] = directives.unchanged;
images.image.options['label'] = directives.unchanged;
-images.image.options['alternative'] = directives.unchanged;
+images.image.options['environment'] = directives.unchanged;
+
Index: gzz/metacode/latex2e.py
diff -u gzz/metacode/latex2e.py:1.36 gzz/metacode/latex2e.py:1.37
--- gzz/metacode/latex2e.py:1.36 Fri Feb 14 13:42:31 2003
+++ gzz/metacode/latex2e.py Sat Feb 15 05:22:54 2003
@@ -3,8 +3,8 @@
"""
:Author: Engelbert Gruber (hacked by the Gzz project)
:Contact: address@hidden
-:Revision: $Revision: 1.36 $
-:Date: $Date: 2003/02/14 18:42:31 $
+:Revision: $Revision: 1.37 $
+:Date: $Date: 2003/02/15 10:22:54 $
:Copyright: This module has been placed in the public domain.
LaTeX2e document tree Writer.
@@ -772,18 +772,18 @@
self.body.append(':]')
def visit_figure(self, node):
- self.body.append('\\begin{figure')
+ environment = "figure"
for child in node.children:
- if child.attributes.has_key('alternative'):
- self.body.append(child.attributes['alternative'])
- self.body.append('}\n')
+ if child.attributes.has_key('environment'):
+ environment = child.attributes['environment']
+ self.body.append('\\begin{'+environment+'}\n')
def depart_figure(self, node):
- self.body.append('\n\\end{figure')
+ environment = "figure"
for child in node.children:
- if child.attributes.has_key('alternative'):
- self.body.append(child.attributes['alternative'])
- self.body.append('}\n')
+ if child.attributes.has_key('environment'):
+ environment = child.attributes['environment']
+ self.body.append('\n\\end{'+environment+'}\n')
def visit_footer(self, node):
self.context.append(len(self.body))
@@ -860,12 +860,16 @@
def visit_image(self, node):
atts = node.attributes.copy()
- href = atts['uri']
- self.body.append('\\centering\n')
- self.body.append('\\includegraphics')
- if atts.has_key('width'): self.body.append('[width=%s]' %
atts['width'])
- else: self.body.append('[width=\\columnwidth]')
- self.body.append('{%s}\n' % href)
+ if not atts.has_key('environment') or \
+ (atts.has_key('environment') and \
+ not atts['environment'] == 'table' and \
+ not atts['uri'] == 'table'):
+ href = atts['uri']
+ self.body.append('\\centering\n')
+ self.body.append('\\includegraphics')
+ if atts.has_key('width'): self.body.append('[width=%s]' %
atts['width'])
+ else: self.body.append('[width=\\columnwidth]')
+ self.body.append('{%s}\n' % href)
##self.body.append('\\end{center}\n')
def depart_image(self, node):