1

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}
1

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
0

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}

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.