From ecdc6333a9267d71db73e82fac1c29d8c7d0e394 Mon Sep 17 00:00:00 2001
From: Marei Peischl <marei@peitex.de>
Date: Sun, 12 Jan 2020 22:05:22 +0100
Subject: [PATCH] new structure for letter.tex

---
 letter.tex | 53 +++++++++++++++--------------------------------------
 1 file changed, 15 insertions(+), 38 deletions(-)

diff --git a/letter.tex b/letter.tex
index 17f993950..3b12fb4a8 100644
--- a/letter.tex
+++ b/letter.tex
@@ -22,56 +22,33 @@ $( KiviLatex.required_packages_for_html )$
 
 \begin{document}
 
-\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
-
-\vspace*{1cm}
-
-\begin{minipage}{14cm}
-
-  $( KiviLatex.filter(customer.name) )$
-
-  $( KiviLatex.filter(letter.contact.formal_greeting) )$
-
-  $( KiviLatex.filter(customer.street) )$
-
-  $( KiviLatex.filter(customer.zipcode) )$ $( KiviLatex.filter(customer.city) )$
-
-  $( KiviLatex.filter(customer.country) )$
-
-\end{minipage}
-
-\vspace{2.5cm}
-\hfill $( KiviLatex.filter(letter.date.to_kivitendo) )$
+\setkomavar{date}{$( KiviLatex.filter(letter.date.to_kivitendo) )$}
 
 $( IF letter.reference )$
-\textbf{\ihrzeichen : $( KiviLatex.filter(letter.reference) )$}
-
-\vspace{1cm}
+\setkomavar*{yourref}{\ihrzeichen}
+\setkomavar{yourref}{$( KiviLatex.filter(letter.reference) )$}
 $( END )$
 
 $( IF letter.subject )$
-\textbf{\betreff : $( KiviLatex.filter(letter.subject) )$}
-
-\vspace{1cm}
+\setkomavar{subject}{$( KiviLatex.filter(letter.subject) )$}
 $( END )$
 
-$( KiviLatex.filter(letter.greeting) )$
+\begin{letter}{
+		$( KiviLatex.filter(customer.name) )$\strut\\
+		$( KiviLatex.filter(letter.contact.formal_greeting) )$\strut\\
+		$( KiviLatex.filter(customer.street) )$\strut\\
+		$( KiviLatex.filter(customer.zipcode) )$ $( KiviLatex.filter(customer.city) )$\strut\\
+		$( KiviLatex.filter(customer.country) )$
+	}
 
-\vspace{0.5cm}
+\opening{$( KiviLatex.filter(letter.greeting) )$}
 
-$( KiviLatex.filter_html(letter.body) )$
 
-\vspace{0.5cm}
-
-\begin{minipage}{6cm}
-
-\textbf{$( KiviLatex.filter(letter.employee.name) )$}
+$( KiviLatex.filter_html(letter.body) )$
 
-\end{minipage}
-\begin{minipage}{6cm}
 
-\textbf{$( KiviLatex.filter(letter.salesman.name) )$}
+\closing{\gruesse}
 
-\end{minipage}
+\end{letter}
 
 \end{document}
-- 
2.20.1