QScintilla/Exporters/ExporterTEX.py

changeset 3039
8dd0165d805d
parent 3034
7ce719013078
child 3060
5883ce99ee12
child 3160
209a07d7e401
equal deleted inserted replaced
3038:7fe9a53280bd 3039:8dd0165d805d
128 titleFullPath = Preferences.getEditorExporter( 128 titleFullPath = Preferences.getEditorExporter(
129 "TeX/FullPathAsTitle") 129 "TeX/FullPathAsTitle")
130 130
131 lex = self.editor.getLexer() 131 lex = self.editor.getLexer()
132 self.defaultPaper = lex and \ 132 self.defaultPaper = lex and \
133 lex.paper(QsciScintilla.STYLE_DEFAULT) or \ 133 lex.paper(QsciScintilla.STYLE_DEFAULT) or \
134 self.editor.paper().name() 134 self.editor.paper().name()
135 self.defaultColor = lex and \ 135 self.defaultColor = lex and \
136 lex.color(QsciScintilla.STYLE_DEFAULT) or \ 136 lex.color(QsciScintilla.STYLE_DEFAULT) or \
137 self.editor.color().name() 137 self.editor.color().name()
138 self.defaultFont = lex and \ 138 self.defaultFont = lex and \
139 lex.color(QsciScintilla.STYLE_DEFAULT) or \ 139 lex.color(QsciScintilla.STYLE_DEFAULT) or \
140 Preferences.getEditorOtherFonts("DefaultFont") 140 Preferences.getEditorOtherFonts("DefaultFont")
141 141
142 lengthDoc = self.editor.length() 142 lengthDoc = self.editor.length()
143 styleIsUsed = {} 143 styleIsUsed = {}
144 if onlyStylesUsed: 144 if onlyStylesUsed:
145 for index in range(QsciScintilla.STYLE_MAX + 1): 145 for index in range(QsciScintilla.STYLE_MAX + 1):
271 self.editor, 271 self.editor,
272 self.trUtf8("Export source"), 272 self.trUtf8("Export source"),
273 self.trUtf8( 273 self.trUtf8(
274 """<p>The source could not be exported to""" 274 """<p>The source could not be exported to"""
275 """ <b>{0}</b>.</p><p>Reason: {1}</p>""") 275 """ <b>{0}</b>.</p><p>Reason: {1}</p>""")
276 .format(filename, str(err))) 276 .format(filename, str(err)))
277 finally: 277 finally:
278 QApplication.restoreOverrideCursor() 278 QApplication.restoreOverrideCursor()

eric ide

mercurial