0

Im trying to place a fancy header and footer on the first page, but can't seem to figure out how to place my footers on all pages as well. I tried to find the page break and inserted a \fancyhead{} command, and the headers all disappeared except the first page. However, I want to reduce the header spacing in the remaining pages where it is blank. Any suggestions? Please and thank you.

The code I'm using is below:

\usepackage{fancyhdr}

\pagestyle{fancy}

\newcommand{\Header}[3]{
\fancyhf{} % Clear header/footer
\renewcommand{\headrulewidth}{0pt} % Remove header rule
\fancyhead[C]{%
  \begin{tabular}{ @{} p{\textwidth} @{} }
    \textbf{\textsf{#1}}\hfill \textbf{\textsf{#2}} \\
    \hline
    \centering \textsf{\small{#3}}
  \end{tabular}}
\setlength{\headheight}{19pt}
\cfoot{\scriptsize \thepage}
\lfoot{\scriptsize \copyright 2019 Name}}

My document is the following:

\documentclass[11pt, a4paper, twoside]{article}
\usepackage[a4paper,top=2.5cm,bottom=2cm,left=2.54cm,right=2.54cm,marginparwidth=1.75cm]{geometry}
\usepackage[utf8]{inputenc}

\begin{document}
\Header{Class $-$ Study Guide}{21 February 2019}{Exam will be 10 short answer and 1 essay. We have to know theories, as well as the implications and problems with the theories.}

\thispagestyle{fancy}%%% Don't know about this%%%%

\section{Logical Positivists}

\lipsum

\clearpage
\fancyhead{}%%%%% only deleting header, not reducing spacing%%%%

\section{new stuff}

\lipsum

\end{document}
  • Usually, you don't misuse a header for the title. Just use a title, either by using \maketitle or by manually setting up a title (if it's for just this document). – Johannes_B Feb 23 at 7:04
  • Specifically, the header is supposed to go above the text area, and fanchhdr has the annoying habit of increasing \headheight and reducing \textheight mid document.. – John Kormylo Feb 23 at 15:52
  • How do I change the header width in different pages? – Dave2343 Feb 24 at 1:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.