Type something to search...
Cover Letter with Style - Part Four

Cover Letter with Style - Part Four

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
% PERSONAL DATA
9
% ==============================================
10
\setkomavar{fromname}{Ambroos Janssen}
11
\setkomavar{fromaddress}{Van Eeghenlaan 69\\1691qt Amsterdam\\Nederland}
12
\setkomavar{fromphone}{+31 (0)22 7394203}
13
\setkomavar{fromemail}{a.janssen@gmail.com}
14
\setkomavar{fromfax}{+31 (0)71 5144543}
15
\setkomavar{fromurl}{http://www.kindoblue.nl}
16
\setkomavar{frombank}{Postbank 9307157}
17
\setkomavar{place}{Amsterdam}
18
\setkomavar{signature}{Ambroos Janssen}
19
20
21
% ==============================================
22
% FORMATTING STUFF
23
% ==============================================
24
25
% === font settings
26
\defaultfontfeatures{Mapping=tex-text}
27
\linespread{1.1}
28
\setmainfont {Cormorant}[]
29
\setsansfont [Scale=MatchLowercase]{Fira Sans Book}
30
31
\newfontfamily\titlefont{Cormorant SC}[Scale=1.7]
32
\newcommand\mytitle{\titlefont\Huge\addfontfeature{LetterSpace=20.0}\usekomavar{fromname}}
33
\newcommand\subtitle{\titlefont\large{Software architect and Developer}}
34
35
\setkomavar{firsthead}{
36
\centering
37
\begin{tabular}{c}
38
\mytitle\\[5mm]
39
\subtitle
40
\end{tabular}
41
}
42
43
\setkomavar{firstfoot}{
44
\centering
45
\usekomavar{fromaddress}
46
}
47
48
\endinput

At line 43 I’ve declared my new footer. I wanted the footer’s material to be centered (line 44), and I’ve read the content of the variable fromaddress.

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 putting the line breaks, but I’m not too fond of unneeded duplications.

Redefining a latex command

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 the first parameter; as the second parameter, you declare the new material to use instead. Take a look at line 44 below

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
% PERSONAL DATA
9
% ==============================================
10
\setkomavar{fromname}{Ambroos Janssen}
11
\setkomavar{fromaddress}{Van Eeghenlaan 69\\1691qt Amsterdam\\Nederland}
12
\setkomavar{fromphone}{+31 (0)22 7394203}
13
\setkomavar{fromemail}{a.janssen@gmail.com}
14
\setkomavar{fromfax}{+31 (0)71 5144543}
15
\setkomavar{fromurl}{http://www.kindoblue.nl}
16
\setkomavar{frombank}{Postbank 9307157}
17
\setkomavar{place}{Amsterdam}
18
\setkomavar{signature}{Ambroos Janssen}
19
20
21
% ==============================================
22
% FORMATTING STUFF
23
% ==============================================
24
25
% === font settings
26
\defaultfontfeatures{Mapping=tex-text}
27
\linespread{1.1}
28
\setmainfont {Cormorant}[]
29
\setsansfont [Scale=MatchLowercase]{Fira Sans Book}
30
31
\newfontfamily\titlefont{Cormorant SC}[Scale=1.7]
32
\newcommand\mytitle{\titlefont\Huge\addfontfeature{LetterSpace=20.0}\usekomavar{fromname}}
33
\newcommand\subtitle{\titlefont\large{Software architect and Developer}}
34
35
\setkomavar{firsthead}{
36
\centering
37
\begin{tabular}{c}
38
\mytitle\\[5mm]
39
\subtitle
40
\end{tabular}
41
}
42
43
\setkomavar{firstfoot}{
44
\centering
45
{\renewcommand{\\}{\ {\large\textperiodcentered}\ }
46
\usekomavar{fromaddress}
47
}
48
}
49
50
\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 enclosed block (line 46 in this case).

For someone new to Latex sometimes it isn’t easy to unwrap the details, so I will try to clarify with the following picture: renew_command_explained

So the curly brackets depicted within the black boxes are there to specify a scope to limit the effects of the instruction contained within. The instruction itself is highlighted in blue. What it does, again, is to redefine the meaning on \\. In this case the \\ will be replaced by a big dot (\Large\textperiodcentered) with spaces before and after (highlighted in the red box). The spaces have to be literal, in the sense Latex has to be instructed to output a space no matter what. You can escape the space with \ to reach that goal.

Now the footer looks like this: Second footer changed

You see, dots replaced the line breaks in the address. We have our address on one line now.

We will now render all the footer in small caps and we will use some letterspacing. The change is on line 44, highlighted below:

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
% PERSONAL DATA
9
% ==============================================
10
\setkomavar{fromname}{Ambroos Janssen}
11
\setkomavar{fromaddress}{Van Eeghenlaan 69\\1691qt Amsterdam\\Nederland}
12
\setkomavar{fromphone}{+31 (0)22 7394203}
13
\setkomavar{fromemail}{a.janssen@gmail.com}
14
\setkomavar{fromfax}{+31 (0)71 5144543}
15
\setkomavar{fromurl}{http://www.kindoblue.nl}
16
\setkomavar{frombank}{Postbank 9307157}
17
\setkomavar{place}{Amsterdam}
18
\setkomavar{signature}{Ambroos Janssen}
19
20
21
% ==============================================
22
% FORMATTING STUFF
23
% ==============================================
24
25
% === font settings
26
\defaultfontfeatures{Mapping=tex-text}
27
\linespread{1.1}
28
\setmainfont {Cormorant}[]
29
\setsansfont [Scale=MatchLowercase]{Fira Sans Book}
30
31
\newfontfamily\titlefont{Cormorant SC}[Scale=1.7]
32
\newcommand\mytitle{\titlefont\Huge\addfontfeature{LetterSpace=20.0}\usekomavar{fromname}}
33
\newcommand\subtitle{\titlefont\large{Software architect and Developer}}
34
35
\setkomavar{firsthead}{
36
\centering
37
\begin{tabular}{c}
38
\mytitle\\[5mm]
39
\subtitle
40
\end{tabular}
41
}
42
43
\setkomavar{firstfoot}{
44
\addfontfeature{LetterSpace=20.0}\scshape\centering
45
{\renewcommand{\\}{\ {\large\textperiodcentered}\ }
46
\usekomavar{fromaddress}
47
}
48
}
49
50
\endinput

The rendered document will look like this: Second footer changed

Marvosym package

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 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{marvosym}
7
8
% ==============================================
9
% PERSONAL DATA
10
% ==============================================
11
\setkomavar{fromname}{Ambroos Janssen}
12
\setkomavar{fromaddress}{Van Eeghenlaan 69\\1691qt Amsterdam\\Nederland}
13
\setkomavar{fromphone}{+31 (0)22 7394203}
14
\setkomavar{fromemail}{a.janssen@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}{Ambroos Janssen}
20
21
22
% ==============================================
23
% FORMATTING STUFF
24
% ==============================================
25
26
% === font settings
27
\defaultfontfeatures{Mapping=tex-text}
28
\linespread{1.1}
29
\setmainfont {Cormorant}[]
30
\setsansfont [Scale=MatchLowercase]{Fira Sans Book}
31
32
\newfontfamily\titlefont{Cormorant SC}[Scale=1.7]
33
\newcommand\mytitle{\titlefont\Huge\addfontfeature{LetterSpace=20.0}\usekomavar{fromname}}
34
\newcommand\subtitle{\titlefont\large{Software architect and Developer}}
35
36
\setkomavar{firsthead}{
37
\centering
38
\begin{tabular}{c}
39
\mytitle\\[5mm]
40
\subtitle
41
\end{tabular}
42
}
43
44
\setkomavar{firstfoot}{
45
\addfontfeature{LetterSpace=20.0}\scshape\centering
46
{\renewcommand{\\}{\ {\Large\textperiodcentered}\ }
47
\usekomavar{fromaddress}
48
}\\
49
{\Large\Letter} \usekomavar{fromemail} \ {\Large\Telefon} \usekomavar{fromphone}
50
}
51
52
\endinput

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

And this is the final result: Second footer changed

I think it is already quite good, but in the next part we will use a logo as a watermark in the background.

Related Posts

Cover Letter with Style - Part One

Cover Letter with Style - Part One

This is the first part of a tutorial about the design and typesetting of great cover letters...

Read More
Cover Letter with Style - Part Two

Cover Letter with Style - Part Two

This is the second part of a tutorial about the design and typesetting of great cover letters. In particular I show how to set fonts...

Read More
Cover Letter with Style - Part Three

Cover Letter with Style - Part Three

Third part of the tutorial, where I introduce a custom header for the cover letter...

Read More
Cover Letter with Style - Part Five

Cover Letter with Style - Part Five

Final part of the tutorial. I introduce the logo in the background and other tricks...

Read More