diff --git a/latty.py b/latty.py index 8626578..7727af3 100644 --- a/latty.py +++ b/latty.py @@ -27,9 +27,6 @@ class CLData(): ("body", self.body), ] -def define(file, name, data, whitespace=""): - file.write("\\def \\" + name + "{" + data + whitespace + "}\n") - def get_unique(): import uuid unique = str(uuid.uuid1().hex) @@ -44,7 +41,7 @@ def generate(data: CLData): unique_file = output_dir + unique + ".tex" f = open(unique_file, "w") for pair in data.get_pairs(): - file.write("\\def \\" + pair[0] + "{" + pair[0] + "}\n") + f.write("\\def \\" + pair[0] + "{" + pair[1] + "}\n") f.write(open(proj_dir + "/writing_templates/base.tex", "r").read()) f.close() diff --git a/writing_templates/base.tex b/writing_templates/base.tex index 45f03e7..35537cf 100644 --- a/writing_templates/base.tex +++ b/writing_templates/base.tex @@ -5,7 +5,7 @@ \begin{document} \begin{letter}{} -\opening{Dear \thecompany,} +\opening{Dear \company,} \body