6

When I create a letter using the standard letter class, and try to create header using fancyhdr package, the header never displays even after using \thispagestyle{fancy}. I do not like to use KOMA-Script. Would someone like to help me out? Regards VB

1 Answer 1

20

The letter document class uses two different page styles for the first page depending on whether \address is used or not: firstpage if it is not used, and empty, otherwise. You can redefine the plain page style for pages other than the first, and then \let those other two styles to be plain; a little example:

\documentclass{letter}
\usepackage{fancyhdr}
\usepackage{lipsum}
\usepackage{marvosym}

\fancypagestyle{plain}{
\fancyhf{}
\fancyhead[C]{Joe Smith -- Senior Manager}
\fancyfoot[C]{\scshape
  100 Main Street. \\ 
  Chicago, IL 60610 \\
  \Email~{\normalfont\ttfamily www.tex.stackexchange.com} \\
  \Telefon~555-345678  \\
  \Mobilefone~3123127854
  }
}
\pagestyle{plain}

\makeatletter
\let\ps@empty\ps@plain
\let\ps@firstpage\ps@plain
\makeatother

\address{Joe Smith \\ 100 Main Street. \\ Chicago, IL 60610}

\begin{document}%

\begin{letter}{Department  \\ University of X\\ City, State Area Code}%

\opening{Dear Some Name,}

\lipsum


\vfill

Sincerely,

\vfill

Joe Smith

Ph.D. Candidate

Department 

University 
\end{letter}

\end{document}

enter image description here

A close-up to the header:

enter image description here

A close-up to the footer:

enter image description here

5
  • thanks for the reply. How can we make this header more attractive with name and designation as central header. And address as a footer in caps and using symbols for phone and email.
    – Vaibhav
    Commented Aug 27, 2013 at 4:27
  • @user34083 please see my updated answer. Commented Aug 27, 2013 at 4:56
  • Will adding logo as watermark make it look better? I changed it a little bit. \fancyhead[C]{{\LARGE Joe Smith}\\ Senior Manager}
    – Vaibhav
    Commented Aug 27, 2013 at 9:22
  • @user34083 about the logo, I wouldn't know; it is your letter format not mine :-) Commented Aug 27, 2013 at 12:55
  • @user34083 also, I see your edit was rejected by other users. Please only make essential edits to posts. You can make any minor changes in your actual document, but they were most probably considered not essential for my answer. Commented Aug 27, 2013 at 12:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .