[Tex/LaTex] No page number displayed after applying header and footer

chaptersheader-footerpage-numbering

After applying a new header and footer, no page number is displayed in my document; only the updated header and footer. And there is another problem: there is no header or footer displayed on chapter pages but here I can see the page number.

I need both header and footer and page number on all the pages.

This is what I use at the moment:

\documentclass[a4paper,12pt,roman]{report}
%\userpakage{time}
\usepackage{thesis}
\usepackage{epsfig}
\usepackage{graphics}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{fancyhdr}
\usepackage[left=1.57in, right=0.98in,top=0.98in,bottom=1.57in]{geometry}
\usepackage{amsmath}
\pagestyle{fancy}
\fancyhf{}
\chead{\textbf Header }
\cfoot{\textbf Footer }

http://latex-community.org/forum/download/file.php?id=5937

http://latex-community.org/forum/download/file.php?id=5938

Best Answer

Under the default document classes (including report), the page style plain is used for chapter title pages. Even though you're using fancyhdr to display your headers, the behaviour of the document class is still to typeset the main chapter page in plain. If you really wish to have the plain page style be the same as your fancy, then you can do:

\usepackage{fancyhdr}% http://ctan.org/pkg/fancyhdr
\fancyhf{}% Clear header/footer
\chead{\textbf{Header}}% Centre header
\cfoot{\textbf{Footer}\ \thepage}% Centre footer
\pagestyle{fancy}
\makeatletter
\let\ps@plain\ps@fancy% plain page style = fancy
\makeatother

Note that I've added \thepage to \cfoot to add the page number to the fancy page style footer. Also, \textbf is a macro that takes an argument, so I've modified it as such.