Source

cover-letter / cover-letter-example.tex

\documentclass[12pt]{scrartcl}

%%----------------------------------------------------
% Geometry - Layout
%%----------------------------------------------------

% Generally, it is considered a good practise to have no have more than 70 and
% no less than 60 characters per line.  Text is more readable this way.
%
% Since the number of characters per line depends both on the "length of the
% lowercase alphabet" and the "\textwidth", you have to adjust the layout of the
% page according to the font you use.
%
% For measuring the font width you can see here:
% http://tex.stackexchange.com/questions/17399/measure-the-length-of-the-lowercase-alphabet
%
% Once you know the "length of the lowercase alphabet", you can use the
% following formula to determine the "correct" "\textwidth".
%
% textwidth = 2.042 * alphabet_length + 33.41
%
% For 12pt sized "Linux Libertine O" and "Minion Pro" textwidth of 335pt is the
% "correct" value, but if you use this value with A4 papers then the margins are
% very big. If you intend mail the cover letter by post you could consider using
% b5paper which matches quite nicely.

\usepackage[
    a4paper,
    xetex,
    width=435pt,
    top=3cm,
    bottom=3cm,
]{geometry}
\usepackage{parskip}

%%----------------------------------------------------
% fonts
%%----------------------------------------------------
\usepackage{fontspec}
\setmainfont[Kerning=On, Mapping=tex-text, ]{Linux Libertine O}
\setmonofont[Mapping=tex-text]{Consolas} % monospace fonts

% No page numbers
\pagestyle{empty}

%%----------------------------------------------------
% Hyperlinks
%%----------------------------------------------------
\usepackage[]{hyperref}
\usepackage{url}

%%----------------------------------------------------
% Dummy text
%%----------------------------------------------------
\usepackage{lipsum}

%%----------------------------------------------------
% Cover letter
%%----------------------------------------------------
\usepackage[
    /sender/Firstname=Charis,
    /sender/Lastname=Papadopoulos,
    /sender/Title={Civil Engineer, M.Sc.},
    /sender/AddressA={Syntagma Sqr. 1},
    %/sender/AddressB={AddressB},
    /sender/AddressC={99999 Athens, Greece},
    /sender/Email={email@example.com},
    /sender/Mobile={+30 6969.666.999},
    /sender/Phone={+30 210.123.4567},
    %/sender/Homepage={www.google.com},    % currently not active
    %
    /recipient/Firstname=John,
    /recipient/Lastname=Doe,
    /recipient/AddressA={You may use up to 3 lines},
    /recipient/AddressB={for the Addresses.},
    /recipient/AddressC={Don't forget the braces!},
    %
    /enclosures/name=Attachments,
    /enclosures/itemA={Curriculum Vit\ae},
    /enclosures/itemB={You may typeset up to 5 items},
    /enclosures/itemC={Item 3},
    /enclosures/itemD={Item 4},
    %/enclosures/itemE={Item 5},
]{cover-letter}


\begin{document}

\typesetSender

\typesetRecipient

\typesetDate

% This is where your letter starts!
Dear Sir or Madam

\lipsum[1-2]

Yours sincerely,

% And this is where it ends...
\typesetSignature

\typesetEnclosures

\end{document}