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

2 Answers 2

2

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}
2
  • Doesn't this make a header that is the same on all pages? I think maybe what the OP meant was different text in the header for page 1 than the rest of the document?
    – kandyman
    Commented Nov 29, 2021 at 0:28
  • The header text already was the same on all pages. The OP only misses the header and footer line on the first page. Now the header and footer are the same on all pages (= desired result).
    – esdd
    Commented Nov 30, 2021 at 10:00
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}
3

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .