Skip to content

Instantly share code, notes, and snippets.

@mallim
Last active April 5, 2018 17:18
Show Gist options
  • Save mallim/80aeaa0560d1e9f4c80698f3abadac66 to your computer and use it in GitHub Desktop.
Save mallim/80aeaa0560d1e9f4c80698f3abadac66 to your computer and use it in GitHub Desktop.
\documentclass[
fromalign=left, % letter head on the right
fromphone, % show phone number
fromaddress,
fromemail, % show email
version=last, % latest version of KOMA letter
refline=dateleft, % aligns both the city and the date to the left
backaddress=off, % Sender address in this window
foldmarks=on, % Print foldmarks
parskip=full,
firstfoot=on % display footer on first page
]{scrlttr2}
% \usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{parskip}
\usepackage{graphics}
\usepackage{booktabs}
\usepackage{longtable}
% \usepackage[right]{eurosym}
\usepackage{setspace}
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\makeatletter
\setlength{\@tempskipa}{-1.2cm}%
\@addtoplength{toaddrheight}{\@tempskipa}
\@setplength{sigbeforevskip}{2\baselineskip}
\makeatother
\setlength{\oddsidemargin}{\useplength{toaddrhpos}}
\addtolength{\oddsidemargin}{-1in}
\setlength{\textwidth}{\useplength{firstheadwidth}}
\begin{document}
\setkomavar{fromname}{$author$}
\renewcommand*{\raggedsignature}{\raggedright}
\setkomavar{fromaddress}{
$for(return-address)$
$return-address$$sep$\\
$endfor$
}
\setkomavar{fromphone}{$phone$}
\setkomavar{fromemail}{$email$}
\setkomavar{signature}{$author$}
\setkomavar{date}{$date$}
\setkomavar{place}{$place$}
\setkomavar{subject}{$subject$}
\setkomavar{firstfoot}{\centering \pagemark}
\begin{letter}{%
$for(address)$
$address$$sep$\\
$endfor$
}
\opening{$opening$}
\begin{onehalfspacing}
$body$
\end{onehalfspacing}
\closing{$closing$}
\ps $postskriptum$
$if(encludes)$
\setkomavar*{enclseparator}{Anlage}
\encl{$encludes$}
$endif$
\end{letter}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment