Sat, 04 Feb 2012 17:43:50 +0100
Bug fixes for the RTF and TeX exporters.
(transplanted from 823a26f767cbbe9166fce812fd0ae4ab9667c4c8)
QScintilla/Exporters/ExporterRTF.py | file | annotate | diff | comparison | revisions | |
QScintilla/Exporters/ExporterTEX.py | file | annotate | diff | comparison | revisions |
--- a/QScintilla/Exporters/ExporterRTF.py Mon Jan 30 18:53:47 2012 +0100 +++ b/QScintilla/Exporters/ExporterRTF.py Sat Feb 04 17:43:50 2012 +0100 @@ -30,7 +30,7 @@ RTF_HEADEROPEN = "{\\rtf1\\ansi\\deff0\\deftab720" RTF_HEADERCLOSE = "\n" RTF_FONTDEFOPEN = "{\\fonttbl" - RTF_FONTDEF = "{\\f{0:d}\\fnil\\fcharset{1:d} {2};}" + RTF_FONTDEF = "{{\\f{0:d}\\fnil\\fcharset{1:d} {2};}}" RTF_FONTDEFCLOSE = "}" RTF_COLORDEFOPEN = "{\\colortbl" RTF_COLORDEF = "\\red{0:d}\\green{1:d}\\blue{2:d};" @@ -51,7 +51,7 @@ RTF_ITALIC_ON = "\\i" RTF_ITALIC_OFF = "\\i0" - RTF_EOLN = "\\par\n" + RTF_EOLN = "\\line\n" RTF_TAB = "\\tab " RTF_COLOR = "#000000" @@ -330,7 +330,7 @@ f.write(ch.decode()) column += 1 - prevCR = ch == '\r' + prevCR = ch == b'\r' pos += 1 f.write(self.RTF_BODYCLOSE)
--- a/QScintilla/Exporters/ExporterTEX.py Mon Jan 30 18:53:47 2012 +0100 +++ b/QScintilla/Exporters/ExporterTEX.py Sat Feb 04 17:43:50 2012 +0100 @@ -206,7 +206,7 @@ style = self.editor.styleAt(pos) if style != styleCurrent: # new style - f.write("}\n\\eric{0}{{".format(self.__texStyle(style))) + f.write("}}\n\\eric{0}{{".format(self.__texStyle(style))) styleCurrent = style if ch == b'\t':