I am trying to write a recommendation letter with a fancy heading at the top of the first page, using fancyhdr. I copy my code below.
The results are that the first page looks good but subsequent pages do not. Subsequent pages omit the logo (as desired) but leave enough space for it, and the text starts from the same place on every page. Starting from the second page, I would like the text to start higher.
It seems that the only code which could cause the text to appear lower is within the \fancypagestyle{firstpage}{...}, and I use \thispagestyle{firstpage} with the intent that this should only affect the first page -- but this is not what happens when I compile and view my document.
I read related posts here and here, and attempted to modify my code based on what I read there, but without achieving the results I was looking for.
Thank you very much.
LaTeX code (which compiles):
\documentclass[11pt]{article} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsmath} \usepackage{color,hyperref} \usepackage{graphics} \usepackage{times} \usepackage{fancyhdr} \usepackage{datetime} \definecolor{darkblue}{RGB}{0,0,50} \hypersetup{colorlinks,breaklinks, linkcolor=darkblue,urlcolor=darkblue, anchorcolor=darkblue,citecolor=darkblue} %%%%%%%%%%%%%%%%%%date in format Sunday, October 25, 2011$$$ \usdate \def\theday {\dayofweekname{\day}{\month}{\year}} \def\mydate {\theday , \today} %%%%%%%%%%return address%%%%%%%%%% \def\myname {Frank Thorne} \def\mydeptname {Department of Mathematics} \def\myaffiliation {University of South Carolina} \def\mystreet {1523 Greene Street} \def\mycitystatezip {Columbia,\ SC\ \ 29208} \def\myphone {{\it Phone:} (803)404-4057 (home)} \def\office {(803)777-4224} \def\fax {{\it Fax:}(803)777-3783} \def\email {[email protected]} \def\url {http://www.math.sc.edu/$\sim$thornef} % NOTE: use $\sim$ for tilde %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%margins%%%%%%%%%%%%%%%%%% \oddsidemargin 0in \evensidemargin 0in \topmargin -0.75in \textwidth 6.5in \textheight 6.25in \headwidth \textwidth \parindent 0ex %controls how the indentation of new paragraphs behaves \parskip 6pt %controls the space between paragraphs \headheight 1.25in \headsep 1in %This controls how far below the letterhead the text of the letter will begin \addtolength{\textheight}{.5in} %%%%%%%%%%%%%%%%letterhead%%%%%%%%%%%%%%%% \fancyfoot{} \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt} %\thispagestyle{fancy} \fancypagestyle{firstpage}{ \fancyhf{} %%%usc logo \fancyhead[L]{\resizebox{2.5in}{!}{ %\includegraphics{USC_Linear.jpg} } \vspace{0.6in}} %%%%%%%%%%return address on right%%%%%%% \fancyhead[R]{ \parbox[t]{3.1in}{ \footnotesize \em \vspace{0.5in} \myname \\ \mydeptname \\ \myaffiliation \\ \mystreet \\ \mycitystatezip \\ \email \\ \\ \mydate }\hspace{-1.3in} \vspace{0.2in}} } \begin{document} \thispagestyle{firstpage} Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. \hspace{.5\textwidth}\parbox[t]{2.95in}{ Sincerely,\\ Frank Thorne\\ Assistant Professor of Mathematics } \vfill \end{document}
\documentclass
and the appropriate packages that reproduces the problem. You can include\usepackage{lipsum}
and insert dummy text in the document via\lipsum[1-12]
for instance.\headheight
and\headsep
in\fancyhead
to begin with. Only one\headheight
can be used throughout the document unless one changes the page geometry, but this makes it very difficult to get paragraphs flowing from one page to the other.letter
comes to mind and the much more advanced and feature richscrlttr2
.minipage
orparbox
? Since you aren't using any real headers, aminipage
should do just fine`