I am using plain pagestyle. Last page of every chapter doesn't have page number. This is my master page:


\usepackage[sort, compress]{cite}

\usepackage[pdftex, bookmarks=false]{hyperref}


\input {title}



\input {chap_a}
\input {chap_b}


%%% Local Variables: 
%%% mode: latex
%%% TeX-master: t
%%% End: 

Files: chap_a, chap_b contains text. Chapter chap_a and chap_b are two A4 pages long. Second page of chap_a doesn't have page number. chap_a.tex and chap_b.tex files are identical:

\chapter {WSS}
aa bb ...
aa bb

bb aa ...
bb aa

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: "main"
%%% End: 

How can I put page number on these pages?

Hint: When I change pagestyle: pagestyle{headings} instead of pagestyle{plain} I have page numbers on every page in header except first page in every chapter, which doesn't have page number in footer (I read that it should have).

  • 2
    Welcome to TeX.SX! What's inside of chap_a.tex etc? \pagenumbering{arabic} sets the page number to 1 usually, it's not necessary to use \setcounter{page}{1} explicitly
    – user31729
    Jan 26, 2015 at 17:29
  • 2
    The class redefines \cleardoublepage so that if it needs to make an empty page to get the next chapter open on the right it uses the blank page style rather than the default one. that seems to be a major aim of the class but \makeatletter\let\ps@blank\ps@plain\makeatother probably changes it. Jan 26, 2015 at 17:30
  • hyperref should be the last package to be loaded, in most cases
    – user31729
    Jan 26, 2015 at 17:30
  • @David Carlisle - I put this line before \begin{document} and it doesn't work. Still no page number.
    – Linkas
    Jan 26, 2015 at 17:46
  • Add this to the preamble: \usepackage{etoolbox} \pretocmd{\chapter}{\thispagestyle{plain}}{}{} Jan 26, 2015 at 18:14

1 Answer 1


Add the following lines


just before


and the problem is solved.

You must log in to answer this question.

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