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 \\ [email protected] \\~\\ \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}
\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.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."\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.