diff --git a/nw/convert/file/latex.py b/nw/convert/file/latex.py index e640847b..334e9583 100644 --- a/nw/convert/file/latex.py +++ b/nw/convert/file/latex.py @@ -36,6 +36,7 @@ class LaTeXFile(TextFile): self.outFile = open(filePath,mode="wt+") self.outFile.write("\\documentclass[12pt]{report}\n") self.outFile.write("\\usepackage[utf8]{inputenc}\n") + self.outFile.write("\n") self.outFile.write("\\begin{document}\n") except Exception as e: self.makeAlert(["Failed to open file.",str(e)], nwAlert.ERROR) diff --git a/nw/convert/text/tolatex.py b/nw/convert/text/tolatex.py index 7b8a6f51..2002f8d9 100644 --- a/nw/convert/text/tolatex.py +++ b/nw/convert/text/tolatex.py @@ -110,12 +110,13 @@ class ToLaTeX(Tokenizer): tText = tWrap.fill(tText) # 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. if tType == self.T_EMPTY: if len(thisPar) > 0: self.theResult += begText - self.theResult += "%s\n" % tWrap.fill(" ".join(thisPar)) + for tTemp in thisPar: + self.theResult += "%s\n" % tTemp self.theResult += endText thisPar = []