--- a/eric6/QScintilla/Exporters/ExporterTEX.py Wed Apr 21 17:56:12 2021 +0200 +++ b/eric6/QScintilla/Exporters/ExporterTEX.py Wed Apr 21 19:40:50 2021 +0200 @@ -216,10 +216,11 @@ QsciScintilla.STYLE_DEFAULT) f.write("\\begin{document}\n\n") - if titleFullPath: - title = self.editor.getFileName() - else: - title = os.path.basename(self.editor.getFileName()) + title = ( + self.editor.getFileName() + if titleFullPath else + os.path.basename(self.editor.getFileName()) + ) f.write( "Source File: {0}\n\n\\noindent\n\\tiny{{\n" .format(title))