# Cam's Blog

## October 31, 2010

### Custom headers in latex letters

Filed under: Latex — cfranc @ 1:00 pm

Hi and Happy Halloween! I hope you’re having fun because I’m stuck working on job applications for postdoctoral positions. Thankfully they’re essentially finished. Yesterday I put the finishing touches on my cover letters and discovered how to add custom headers to the default latex letter class. Here’s how I did it; I warn you, though, that my solution is a little ad-hoc…

The solution begins by using the fancyhdr package. Add the line:

\usepackage{fancyhdr}

somewhere in the preamble under your document class declaration. The following line in your preamble will add a header graphic to the top left corner of your letter:

The file image_name_without_extension should be in the same directory as your .tex files (otherwise add the correct path). Muck around with the scaling to make the thing look nice; 0.75 indicates that it is 0.75 times as large as the original. This will add a line beneath the header by default. If you’d like to remove it, then add the line

to your preamble. Now the footer by default should contain a page number. If you want to get rid of that, then add the line

\fancyfoot[C]{}

to your preamble. If your footer also has an underline above it, you can get rid of that by adding

\renewcommand{\footrulewidth}{0pt}

\signature{\includegraphics[scale=0.4]{signature} \\Cameron Franc \\ \texttt{my email address} \\ \texttt{http://www.math.mcgill.ca/cfranc}}

Then when I called the signature, I had to erase the extra space so that the spacing would fit my graphic signature.png exactly. Here is the signature call that I used in my body:

\closing{Sincerely,}

And that’s it. Happy texing!