\documentclass{mwrep}
%page number on the end of chapter
\makeatletter
\let\ps@closing\ps@plain
\makeatother
%margins
\usepackage{anysize}
\marginsize{3cm}{3cm}{2cm}{2cm}
\usepackage{lipsum}
%mark
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{}\chead{}\rhead{}\lfoot{}\cfoot{}\rfoot{\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
%mark
\begin{document}
\chapter{AAAAAAA}
\section{aaaaaaa}
\lipsum
\section{bbbbbbb}
\lipsum
\section{ccccccc}
\lipsum
\chapter{BBBBBBB}
\section{aaaaaaa}
\lipsum
\section{bbbbbbb}
\lipsum
\section{ccccccc}
\lipsum
\chapter{CCCCCCC}
\section{aaaaaaa}
\lipsum
\section{bbbbbbb}
\lipsum
\section{ccccccc}
\lipsum
\end{document}
When you remove code between %marks, you get a number on every page.
When I use fancyhdr, those settings are overwritten and page number is ommited at the beginning and the end of chapter. Is there a way to fix that? I'm only using fancyhdr to change position of page number.
fancyhdrat all (except of page numer position of course). The problem is:fancyhdroverwrites my settings. – Jan Ajan Mar 13 '12 at 23:03