Cover Letter with Style - Part Four

Nov 16, 2013

A tutorial illustrating a way to obtain stylish cover letters with XeLaTeX

This is the fourth part of the tutorial Cover letter with style. You can find the third part here.

After the header, I will take care of the footer. To change the default I will change the firstfoot variable. Basically it works like firsthead, so I have nothing special to add. I will update the template with:

 1 \ProvidesFile{standard.lco}[%
 2   2002/07/09 v0.9a LaTeX2e unsupported letter-class-option]
 3  
 4 \usepackage[english]{babel}
 5 \usepackage{fontspec}
 6 
 7  
 8 % ==============================================
 9 %  PERSONAL DATA
10 % ==============================================
11 \setkomavar{fromname}{Dhr. Iulius Caesar}
12 \setkomavar{fromaddress}{Van Eeghenlaan 69\\1691qt Amsterdam\\Nederland}
13 \setkomavar{fromphone}{+31 (0)22 7394203}
14 \setkomavar{fromemail}{iulius@gmail.com}
15 \setkomavar{fromfax}{+31 (0)71 5144543}
16 \setkomavar{fromurl}{http://www.kindoblue.nl}
17 \setkomavar{frombank}{Postbank 9307157}
18 \setkomavar{place}{Amsterdam}
19 \setkomavar{signature}{Iulius Caesar}
20  
21 % ==============================================
22 %  FORMATTING STUFF
23 % ==============================================
24  
25 % === font settings
26 \defaultfontfeatures{Mapping=tex-text}
27 \setmainfont {Adobe Garamond Pro}
28 \setsansfont {Gill Sans Std}
29 
30 %set the font size and leading
31 \renewcommand{\normalsize}{\fontsize{11}{16}\selectfont} 
32 
33 % === header settings
34 \newcommand\myname{%
35    {\addfontfeature{LetterSpace=15.0}\fontsize{36}{36}\selectfont\scshape \usekomavar{fromname}}
36 }
37 
38 \newcommand\mytitle{%
39    \fontsize{21}{21}\selectfont\scshape Programmer and Architect at Initech
40 }
41 
42 \setkomavar{firsthead}{
43    \centering
44          \myname\\[5mm]
45          \mytitle
46 }
47 
48 % === footer settings
49 \setkomavar{firstfoot}{
50   \centering
51     \usekomavar{fromaddress} \\
52     \usekomavar{fromemail} \usekomavar{fromphone}
53 }
54 
55 \endinput

At line 49 I’ve declared my new footer. I wanted the material in the footer to be centered (line 50) and I’ve read the content of the variable fromaddress and used it as the first line, then the break line (\\) and then the email and phone number, also read from the corresponding variables. The result is the following:

First footer changed

There’s a problem with the way I declared the fromaddress: to have KOMA-Script rendering my address on three lines, I used the break line command (\\) but now I would like a one-liner address in the footer. I could declare yet another variable, this time avoiding to put the line breaks, but I don’t like unneeded duplications. Instead, I will use \renewcommand, to change the meaning of \\ within the context of the footer’s first line. \renewcommand takes the command to be redefined as first parameter; as second parameter you declare the new material to use instead. Take a look at line 11 below

 1 \ProvidesFile{standard.lco}[%
 2   2002/07/09 v0.9a LaTeX2e unsupported letter-class-option]
 3  
 4 .
 5 .
 6 .
 7 
 8 % === footer settings
 9 \setkomavar{firstfoot}{
10    \centering
11     {\renewcommand{\\}{\textperiodcentered}
12     \usekomavar{fromaddress}}\\
13     \usekomavar{fromemail} \usekomavar{fromphone}
14 }
15 
16 .
17 .
18 .
19 
20 \endinput

I redefined the meaning of the \\, specifying it has to be replaced by a dot and not with a line break. Mind the use of the enclosing curly brackets to limit the redefinition of \\ to the address line. That’s all. Let’s look at the result

Second footer changed

So, the line breaks in my address were replaced by a dot. Now just enlarge the dots and add some space before and after them:

 1 \ProvidesFile{standard.lco}[%
 2   2002/07/09 v0.9a LaTeX2e unsupported letter-class-option]
 3  
 4 .
 5 .
 6 .
 7 
 8 % === footer settings
 9 \setkomavar{firstfoot}{
10    \centering
11     {\renewcommand{\\}{\ {\large\textperiodcentered}\ }
12     \usekomavar{fromaddress}}\\
13     \usekomavar{fromemail} \usekomavar{fromphone}
14 }
15 
16 .
17 .
18 .
19 
20 \endinput

Look carefully at line 11. First of all, I used the escaped space (a backslash followed by a white space) to instruct TeX to put literally two spaces around the dot. Without escaping the spaces, TeX will happily swallow them. Secondly, I applied the \large modifier to the dot character and I enclosed both in curly braces (otherwise the rest of the address would be enlarged too). The result will be the following:

Second footer changed

Nice, we have our address on one line now. It’s time to take care of the second line. For the email and the phone contacts, I will use a couple of symbols from the marvosym package. The template so becomes:

 1 \ProvidesFile{standard.lco}[%
 2   2002/07/09 v0.9a LaTeX2e unsupported letter-class-option]
 3 
 4 \usepackage[english]{babel}
 5 \usepackage{fontspec}
 6 \usepackage{fix-cm} 
 7 \usepackage{marvosym}
 8  
 9 .
10 .
11 .
12 
13 % === footer settings
14 \setkomavar{firstfoot}{
15    \centering
16     {\renewcommand{\\}{\ {\large\textperiodcentered}\ }
17     \usekomavar{fromaddress}}\\
18     {\Large\Letter} \usekomavar{fromemail} \ {\Large\Telefon} \usekomavar{fromphone}
19 }
20 
21 .
22 .
23 .
24 
25 \endinput

At line 7 I included the marvosym package; the rest is happening at line 18. Nothing special: I used the enlarged version of the symbols \Letter and \Telefon. I also used an escaped space to keep the email address separated from the telephone number.

Second footer changed

Now, the final touch: I will letterspace the entire footer and use the small caps. So, here it is:

 1 \ProvidesFile{standard.lco}[%
 2   2002/07/09 v0.9a LaTeX2e unsupported letter-class-option]
 3 
 4 \usepackage[english]{babel}
 5 \usepackage{fontspec}
 6 \usepackage{fix-cm} 
 7 \usepackage{marvosym}
 8  
 9 .
10 .
11 .
12 
13 % === footer settings
14 \setkomavar{firstfoot}{
15    \centering
16    \addfontfeature{LetterSpace=20.0}\scshape
17     {\renewcommand{\\}{\ {\large\textperiodcentered}\ }
18     \usekomavar{fromaddress}}\\
19     {\Large\Letter} \usekomavar{fromemail} \ {\Large\Telefon} \usekomavar{fromphone}
20 }
21 
22 .
23 .
24 .
25 
26 \endinput

Basically I just added the line 16. The final result?

Second footer changed

I think it is already quite a good letter, but in the next part we will watermark our logo.