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 use the \firstfoot command. 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{fontspec}
  5.  
  6. % ==============================================
  7. %  PERSONAL DATA
  8. % ==============================================
  9. \setkomavar{fromname}{Iulius Caesar}
  10. \setkomavar{fromaddress}{Van Eeghenlaan 69\\1691QT Amsterdam\\Nederland}
  11. \setkomavar{fromphone}{+31 (0)22 7394203}
  12. \setkomavar{fromemail}{iulius@gmail.com}
  13. \setkomavar{fromfax}{+31 (0)71 5144543}
  14. \setkomavar{fromurl}{http://stefano.italians.nl}
  15. \setkomavar{frombank}{Postbank 9307157}
  16. \setkomavar{place}{Amsterdam}
  17. \setkomavar{signature}{Iulius Caesar}
  18.  
  19. % ==============================================
  20. %  FORMATTING STUFF
  21. % ==============================================
  22.  
  23. % === font settings
  24. \defaultfontfeatures{Mapping=tex-text}
  25. \setmainfont {Adobe Garamond Pro}
  26. \setsansfont {Gill Sans Std}
  27.  
  28. %set the font size and leading
  29. \renewcommand{\normalsize}{\fontsize{12.5}{17}\selectfont}
  30.  
  31. % === header settings
  32. \firsthead{
  33.    \centering
  34.          {\addfontfeature{LetterSpace=20.0}\fontsize{36}{36}\selectfont\scshape \usekomavar{fromname}}\\[5mm]
  35.          \fontsize{21}{21}\selectfont\scshape Programmer and Architect at Initech
  36. }
  37.  
  38. % === footer settings
  39. \firstfoot{
  40.   \centering
  41.     \usekomavar{fromaddress} \\
  42.     \usekomavar{fromemail} \usekomavar{fromphone}
  43. }
  44.  
  45. \endinput

At line 39 I've declared my new footer. I wanted the material in the footer to be centered (line 40) 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 (also read from the corresponding variables). The result is the following:

footer one

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 it will be an ugly duplication. Instead, I will use \renewcommand{}{}. As first parameter it takes the command to be redefined and as second parameter you declare the new material to use instead. Well, let's proceed:

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

First of all, I enclose the first line in curly braces (line 41 and 44). In this way the effect of \renewcommand will remain local and will not affect the entire document. At line 42 I redefine the meaning of the \\ command, specifying it has to be replaced by a dot. That's all. Let's look at the result

footer two

So, only for the first line in the footer, 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. \usepackage{fontspec}
  5.  
  6. % ==============================================
  7. %  PERSONAL DATA
  8. % ==============================================
  9. \setkomavar{fromname}{Iulius Caesar}
  10. \setkomavar{fromaddress}{Van Eeghenlaan 69\\1691QT Amsterdam\\Nederland}
  11. \setkomavar{fromphone}{+31 (0)22 7394203}
  12. \setkomavar{fromemail}{iulius@gmail.com}
  13. \setkomavar{fromfax}{+31 (0)71 5144543}
  14. \setkomavar{fromurl}{http://stefano.italians.nl}
  15. \setkomavar{frombank}{Postbank 9307157}
  16. \setkomavar{place}{Amsterdam}
  17. \setkomavar{signature}{Iulius Caesar}
  18.  
  19. % ==============================================
  20. %  FORMATTING STUFF
  21. % ==============================================
  22.  
  23. % === font settings
  24. \defaultfontfeatures{Mapping=tex-text}
  25. \setmainfont {Adobe Garamond Pro}
  26. \setsansfont {Gill Sans Std}
  27.  
  28. %set the font size and leading
  29. \renewcommand{\normalsize}{\fontsize{12.5}{17}\selectfont}
  30.  
  31. % === header settings
  32. \firsthead{
  33.    \centering
  34.          {\addfontfeature{LetterSpace=20.0}\fontsize{36}{36}\selectfont\scshape \usekomavar{fromname}}\\[5mm]
  35.          \fontsize{21}{21}\selectfont\scshape Programmer and Architect at Initech
  36. }
  37.  
  38. % === footer settings
  39. \firstfoot{
  40.   \centering
  41.     {
  42.       \renewcommand{\\}{\ {\large\textperiodcentered}\ }
  43.       \usekomavar{fromaddress}
  44.     }\\
  45.     \usekomavar{fromemail} \usekomavar{fromphone}
  46. }
  47.  
  48. \endinput

Look carefully at line 42. 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 in curly braces (otherwise the trailing space would be enlarged too). The result will be the following

footer three

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{fontspec}
  5. \usepackage{marvosym}
  6.  
  7. % ==============================================
  8. %  PERSONAL DATA
  9. % ==============================================
  10. \setkomavar{fromname}{Iulius Caesar}
  11. \setkomavar{fromaddress}{Van Eeghenlaan 69\\1691QT Amsterdam\\Nederland}
  12. \setkomavar{fromphone}{+31 (0)22 7394203}
  13. \setkomavar{fromemail}{iulius@gmail.com}
  14. \setkomavar{fromfax}{+31 (0)71 5144543}
  15. \setkomavar{fromurl}{http://stefano.italians.nl}
  16. \setkomavar{frombank}{Postbank 9307157}
  17. \setkomavar{place}{Amsterdam}
  18. \setkomavar{signature}{Iulius Caesar}
  19.  
  20. % ==============================================
  21. %  FORMATTING STUFF
  22. % ==============================================
  23.  
  24. % === font settings
  25. \defaultfontfeatures{Mapping=tex-text}
  26. \setmainfont {Adobe Garamond Pro}
  27. \setsansfont {Gill Sans Std}
  28.  
  29. %set the font size and leading
  30. \renewcommand{\normalsize}{\fontsize{12.5}{17}\selectfont}
  31.  
  32. % === header settings
  33. \firsthead{
  34.    \centering
  35.          {\addfontfeature{LetterSpace=20.0}\fontsize{36}{36}\selectfont\scshape \usekomavar{fromname}}\\[5mm]
  36.          \fontsize{21}{21}\selectfont\scshape Programmer and Architect at Initech
  37. }
  38.  
  39. % === footer settings
  40. \firstfoot{
  41.   \centering
  42.     {
  43.       \renewcommand{\\}{\ {\large\textperiodcentered}\ }
  44.       \usekomavar{fromaddress}
  45.     }\\
  46.     {\Large\Letter} \usekomavar{fromemail} \ {\Large\Telefon} \usekomavar{fromphone}
  47. }
  48.  
  49. \endinput

At line 5 I included the marvosym package; the rest is happening at line 46. 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.

footer four

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{fontspec}
  5. \usepackage{marvosym}
  6.  
  7. % ==============================================
  8. %  PERSONAL DATA
  9. % ==============================================
  10. \setkomavar{fromname}{Iulius Caesar}
  11. \setkomavar{fromaddress}{Van Eeghenlaan 69\\1691QT Amsterdam\\Nederland}
  12. \setkomavar{fromphone}{+31 (0)22 7394203}
  13. \setkomavar{fromemail}{iulius@gmail.com}
  14. \setkomavar{fromfax}{+31 (0)71 5144543}
  15. \setkomavar{fromurl}{http://stefano.italians.nl}
  16. \setkomavar{frombank}{Postbank 9307157}
  17. \setkomavar{place}{Amsterdam}
  18. \setkomavar{signature}{Iulius Caesar}
  19.  
  20. % ==============================================
  21. %  FORMATTING STUFF
  22. % ==============================================
  23.  
  24. % === font settings
  25. \defaultfontfeatures{Mapping=tex-text}
  26. \setmainfont {Adobe Garamond Pro}
  27. \setsansfont {Gill Sans Std}
  28.  
  29. %set the font size and leading
  30. \renewcommand{\normalsize}{\fontsize{12.5}{17}\selectfont}
  31.  
  32. % === header settings
  33. \firsthead{
  34.    \centering
  35.          {\addfontfeature{LetterSpace=20.0}\fontsize{36}{36}\selectfont\scshape \usekomavar{fromname}}\\[5mm]
  36.          \fontsize{21}{21}\selectfont\scshape Programmer and Architect at Initech
  37. }
  38.  
  39. % === footer settings
  40. \firstfoot{
  41.   \centering
  42.   \addfontfeature{LetterSpace=20.0}\scshape
  43.   {
  44.       \renewcommand{\\}{\ {\large\textperiodcentered}\ }
  45.       \usekomavar{fromaddress}
  46.   }\\
  47.   {\Large\Letter} \usekomavar{fromemail} \ {\Large\Telefon} \usekomavar{fromphone}
  48.  
  49. \endinput

Basically I just added the line 42. The result?

footer six

Quite a long journey for a fucking footer, but we're done and I hope you will like the final result so far. Please mind that the above screenshot was made smaller in respect of the others. To see the footer in respect of the entire page, here it is the last picture

step five

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

3 Comments so far

  1. Sagun on September 12th, 2009

    It looks very cool, thanks.

  2. James Verbunk on March 4th, 2010

    In my copy, \firstfoot doesn’t do anything. \firsthead is fine, but no matter if I put a bunch of filler text in \firstfoot it doesn’t show up. Am I missing something? I also had to add a } at line 48 to close the \firstfoot.

    -J

  3. Andrés Villaveces on March 12th, 2010

    amazing - thanks!

Leave a reply