Sign up ×
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

1 Answer 1

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

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.
http://tex.stackexchange.com/questions/78540/no-page-number-displayed-after-applying-header-and-footer
tex.stackexchange.com
crawl=CC-MAIN-2015-40
77779
application/http; msgtype=response
sha1:E5SA7UA2YQZ2JU7HIBWVELALZ6Z437F7
<urn:uuid:6ca8d084-ee5b-48e2-97a1-357d5416fd25>
2015-10-05T13:13:23Z
104.16.16.128
sha1:WFLVSIBU5TWLAUC3SWYEOK7UIE2Q2SW3
<urn:uuid:123d4d90-b629-412f-a110-76b4f15dc118>
http://tex.stackexchange.com/questions/78540/no-page-number-displayed-after-applying-header-and-footer
length
response
<urn:uuid:2983a5ee-712e-425d-9680-b7c716444b3d>
robots: classic
hostname: ip-10-137-6-227.ec2.internal
software: Nutch 1.6 (CC)/CC WarcExport 1.0
isPartOf: CC-MAIN-2015-40
operator: CommonCrawl Admin
description: Wide crawl of the web for September 2015
publisher: CommonCrawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf