# Custom page numbering does not affect whole document

I have a problem with page numbering. Till now I have just only seven pages of my document, but just only one has the desired page numbering. The rest of pages has different.

As @Bernard says in the comment below I'm attaching the working example of my code:

\documentclass[12pt,a4paper]{report}
\usepackage{geometry}
\geometry{
left=35mm,
right=15mm,
top=25mm,
bottom=25mm,
}
\usepackage{todonotes}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}\pagestyle{fancy}
\fancyhf{}
\pagenumbering{arabic}
\rfoot{Strona ~\thepage~}

\begin{document}
Some text \dots
\todo[inline]{example of useage}
Some text \dots
\todototoc
\listoftodos
\newpage
Some text \dots

\end{document}


The first page with the example of text has right page numbering, but page which is generated automatically, in this example by using \todonotes package, has not formatted page numbering. I would like to have page numbering formatted on all pages.

• Welcome to TeX SX! Could you post a minimal (non-)working example, and explain exactly what you want to achieve? – Bernard Feb 28 '18 at 19:13
• Welcome! If you don't know what a Minimal Working Example (MWE) is check this: (tex.meta.stackexchange.com/questions/228/…) – koleygr Feb 28 '18 at 19:15
• @Bernard thank you for the answer, I edited my question putting example working code. And of course Welcome :) – Emil Kob Mar 1 '18 at 20:18
• Thanks for editing the question; now it's actually answerable (+1) and someone will likely answer. :-) – ShreevatsaR Mar 1 '18 at 20:24

By default, most \listof... macros use \thispagestyle{plain} explicitly or by loading \chapter* which applz that call of plain style.

By saying \fancypagestyle{plain}{} this style is redefined to do nothing and the last style set (fancy here) still persists.

\documentclass[12pt,a4paper]{report}
\usepackage{geometry}
\geometry{
left=35mm,
right=15mm,
top=25mm,
bottom=25mm,
}
\usepackage{todonotes}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}\pagestyle{fancy}
\fancyhf{}
\fancypagestyle{plain}{}
\pagenumbering{arabic}
\rfoot{Strona ~\thepage~}

\begin{document}
Some text \dots
\todo[inline]{example of useage}
Some text \dots
\todototoc
\listoftodos
\newpage
Some text \dots

\end{document}

• Hi! Thank you for the answer! I thought so that this will be something easy. I'm starting to writing my engineering thesis, getting help that quickly, is really fancy :) For sure I will have more questions. Once again thank you. – Emil Kob Mar 1 '18 at 20:29
• @EmilKob: Thanks. What does strona mean? Is that 'page' in Polish? – user31729 Mar 1 '18 at 20:30
• Yes, I'm from Poland, 'strona' means Page :) – Emil Kob Mar 1 '18 at 20:32
• @Emil Kob: Welcome to TeX.SE. Thanks for explanation, I like to learn words from other countries. – user31729 Mar 1 '18 at 20:33
• @ChristianHupfer, so Página in Portuguese. – Sigur Mar 1 '18 at 20:57