[Tex/LaTex] Pagestyle uheadings. No page number on first page with chapter title

header-footerpage-numberingsectioning

I am using uheadings pagestyle. First page of every chapter should have page number at the bottom (default plain style), but in my document there is no page number there.

This is my master page:

\documentclass[a4paper,onecolumn,oneside,11pt,wide,floatssmall]{mwrep}
\usepackage{bookman}
\pagestyle{uheadings}
\usepackage[pdftex, bookmarks=false]{hyperref}
\begin{document}
\pagenumbering{roman}
\renewcommand{\baselinestretch}{1.0}
\raggedbottom
\tableofcontents
\newpage
\pagenumbering{arabic}

\input {chap_a}
\input {chap_b}

\end{document}

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

Files chap_a, chap_b are similar. Files chap_a.tex, chap_b.tex are two A4 pages long, contains:

\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: 

Why first page of every chapter doesn't have page number in footer? How to fix this?

Best Answer

Add the following lines

\makeatletter
  \def\ps@uheadings{%
    \let\@mkboth\markboth
    \let\ps@normal\hf@uheadings
    \let\ps@opening\hf@plain
    \let\ps@closing\hf@uheadings
    \let\ps@blank\hf@empty
    \ps@normal
    \def\chaptermark##1{%
      \markright{%
        \ifHeadingNumbered
            \thechapter.\enspace
        \fi
        ##1}}}
\makeatother

just before

\pagestyle{uheadings}

and the problem is solved.