# Pagestyle uheadings. No page number on first page with chapter title

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}
\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?

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


just before

\pagestyle{uheadings}


and the problem is solved.

Each \chapter sets the page style to opening. A patch using etoolbox to change this to plain fixes it:

\documentclass[a4paper,onecolumn,oneside,11pt,wide,floatssmall]{mwrep}
\usepackage{lipsum,geometry,etoolbox}
\makeatletter
\patchcmd{\mw@sectionxx}{opening}{plain}{}{}
\makeatother