* src/docgen/ODFDoc.py: add start_superscript and stop_superscript

* src/docgen/KwordDoc.py: add start_superscript and stop_superscript
* src/docgen/RTFDoc.py: add start_superscript and stop_superscript
* src/docgen/HtmlDoc.py: add start_superscript and stop_superscript
* src/docgen/OpenOfficeDoc.py: add start_superscript and stop_superscript
* src/docgen/LaTeXDoc.py: add start_superscript and stop_superscript

svn: r8019
This commit is contained in:
Brian Matherly 2007-01-31 03:13:31 +00:00
parent 4d7d7e88ae
commit 8a1ccd0768
7 changed files with 47 additions and 0 deletions

View File

@ -1,3 +1,11 @@
2007-01-30 Brian Matherly <brian@gramps-project.org>
* src/docgen/ODFDoc.py: add start_superscript and stop_superscript
* src/docgen/KwordDoc.py: add start_superscript and stop_superscript
* src/docgen/RTFDoc.py: add start_superscript and stop_superscript
* src/docgen/HtmlDoc.py: add start_superscript and stop_superscript
* src/docgen/OpenOfficeDoc.py: add start_superscript and stop_superscript
* src/docgen/LaTeXDoc.py: add start_superscript and stop_superscript
2007-01-30 Don Allingham <don@gramps-project.org>
* src/plugins/EventCmp.py: (#886) properly handle CANCEL on save dialog
* src/ReportBase/_ReportDialog.py: error reporting

View File

@ -469,6 +469,12 @@ class HtmlDoc(BaseDoc.BaseDoc):
def end_bold(self):
self.f.write('</b>')
def start_superscript(self):
self.f.write('<sup>')
def end_superscript(self):
self.f.write('</sup>')
def write_note(self,text,format,style_name):
if format == 1:

View File

@ -390,6 +390,15 @@ class KwordDoc(BaseDoc.BaseDoc):
txt = '<FORMAT id="1" pos="%d" len="%d">\n' % (self.bold_start,length)
txt = txt + '<FONT name="%s"/>\n<WEIGHT value="75"/>\n</FORMAT>\n' % self.font_face
self.format_list.append(txt)
def start_superscript(self):
self.sup_start = len(self.text)
def end_superscript(self):
length = len(self.text) - self.sup_start
txt = '<FORMAT id="1" pos="%d" len="%d">\n' % (self.sup_start, length)
txt = txt + '<VERTALIGN value="2"/></FORMAT>\n'
self.format_list.append(txt)
def start_table(self,name,style_name):
self.tbl= self.table_styles[style_name]

View File

@ -374,6 +374,12 @@ class LaTeXDoc(BaseDoc.BaseDoc):
def end_bold(self):
"""End bold face"""
self.f.write('}')
def start_superscript(self):
self.f.write('\\textsuperscript{')
def end_superscript(self):
self.f.write('}')
def start_table(self,name,style_name):
"""Begin new table"""

View File

@ -505,6 +505,12 @@ class ODFDoc(BaseDoc.BaseDoc):
def end_bold(self):
self.cntnt.write('</text:span>')
def start_superscript(self):
self.cntnt.write('<text:span text:style-name="GSuper">')
def end_superscript(self):
self.cntnt.write('</text:span>')
def _add_zip(self,zfile,name,data,t):
zipinfo = zipfile.ZipInfo(name.encode('latin-1'))

View File

@ -471,6 +471,12 @@ class OpenOfficeDoc(BaseDoc.BaseDoc):
def end_bold(self):
self.cntnt.write('</text:span>')
def start_superscript(self):
self.cntnt.write('<text:span text:style-name="GSuper">')
def end_superscript(self):
self.cntnt.write('</text:span>')
def _add_zip(self,zfile,name,data,t):
zipinfo = zipfile.ZipInfo(name.encode('latin-1'))

View File

@ -256,6 +256,12 @@ class RTFDoc(BaseDoc.BaseDoc):
self.opened = 0
self.f.write('}')
def start_superscript(self):
self.text = self.text + '{{\*\updnprop5801}\up10 '
def end_superscript(self):
self.text = self.text + '}'
#--------------------------------------------------------------------
#
# Start a table. Grab the table style, and store it. Keep a flag to