[Tex/LaTex] Change footer in beginning of chapters

chaptersheader-footer

I want the footer of all pages to be "Page N°X" on the right. I used this:

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{} % clear all header and footer fields
\fancyhead[R]{\leftmark}
\fancyfoot[R]{\footnotesize Página N$^\circ$ \thepage\ }
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}

It works on every page but the chapter beginning ones.

Best Answer

The first page of every chapter gets the plain page style internally; you can change this behaviour by redefining the plain style:

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{} % clear all header and footer fields
\fancyhead[R]{\leftmark}
\fancyfoot[R]{\footnotesize Página N$^\circ$ \thepage\ }
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
% redefinition of the plain style:
\fancypagestyle{plain}{%
\fancyhf{} % clear all header and footer fields
\fancyfoot[R]{\footnotesize Página N$^\circ$ \thepage\ }
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}}