/ Published in: LaTeX
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
% LaTeX Custom Letter Template (German) % typeset using TeXShop & MacTeX package (http://www.tug.org/mactex/) % For alternatives please see: % - http://en.wikibooks.org/wiki/LaTeX/Letters % - http://lifeisallabout.wordpress.com/2009/02/10/letter-writing-in-latex/ % - http://snipplr.com/view/19910/latex-standard-letter-german/ \usepackage[top=1.6cm, bottom=3.2cm, left=2.54cm, right=3.2cm]{geometry} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{textcomp} \usepackage{ngerman} \usepackage[ngerman]{babel} \newcommand{\senderadresse}{ Herr\hspace{\stretch{1}}Wohnort, den \todayiso\\ Heinz Mustermann\\ Meine Strasse 10\\ 12345 Wohnort\\ \Telefon~01234-56789 \vspace{0.2cm} {\scriptsize\underline{Heinz Mustermann $\ast$ Meine Str. 10 $\ast$ 12345 Wohnort}} \vspace{-0.4cm} } \newcommand{\empfaengeradresse} { Firma XYZ\\ Abteilung C\\ Brieffach 1234 \vspace{-0.3cm} 12345 Stadt } % get custom date format \renewcommand{\dateseparator}{.} \newcommand{\todayiso}{\twodigit\day \dateseparator \twodigit\month \dateseparator \the\year} % disable all underfull hbox & vbox warnings \hbadness = 10000 \vbadness = 10000 % get phone symbols, etc. % cf. http://detexify.kirelabs.org/classify.html \usepackage{wasysym} \usepackage{amssymb} % http://www.theiling.de/eurosym.html.en#usage % The eurosym package must not precede the marvosym package. %\usepackage[official]{eurosym} \usepackage{pdfsync} \usepackage{microtype} \usepackage{csquotes} %\usepackage[Center]{ragged2e} % \RaggedRight, \FlushRight, \Centering %\lccode`\-=`\- %\defaulthyphenchar=127 % Die Einrueckung der ersten Zeile eines Absatzes wird auf 0pt gesetzt % Der Abstand zwischen Absaetzen wird erhoeht % Disable single lines at the start of a paragraph (Schusterjungen) \clubpenalty = 10000 % Disable single lines at the end of a paragraph (Hurenkinder) \widowpenalty = 10000 \displaywidowpenalty = 10000 % enable: \doublespacing, \onehalfspacing, \singlespacing % needed for conditional compilation to suppress pagination for single page documents \usepackage{ifthen} \usepackage{lastpage} % needed for creating a left margin paper-fold mark (for the correct address placement for windowed envelopes) \usepackage{blindtext} % http://tug.ctan.org/tex-archive/macros/latex/contrib/footmisc/footmisc.pdf % Cf. "Fussnoten: Abstand zwischen Ziffer und Text", % http://www.mrunix.de/forums/showthread.php?t=43620 (rais on page 2) \begin{list}{}{% \setlength{\partopsep}{0pt} \addtolength{\leftmargin}{\labelsep} \end{list}} % "how to number pages: Page # of n", % http://happymutant.com/latex/misce/misce2.php %\usepackage{fancyhdr,lastpage} %\pagestyle{fancy} %\fancyhf{} %\cfoot{\scriptsize{Seite \thepage\ von \pageref{LastPage}}} %\renewcommand\headrulewidth{0pt} % Removes funny header line % must be last command in preamble % hyperfootnotes: cf. http://www.mrunix.de/forums/showthread.php?t=42676 %\usepackage[pdftex,bookmarks,colorlinks,urlcolor=blue]{hyperref} \begin{document} % conditional compilation to suppress pagination for single page documents % Note: "When you use references, you have to compile your document twice to see the proper output", % cf. http://en.wikibooks.org/wiki/LaTeX/Labels_and_Cross-referencing % \ifthenelse {<test>}{<true>} {<false>} \ifthenelse{\pageref{LastPage} = 1}{\thispagestyle{empty}}{} %\ifthenelse{\pageref{LastPage} = 1}{\thispagestyle{empty}}{\cfoot{\scriptsize{Seite \thepage\ von \pageref{LastPage}}}} % 1. % create a left margin paper-fold mark at 10 cm (cf. http://mrunix.de/forums/showthread.php?t=65411) % 2. % write additional information into the right margin of the first page using a minipage inside a minipage \AddToShipoutPicture*{ \AtPageUpperLeft{ \parbox[t][4.5cm][b]{1cm}{ \hspace*{0mm} \rule{3mm}{0.25pt} } } \AtPageUpperLeft{ \parbox[t][8.5cm][b]{1cm}{ \hspace*{0mm} \rule{3mm}{0.25pt} } } \AtPageUpperLeft{ \parbox[t][10cm][b]{1.5cm}{ \hspace*{7mm} \rule{3mm}{0.25pt} } } \AtPageUpperLeft{ \noindent \begin{minipage}[t][1.9cm][b]{3cm} % cm values have to be adjusted manually \hspace*{18cm} % causes message: "Overfull \hbox (xxx pt too wide) has occurred while \output is active" % use the longest line of the minipage for \widthof{} %\begin{minipage}[t]{\widthof{Meine Bankverbindung}} % ... or just specify the minipage width explicitly \begin{minipage}[t]{3cm} \tiny{ \textbf{Meine \\Bankverbindung}:\\ Meine Bank AG\\ BLZ: 12345678\\ Konto: 1234567\\ \ldots } % tiny \end{minipage} \end{minipage} } } % AddToShipoutPicture \senderadresse \empfaengeradresse % subject line(s) %\begin{list}{\textbf{--}}{\leftmargin1em} \end{list} \vspace{1.3cm} % enable flexible inter-word spacing to avoid 'overfull hbox' due to over-long lines; % restore default spacing with \fussy %\sloppy Sehr geehrte Damen und Herren, \onehalfspacing % requires texcomp package \euro ~\verb+\euro+ \phone~\verb+\phone+ \Telefon~\verb+\Telefon+ \Mobilefone~\verb+\Mobilefone + \Faxmachine~\verb+\Faxmachine + \Email~\verb+\Email + \Ecommerce~\verb+\Ecommerce+ $@$~\verb+$@$+ \ldots~\verb+\ldots+ $\lbrace$ $\vert$ \lbrack \onehalfspacing %\newpage Mit freundlichen Gruessen \vspace{3.5cm} Heinz Mustermann \end{document}