Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

See the previous question. This is how my letter looks like

\documentclass[a4paper, 11pt]{article}

\usepackage{fontspec}
\usepackage{fancyhdr}


\newcommand{\DocumentTitle}{Motivation Letter}
\newcommand{\Author}{John Smith}

\setmainfont{Times New Roman}
\newfontfamily\hdrfont[ LetterSpace=5.0, WordSpace=1.0, Scale=0.9, Color=FFFFFF ]{Arial}

\usepackage[hmargin=1in,vmargin=0.4in, includehead, includefoot]{geometry}
\setlength{\parindent}{0in}
\linespread{1.2}
\parskip 11pt

\pagestyle{fancy}
\fancyhf{} % clear all header and footers
\setlength{\headheight}{0.0in}
\fancyhead[L]{\hdrfont\textbf{\DocumentTitle} \\ \emph{\Author}}
\fancyhead[R]{\hdrfont\thepage}
\fancyfoot[L]{\hdrfont\textbf{\DocumentTitle} \\ \emph{\Author}}
\fancyfoot[R]{\hdrfont\thepage}

\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}

\renewcommand{\today}{ February 16, 2009 }
\begin{document}

{ \vspace*{0.5in} }
\hspace{4.8in}\today
\vspace{0.2in}

\hspace{0.5in}To Whom It May Concern,
\vspace{0.2in}

My Letter

\vspace{0.2in}
\hspace{0.5in}Respectfully,

\vspace{0.1in}
\hspace{0.5in}\Author

\end{document}

What like the pdf looks like

--------------------------------------- PAGE BEGIN
                                        H
--------------------------------------- HEADER RULE
                                        M1
To Whom It May Concern,---------------- TEXT BEGIN
My Letter
Respectfully,-------------------------- closing
                                        S
John Smith----------------------------- signature
--------------------------------------- TEXT END
                                        M2
--------------------------------------- FOOTER RULE
                                        F
--------------------------------------- PAGE END

On the first page it looks ok and H=F. Starting from the second page F is surprisingly small. Do you have any ideas?

This is the resulting PDF (with some text):

enter image description here

share|improve this question
    
You can include a scrreenshot for the result. –  percusse Nov 16 '12 at 16:37
    
Updated. I added the pdf. –  user14416 Nov 16 '12 at 16:50
2  
You are receiving the warning Package Fancyhdr Warning: \headheight is too small (12.0pt): Make it at least 24.73766pt. We now make it that large for the rest of the document. This may cause the page layout to be inconsistent, however. Set \headheight to 25pt. –  egreg Nov 16 '12 at 17:09
    
This is problem when I define \headheight then H != F. –  user14416 Nov 16 '12 at 17:20

1 Answer 1

up vote 2 down vote accepted

If you set the head height to a value that fancyhdr thinks wrong (and it is wrong, by the way), it seizes the initiative and corrects it from the second page on, thus destroying your setting.

Actually with your setting, H and F are different: you get 0.4 in from the upper page margin to the top of "Motivation Letter" and from the page lower margin to the baseline of "Motivation Letter", not of "John Smith" at the bottom.

If you want a more precise spacing, just do

\usepackage[hmargin=1in,top=0.4in, bottom=\dimexpr0.4in+1.2\baselineskip\relax,
  includehead, includefoot,headheight=25pt]{geometry}

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.