Fixed LaTeX export for no wrapping setting
This commit is contained in:
@@ -36,6 +36,7 @@ class LaTeXFile(TextFile):
|
|||||||
self.outFile = open(filePath,mode="wt+")
|
self.outFile = open(filePath,mode="wt+")
|
||||||
self.outFile.write("\\documentclass[12pt]{report}\n")
|
self.outFile.write("\\documentclass[12pt]{report}\n")
|
||||||
self.outFile.write("\\usepackage[utf8]{inputenc}\n")
|
self.outFile.write("\\usepackage[utf8]{inputenc}\n")
|
||||||
|
self.outFile.write("\n")
|
||||||
self.outFile.write("\\begin{document}\n")
|
self.outFile.write("\\begin{document}\n")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.makeAlert(["Failed to open file.",str(e)], nwAlert.ERROR)
|
self.makeAlert(["Failed to open file.",str(e)], nwAlert.ERROR)
|
||||||
|
|||||||
@@ -110,12 +110,13 @@ class ToLaTeX(Tokenizer):
|
|||||||
tText = tWrap.fill(tText)
|
tText = tWrap.fill(tText)
|
||||||
|
|
||||||
# Then the text can receive final formatting before we append it to the results.
|
# Then the text can receive final formatting before we append it to the results.
|
||||||
# We also store text lines in a buffer and merge them only when we find an empty line,
|
# We also store text lines in a buffer and merge them only when we find an empty line
|
||||||
# indicating a new paragraph.
|
# indicating a new paragraph.
|
||||||
if tType == self.T_EMPTY:
|
if tType == self.T_EMPTY:
|
||||||
if len(thisPar) > 0:
|
if len(thisPar) > 0:
|
||||||
self.theResult += begText
|
self.theResult += begText
|
||||||
self.theResult += "%s\n" % tWrap.fill(" ".join(thisPar))
|
for tTemp in thisPar:
|
||||||
|
self.theResult += "%s\n" % tTemp
|
||||||
self.theResult += endText
|
self.theResult += endText
|
||||||
thisPar = []
|
thisPar = []
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user