# Fancyhdr with report: Format page numbering on chapter's first page

In my .tex document I use the following fancyhdr settings:

\usepackage{fancyhdr}
\usepackage{lastpage}

\pagestyle{fancy}
\fancyhf{}
\fancyhead[L]{Another Text}
\fancyhead[R]{Some Text}
\rfoot{Page \thepage \hspace{1pt} of \pageref{LastPage}}


Than means that over footer the page numbering will get displayed as:

But on pages such as contents page and chapter page the page numbering is displayed as:

So how I can set a uniform way to display the page numbering?

• Please don't post such fragments only. We have this question basically every other day and it is not related to xetex at all. The chapter start page uses plain style internally and not fancy. Possible solution \fancypagestyle{plain}{}, will make the plain style 'empty', such that fancy is still active – user31729 Apr 6 '18 at 15:11

## 1 Answer

In order to solve this problem you should also put the following:

\fancypagestyle{plain}{
\fancyhf{}
\rfoot{Page \thepage \hspace{1pt} of \pageref{LastPage}}
}


Resulting the following fancy settings:

\pagestyle{fancy}
\fancyhf{}
\fancyhead[L]{Univercity Of Peireus}
\fancyhead[R]{Desyllas Dimitrios - Ioannis Anagnwstou}
\rfoot{Page \thepage \hspace{1pt} of \pageref{LastPage}}

\fancypagestyle{plain}{
\fancyhf{}
\rfoot{Page \thepage \hspace{1pt} of \pageref{LastPage}}
}