[Tex/LaTex] Wrong page number positioning in book document

bookspage-numbering

I am writing a book document and I encountered a strange behaviour: whenever a page is left empty (for instance because it represents the end of a chapter) the page number is placed on the top-left corner instead of the usual bottom-center. My latex code is the following:

\documentclass[12pt,twoside,a4paper]{book}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}

\begin{document}

\chapter*{Introduction}
Hey this is some test text.

\chapter{Another chapter}
With some random text.

\end{document}

I'm on Linux and I'm compiling it "manually" by running pdflatex <filename>.tex, and the output is the following.
Screenshot

As you can see the second page number is placed in the wrong position. Any idea about how to fix it?

Best Answer

The appearing of page numbers are determined by \pagestyle{...} and \thispagestyle{...}. If you not define otherwise, the document class book use in page with chapters title \thispagestyle{plain} (as part of chapter style definition) and on others page (regardless if they are empty or not) default book page style (where the page numbers are on outside page headers).

So, the cure for your problem is add \pagestyle{plain} after \begin{document}:

\documentclass[12pt,twoside,a4paper]{book}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}

\usepackage{lipsum}

    \begin{document}
\pagestyle{plain}% <--- added

\chapter*{Introduction}
\lipsum
\lipsum[1]
Hey this is some test text.

\chapter{Another chapter}
With some random text.
    \end{document}