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.

Can anyone please help me understand why the bottom margin on the first page spills over if I only use the geometry definitions inside the square brackets of \usepackage[]{geometry}; however, placing the same geometry definitions inside the wavy brackets of \newgeometry{} works just fine? I feel like what I have done is a hack, instead of the way it is supposed to be.

\documentclass[12pt]{article}
\usepackage[head=122.5pt, headsep=-40pt, top=1.6in, bottom=.7in, left=1in, right=1in]{geometry}
%    \newgeometry{head=122.5pt, headsep=-40pt, top=1.6in, bottom=.7in, left=1in, right=1in}
\usepackage{fancyhdr} % This is a special package for headers / footers.
\usepackage{lastpage}

\usepackage{lipsum}


% HEADERS
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}

% first page header
\fancypagestyle{plain}{
            \fancyhead{} % print nothing on top-left and top-right of the first page.
            \fancyhead[C]{ Company \\ Street Address \\ City, State ~ Zip \\~\\ Tel. / Fax.: ~ (xxx) xxx-xxxx \\ noone@nowhere.com \\~\\ \today }
            \fancyfoot{} % print nothing on bottom-left and bottom-right of the first page.
            \fancyfoot[C]{} % first page center footer
                      }

% second page header
\pagestyle{fancy}
    \fancyhead{} % center of second page
    \fancyhead[L] {Name of Recipient \\ \today \\ Page {\thepage\ of {\pageref{LastPage}}} \vspace*{.9in} }
    \fancyhead[R]{} % right header \quad \thepage
    \fancyfoot[C]{} % second page center footer

\thispagestyle{plain}
\vspace*{0.6in}

\begin{document}


\lipsum[1-15]

\end{document}
share|improve this question
    
Welcome to TeX.sx! It would be easier to help you if you could reduce your code to a minimal working example (MWE). –  Corentin Mar 6 '13 at 15:43
    
Thanks for the suggestion -- I'm pulling out the fonts and some extra stuff that gets in the way, and I'll post an edit. –  lawlist Mar 6 '13 at 15:48
1  
Okay, the code is now about as minimal as it gets with this particular issue. If we activate the \newgeometry line of code, then the fist page bottom margin work just fine -- but I don't understand why this is necessary when it was defined initially at the package call. –  lawlist Mar 6 '13 at 16:01
    
The geometry package documentation eludes to this by means of example 10 (8 Examples, p 17). It also mentions that "\newgeometry is almost similar to \geometry except that \newgeometry disables all the options specified by \usepackage and \geometry in the preamble and skips papersize-related options." –  Werner Mar 6 '13 at 17:12
    
It seems to me that under certain circumstances the \usepackage[]{geometry} definition fails to properly control the bottom margin on the first page. When this initial definition fails (e.g., due to an inability to play nice with fancyhdr), it is possible to use the \newgeometry command as a workaround. –  lawlist Mar 7 '13 at 2:05

1 Answer 1

up vote 2 down vote accepted

If you look at the internals of geometry, you'll find that \newgeometry includes a call to \Gm@changelayout, which is intended to apply a 'replacement' geometry, while setting the various keys directly as options does not do this. Indeed, neither does the \geometry command, which is more-or-less identical to setting the keys via the package option route. What's not clear, at least to me, is whether the outcome you see is intentional or not. Certainly the difference in internals is, but I think reporting this to the package author would be a good idea: at least some more detailed documentation on this would be helpful.

share|improve this answer
    
Thank you for the answer, and for the suggestion to contact the package author regarding same -- greatly appreciated! –  lawlist Aug 10 '13 at 21:30

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.