reportlab/platypus/paraparser.py
changeset 1736 dafc17db33d2
parent 1683 7fa753e4420a
child 1931 784fce255e2d
--- a/reportlab/platypus/paraparser.py	Sun Sep 29 23:02:08 2002 +0000
+++ b/reportlab/platypus/paraparser.py	Mon Sep 30 09:43:03 2002 +0000
@@ -1,8 +1,8 @@
 #copyright ReportLab Inc. 2000
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/platypus/paraparser.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/platypus/paraparser.py,v 1.47 2002/07/24 19:56:38 andy_robinson Exp $
-__version__=''' $Id: paraparser.py,v 1.47 2002/07/24 19:56:38 andy_robinson Exp $ '''
+#$Header: /tmp/reportlab/reportlab/platypus/paraparser.py,v 1.48 2002/09/30 09:43:03 rgbecker Exp $
+__version__=''' $Id: paraparser.py,v 1.48 2002/09/30 09:43:03 rgbecker Exp $ '''
 import string
 import re
 from types import TupleType
@@ -167,6 +167,7 @@
 #       < /i > - italics
 #       < u > < /u > - underline
 #       < super > < /super > - superscript
+#       < sup > < /sup > - superscript
 #       < sub > < /sub > - subscript
 #       <font name=fontfamily/fontname color=colorname size=float>
 #       < bullet > </bullet> - bullet text (at head of para only)
@@ -220,6 +221,10 @@
     def end_super( self ):
         self._pop(super=1)
 
+    if _xmllib_newStyle:
+        start_sup = start_super
+        end_sup = end_super
+
     #### sub script
     def start_sub( self, attributes ):
         self._push(sub=1)
@@ -416,6 +421,7 @@
                             'u': (self.start_u, self.end_u),
                             'i': (self.start_i, self.end_i),
                             'super': (self.start_super, self.end_super),
+                            'sup': (self.start_super, self.end_super),
                             'sub': (self.start_sub, self.end_sub),
                             'font': (self.start_font, self.end_font),
                             'greek': (self.start_greek, self.end_greek),
@@ -456,7 +462,7 @@
         if hasattr(frag,'cbDefn'):
             if data!='': syntax_error('Only <onDraw> tag allowed')
         else:
-            # if sub and super are both one they will cancel each other out
+            # if sub and super are both on they will cancel each other out
             if frag.sub == 1 and frag.super == 1:
                 frag.sub = 0
                 frag.super = 0
@@ -637,4 +643,4 @@
 his lyre, while two tumblers went about performing in the midst of
 them when the man struck up with his tune.]''')
     check_text('''<onDraw name="myFunc" label="aaa   bbb">A paragraph''')
-    check_text('''<para><onDraw name="myFunc" label="aaa   bbb">B paragraph</para>''')
\ No newline at end of file
+    check_text('''<para><onDraw name="myFunc" label="aaa   bbb">B paragraph</para>''')