I am using plain pagestyle. Last page of every chapter doesn't have page number. This is my master page:
\documentclass[a4paper,onecolumn,oneside,11pt,wide,floatssmall]{mwrep}
\usepackage{bookman}
\usepackage{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{listings}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{float}
\pagestyle{plain}
\usepackage[sort, compress]{cite}
\usepackage{pgfplots}
\usepackage[pdftex, bookmarks=false]{hyperref}
\begin{document}
\pagenumbering{roman}
\renewcommand{\baselinestretch}{1.0}
\raggedbottom
\input {title}
\tableofcontents
\newpage
\pagenumbering{arabic}
\setcounter{page}{1}
\input {chap_a}
\input {chap_b}
\end{document}
%%% 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}
\label{chap:wss}
\section{WSS}
aa bb ...
aa bb
\subsection{BBAA}
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).
chap_a.texetc?\pagenumbering{arabic}sets the page number to1usually, it's not necessary to use\setcounter{page}{1}explicitly – Jan 26 '15 at 17:29\cleardoublepageso that if it needs to make an empty page to get the next chapter open on the right it uses theblankpage style rather than the default one. that seems to be a major aim of the class but\makeatletter\let\ps@blank\ps@plain\makeatotherprobably changes it. – David Carlisle Jan 26 '15 at 17:30hyperrefshould be the last package to be loaded, in most cases – Jan 26 '15 at 17:30\usepackage{etoolbox} \pretocmd{\chapter}{\thispagestyle{plain}}{}{}– Gonzalo Medina Jan 26 '15 at 18:14