# How to make a line in header and footer in the first page?

I am writing a proposal, and trying to decorate my header and footer by a line. The problem that I face with is the line under footer and header only appear on from the second page to the end, while there is no line in the first page. Here is the code that I used:

\documentclass{arp}

\usepackage{setspace}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{flushend}
\usepackage{subfigure}
\usepackage{parskip}
\parskip=3pt

\usepackage{fancyhdr}
\pagestyle{fancyplain}
\fancyhf{}
\rhead{\bf{XXXXXXXX}}
\lhead{\bf{YYYYYYYYYYYY}}
\lfoot{\bf{ZZZZZZZZZ}}
\rfoot{\bf{\thepage}}

\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0.5pt}


## 2 Answers

I do not have the arp.cls. Assuming your first page uses page style plain you have to redefine \plainheadrulewidth and plainfootrulewidth, too.

\renewcommand{\plainheadrulewidth}{0.5pt}
\renewcommand{\plainfootrulewidth}{0.5pt}


If the width of the rules should be the same on both plain and fancy pages, you can use

\renewcommand{\plainheadrulewidth}{0.5pt}
\renewcommand{\plainfootrulewidth}{0.5pt}
\renewcommand{\headrulewidth}{\plainheadrulewidth}
\renewcommand{\footrulewidth}{\plainfootrulewidth}


Example using the report class:

\documentclass{report}
\usepackage{blindtext}% only for dummy text
\usepackage{fancyhdr}
\pagestyle{fancyplain}
\fancyhf{}
\rhead{\textbf{XXXXXXXX}}
\lhead{\textbf{YYYYYYYYYYYY}}
\lfoot{\textbf{ZZZZZZZZZ}}
\rfoot{\textbf{\thepage}}

\renewcommand{\plainheadrulewidth}{0.5pt}
\renewcommand{\plainfootrulewidth}{0.5pt}
\renewcommand{\headrulewidth}{\plainheadrulewidth}
\renewcommand{\footrulewidth}{\plainfootrulewidth}

\begin{document}
\blinddocument
\end{document}

• Thanks It does work. – Bill Fu Mar 27 at 9:56

I am not familiar with this arp document class, but using article instead, you could modify the plain style and it would work as expected.

\documentclass{article}

\usepackage{setspace}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{flushend}
\usepackage{subfigure}
\usepackage{parskip}
\parskip=3pt

\usepackage{fancyhdr}
\fancypagestyle{plain}{
\fancyhf{}

\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0.5pt}
\rhead{\bf{XXXXXXXX}}
\lhead{\bf{YYYYYYYYYYYY}}
\lfoot{\bf{ZZZZZZZZZ}}
\rfoot{\bf{\thepage}}
}

\author{Me}
\title{A Nice Title}

\pagestyle{plain}
\begin{document}
\maketitle

\clearpage

Test
\end{document}

• I just modified the original example, but useful links. Thanks :-) – Guilherme Silva Mar 26 at 5:23
• You should consider going the extra step and address any other shortcomings rather than just the requested help. That should be easy to do in this case. – Werner Mar 26 at 15:09