--- a/QScintilla/Exporters/ExporterTEX.py Fri Nov 01 15:48:48 2013 +0100 +++ b/QScintilla/Exporters/ExporterTEX.py Sun Nov 03 15:58:22 2013 +0100 @@ -132,14 +132,14 @@ lex = self.editor.getLexer() self.defaultPaper = lex and \ - lex.paper(QsciScintilla.STYLE_DEFAULT) or \ - self.editor.paper().name() + lex.paper(QsciScintilla.STYLE_DEFAULT) or \ + self.editor.paper().name() self.defaultColor = lex and \ - lex.color(QsciScintilla.STYLE_DEFAULT) or \ - self.editor.color().name() + lex.color(QsciScintilla.STYLE_DEFAULT) or \ + self.editor.color().name() self.defaultFont = lex and \ - lex.color(QsciScintilla.STYLE_DEFAULT) or \ - Preferences.getEditorOtherFonts("DefaultFont") + lex.color(QsciScintilla.STYLE_DEFAULT) or \ + Preferences.getEditorOtherFonts("DefaultFont") lengthDoc = self.editor.length() styleIsUsed = {} @@ -173,7 +173,7 @@ if lex: istyle = 0 while istyle <= QsciScintilla.STYLE_MAX: - if (istyle <= QsciScintilla.STYLE_DEFAULT or \ + if (istyle <= QsciScintilla.STYLE_DEFAULT or istyle > QsciScintilla.STYLE_LASTPREDEFINED) and \ styleIsUsed[istyle]: if lex.description(istyle) or \ @@ -274,7 +274,7 @@ self.trUtf8("Export source"), self.trUtf8( """<p>The source could not be exported to""" - """ <b>{0}</b>.</p><p>Reason: {1}</p>""")\ - .format(filename, str(err))) + """ <b>{0}</b>.</p><p>Reason: {1}</p>""") + .format(filename, str(err))) finally: QApplication.restoreOverrideCursor()