Superscripts in HTML and LaTeX

svn: r1503
This commit is contained in:
Alex Roitman 2003-05-08 00:42:10 +00:00
parent 1e9202ac0d
commit f2e22535cc
2 changed files with 4 additions and 0 deletions

View File

@ -408,6 +408,8 @@ class HtmlDoc(TextDoc.TextDoc):
text = string.replace(text,'<','&lt;');
text = string.replace(text,'>','&gt;');
text = string.replace(text,'\n','<br>')
text = text.replace('&lt;super&gt;','<sup>')
text = text.replace('&lt;/super&gt;','</sup>')
if text != "":
self.empty = 0
self.f.write(text)

View File

@ -381,6 +381,8 @@ class LaTeXDoc(TextDoc.TextDoc):
if text == '\n':
text = '\\newline\n'
text = string.replace(text,'#','\#')
text = text.replace('<super>','\\textsuperscript{')
text = text.replace('</super>','}')
self.f.write(text)