I am trying to create a template for my short reports (3-5 pages). I would like to have a header and a footer on each page.
I have managed the most of it but I am running into an issue and would greatly appreciate a solution to this problem.
I reviewed the previous questions and there was answer to a question ( Text running into footer area when using amsart and fancyhdr)
but when I implement that suggestion, my header disappears.
Here is the code I am using and a screenshot to illustrate the issue.
Thank you,
Jay
\documentclass[11pt]{article}
\usepackage[top=1in, bottom=1in, left=0.5in, right=0.5in]{geometry}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{graphicx}
\usepackage{datetime}
\lhead{ \includegraphics[width=3cm, height=1cm]{logo-img-3}}
\rhead{\begin{Large} faucibus maximus\end{Large}\\ \begin{small}LQuisque ex dui, tincidunt eu metus ut \end{small}}
\fancyfoot[L]{Lorem ipsum dolor sit amet, consectetur }
\fancyfoot[R]{\today}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\setlength{\headheight}{33pt}
\graphicspath{ {images/} }
\vspace*{5ex}
\begin{document}
\begin{center}
\begin{Huge} Aliquam malesuada ex libero \end{Huge}\\
\end{center}
\vspace{0.5in}
\begin{center}
\begin{Huge} consectetur adipiscing \end{Huge}\\
\end{center}
\clearpage
\begin{tabular}{| c | c | c | c | c | c | r |}
\hline
col1 & col2 & col3 & col4 & col5 & col6 & col7 \\ [1ex]
\hline \hline
col1 & col2 & col3 & col4 & col5 & col6 & col7 \\ [1ex]
\hline
col1 & col2 & col3 & col4 & col5 & col6 & col7 \\ [1ex]
\hline
col1 & col2 & col3 & col4 & col5 & col6 & col7 \\ [1ex]
\hline
\end{tabular}
\end{document}
Best Answer
Do you want something like this?
If you use
geometry
, do not set page layout dimensions manually as it will throw off the calculations. In this casegeometry
doesn't know you've changed\headheight
so it doesn't take any account of it. The problem can be corrected by changing the dimension usinggeometry
's facilities.Code for above sample: