Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

share|improve this question
1  
Welcome to TeX.sx! Please add a complete minimal working example (MWE) that illustrates your problem. –  Kurt Oct 21 '12 at 13:50
    
Note that the epsfig package is severely outdated. Using graphicx would suffice, since it also loads graphics. –  Werner Oct 21 '12 at 14:56
add comment

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

share|improve this answer
    
Also doing \fancypagestyle{plain}{...} would solve the issue. –  egreg Oct 21 '12 at 14:49
    
@egreg: Yes, and require a duplication of the fancy page style. –  Werner Oct 21 '12 at 14:55
    
@Werner thanks but this is not working each chapter footer start form number 1 to so on.. –  chamara54 Oct 21 '12 at 15:10
    
@chamara54: It might be that \usepackage{thesis} is causing this or setting something to that effect for \chapter. Do you have a reference to thesis.sty that one can look at? –  Werner Oct 21 '12 at 15:12
    
\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 } \linespread{1.3} \begin{document} \include{Cover} \include{title} \pagenumbering{roman} \include{declration} \include{abstract} \pagenumbering{arabic} \include{chap1} \include{chap2} \end{document} –  chamara54 Oct 21 '12 at 15:21
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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