Page LayoutText jumps on 1st page to compared to 2nd page and after

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
kjh4p
Posts: 3
Joined: Thu Jun 24, 2010 6:55 am

Text jumps on 1st page to compared to 2nd page and after

Post by kjh4p »

I've been struggling with getting the margins correct. In the first page of the document the text plus footer is shifted up. I've looked on other topics (`header footer margins' and `why is my footer moving?') and I still can't grasp what is causing this. I'm using the geometry package with margin=1in (also showframe for reference). I've tried adding

Code: Select all

\setlength{\headheight}{15pt}
as was suggested in 'why..footer moving.' Still nothing. I'm using pdftexify from winedt6. Also I'm using fancyhdr package to make the header and footer. I have tried systematically getting rid of each package (and everything else too) and I've narrowed it down to the line

Code: Select all

\rhead{Header top line\\Header bottom line}
, but I'm not sure why it would act up this way. Below is the code I am using. Any direction or explanation that someone could give would be greatly appreciated.
Thanks in advance!

Code: Select all

\documentclass[pdftex,11pt,letterpaper]{article}
\usepackage[pdftex]{graphicx}
\DeclareGraphicsExtensions{.pdf,.png,.jpg,.mps}
 
%%For use in footer 
\usepackage{datetime}
\mmddyyyydate
\usepackage{lastpage}

%%Margins
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[showframe, margin=1in, includehead=false, includefoot=false]{geometry}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%Header/Footer items
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{fancyhdr}                                                         %
\pagestyle{fancy}                                                             %
%                                                                             %
\renewcommand{\headrulewidth}{0.4pt} %%Header line at top of page             %
\renewcommand{\footrulewidth}{0.4pt} %%Footer line at bottom of page          %
%                                                                             %
\lhead{{\LARGE ACME Rocket Skates}}                                           %
\rhead{Header top line\\Header bottom line}                                   %
\lfoot{\today}                                                                %
\cfoot{Self destruct button}                                                  %
\rfoot{\thepage\ of \pageref{LastPage}}                                       %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
page1
\pagebreak

page2
\pagebreak

page3
\pagebreak
\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

kjh4p
Posts: 3
Joined: Thu Jun 24, 2010 6:55 am

Re: Text jumps on 1st page to compared to 2nd page and after

Post by kjh4p »

Another question I can't figure out is why the top margin is not 1 in?
kjh4p
Posts: 3
Joined: Thu Jun 24, 2010 6:55 am

Text jumps on 1st page to compared to 2nd page and after

Post by kjh4p »

All right, Bob Knighten on Linkedin helped me with this one, but I thought I would post the solution here seeing as how I already started the tread. So the problem does lies in the size of \headheight as described earlier, but 15pt was still too small. I added

Code: Select all

\usepackage[showframe, headheight=26pt, margin=1in, includehead=false, includefoot=false]{geometry}
and it works like a charm.
Hope others find this useful too.
Post Reply