This is the fourth part of the tutorial Cover letter with style. You can find the third part here.
The footer
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:
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:
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
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:
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:
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:
The rendered document will look like this:
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:
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:
I think it is already quite good, but in the next part we will use a logo as a watermark in the background.