forked from Deltachaos/LaTeX-German-Letter
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Vorlage.tex
executable file
·142 lines (122 loc) · 3.91 KB
/
Vorlage.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% LaTeX German Letter von Maximilian Ruta %%
%% ist als Public Domain freigegeben. %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[DINmtext, pagenumber=false, parskip=half,%
fromalign=left, fromphone=true,%
fromemail=true, fromurl=true, %
fromlogo=true, fromrule=false,
firstfoot=false,%% Footerbereich
subject=beforeopening,%% Plazierung der Betreffzeile
]{scrlttr2}
\usepackage[utf8]{inputenc}
\usepackage{coordsys,logsys,color}
\usepackage{ngerman}
\usepackage{listings}
%\usepackage[none]{hyphenat}
\usepackage[breaklinks]{hyperref}
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{afterpage}
\usepackage{ifthen}
\usepackage[T1]{fontenc}
\usepackage[scaled]{helvet}
\usepackage[right]{eurosym}
\usepackage{pdfpages}
\usepackage{tabularx}
\usepackage{picins}
\usepackage{textpos}
\newcommand{\RM}[1]{\MakeUppercase{\romannumeral #1{.}}}
\renewcommand*\familydefault{\sfdefault}
\RequirePackage{graphicx}
\definecolor{darkblue}{rgb}{0,0,.6}
%pdfpagemode=FullScreen
\hypersetup{pdftex=false, colorlinks=true, breaklinks=true, linkcolor=darkblue, menucolor=darkblue, pagecolor=darkblue, urlcolor=darkblue, citecolor=darkblue,pdfstartview=FitH,pdfborder={0 0 0}
%,pdfpagelayout=TwoColumnLeft
}
\usepackage{lipsum}% provides filler text
\newboolean{showbankaccount}
\setboolean{showbankaccount}{false}
%=================================================================================
\input{Data}
\ifdefined\openingtext
\else
\ifdefined\tosalutation
\ifthenelse{\equal{\tosalutation}{Herr}}{
\def\openingtext{Sehr geehrter Herr \usekomavar{toname},}
}{
\ifthenelse{\equal{\tosalutation}{Frau}}{
\def\openingtext{Sehr geehrte Frau \usekomavar{toname},}
}{
\def\openingtext{Sehr geehrte Damen und Herren,}
}
}
\else
\def\openingtext{Sehr geehrte Damen und Herren,}
\fi
\fi
%=================================================================================
\ifthenelse{\boolean{showbankaccount}}{
\setkomavar{frombank}{IBAN: \frombankaccountnumber \\BIC: \frombankcodenumber \\Bank: \frombankname}}{}
\renewcommand{\enclname}{Anlagen}
\setkomavar{enclseparator}{: }
%\setkomavar{fromlogo}{}
\firsthead{\begin{tabular}{@{}l@{}}
\usekomavar{fromname}\\
\usekomavar{fromaddress}
\end{tabular}}
\fancyhf{}
\pagestyle{fancy}
\lfoot{\scriptsize
%\footnotesize
\begin{tabular}[t]{l@{}}
\textbf{Postanschrift}\\
\usekomavar{fromname}\\
\usekomavar{fromaddress}
\end{tabular}
\ifkomavarempty{frombank}{}{
\begin{tabular}[t]{l@{}}
\textbf{Bankverbindung}\\
\usekomavar{frombank}
\end{tabular}}
\begin{tabular}[t]{l@{}}
\ifkomavarempty{fromphone}{}{\textbf{Telefon}\\
\usekomavar{fromphone}}
\ifkomavarempty{fromfax}{}{
\\\textbf{Telefax}\\
\usekomavar{fromfax}}
\ifkomavarempty{fromemail}{}{
\\\textbf{E-Mail}\\
\usekomavar{fromemail}}
\end{tabular}
\begin{tabular}[t]{l@{}}
\ifthenelse{\isundefined{\fromjabber}}{}{\textbf{Jabber}\\
\fromjabber\\}\ifthenelse{\isundefined{\fromgpg}}{}{\textbf{GnuPG Key}\\
\fromgpg}
\end{tabular}
}
\rhead{\footnotesize Seite \thepage\ von \pageref{LastPage}}
\renewcommand{\headheight}{24pt}
\renewcommand{\footrulewidth}{0.4pt}
\global\def\headrulewidth{0pt}
\setkomavar{toname}{\komatoname}
\newcommand{\kto}{\begin{tabular}[t]{l@{}}
\textbf{Bankverbindung}\\
\usekomavar{frombank}
\end{tabular}}
\newcommand{\konto}{\kto}
\makeatletter
\@addtoplength{toaddrvpos}{0.5cm}
\makeatother
\begin{document}
\begin{letter}{}
\begin{textblock*}{3cm}(4.3cm,1.2cm)
\IfFileExists{marke.pdf}{\parpic[r]{\includegraphics[trim=25mm 260mm 151mm 25mm,clip]{marke}}}{}
\end{textblock*}
\opening{\openingtext}
\lhead{}
\thispagestyle{fancy}
\afterpage{\lhead{\usekomavar{subject}}\global\def\headrulewidth{0.4pt}}
\input{Letter}
\end{letter}
\end{document}