# How get page numbering on all pages in document?

I've searched and read the answers for this problem all over the web. However, it seems something else is wrong with my document. I'm using the book document class in latex. I have not used any \pagestyle{empty} or anything else anywhere. But why page numbering only appears on the first page of each chapter, instead of every page of the document? Please tell me how can I get it on all pages.

Here is my preamble:

\documentclass[a4paper,12pt,openany]{book}
\usepackage[utf8]{inputenc}
\usepackage{amsthm,amssymb,amsmath}
\usepackage{bbm}
\usepackage[top=40mm, bottom=40mm, left=25mm, right=25mm]{geometry}
\usepackage{graphicx}
\usepackage{framed}
\usepackage{fancyhdr}
\newcommand{\changefont}{\fontsize{7}{11}\selectfont}
\fancyhf{}
\pagestyle{fancy}
\usepackage{setspace}
\onehalfspacing
\usepackage{tocloft}

\usepackage{multirow}
\usepackage{subcaption}
\usepackage{caption}
\usepackage{booktabs}
\usepackage{diagbox}
\usepackage[dvipsnames]{xcolor}
\usepackage[morefloats=100]{morefloats}
\usepackage{biblatex}


And here is my document:

\begin{document}
\input{title}
\clearpage

\frontmatter

\input{abstract}
\clearpage

\tableofcontents
\clearpage

\listoffigures
\clearpage

\listoftables
\clearpage

\mainmatter

\include{chapter1/Introduction}
\include{chapter2/Definitions}
\include{chapter3/Background}
\include{chapter4/Methods}
\include{chapter5/Experiments}
\include{chapter6/Conclusion}

\appendix
\include{appendix1}
\include{appendix2}
\include{appendix3}
\include{appendix4}
\end{document}


Again, I have not used any \pagestyle{...} command in chapters or appendices.

The main page style is set to fancy via

\pagestyle{fancy}


Also the headers and footers (in order to set them to suit your needs) are completely cleared via

\fancyhf{}


You never use \thepage anywhere. Perhaps you're after

\fancyfoot[C]{\thepage}


as part of your style so that it matches the plain page style (set as the first page of every \chapter).

• Thank you so much. It was \fancyfoot[C]{\thepage}.
– leo
Jan 24, 2021 at 6:05