# Why are pagenumbers centered with \pagestyle{headings} on \chapter{}'s first pages?

I'm using documentclass report with options twoside and openright. The pagestyle is headings. This is a minimal working example:

\documentclass[twoside,openright]{report}
\usepackage{blindtext}
\begin{document}
\chapter{Chapter}
\blindtext \blindtext
\section{Section}
\blindtext \blindtext
\end{document}


Why is the page number at the first page of the chapter centered at the bottom and not on the right even though the document style headings works on all other pages? How to move the page number on the first page of a chapter to the right side as it should be using the document option openright?

-
\chapter issues \thispagestyle{plain}. – egreg May 3 '12 at 12:28
Possible duplicate of page number position. – Stephan Lehmke May 3 '12 at 12:40

By default the pages where chapters start are decorated with page style plain. That is why you get that behavior. If you want to change it, you have to redefine the page style plain like :

\documentclass[twoside,openright]{report}
\usepackage{blindtext}

\makeatletter
\makeatother

\begin{document}
\chapter{Chapter}
\blindtext \blindtext
\section{Section}
\blindtext \blindtext
\end{document}

-
thanks, that worked :-) – 5chdn May 3 '12 at 12:34

If you want to use different styles in different parts of your work, you can use the following code, which renews the command \thispagestyle{plain}.

In the following example, the page style is "headings" for all pages in the preface and acknowledgements section, including the title pages. In the rest of the document, title pages have the page style "empty" and all other pages have the page style headings.

\documentclass[twoside,english]{book}
\usepackage{babel}
\usepackage{blindtext}
\usepackage{emptypage}          % no headlines on empty pages

% ***************************************************************
\newcommand\plainstyle{empty}% variable for page style
\let\thispagestyleold\thispagestyle
\renewcommand\thispagestyle[1]{%
\def\textparam{#1}%
\def\isplain{plain}%
\ifx\textparam\isplain%
\thispagestyleold{\plainstyle}%
\else%
\thispagestyleold{#1}%
\fi%
}
% ***************************************************************

\begin{document}
\chapter*{Preface}
\pagenumbering{Roman}

\blindtext \blindtext \blindtext \blindtext \blindtext

\chapter*{Acknowledgements}
\blindtext

\chapter{Chapter one}
\pagenumbering{arabic}
\pagestyleTitlepages{empty}

\blindtext \blindtext
\section{Section}
\blindtext \blindtext

\chapter{Chapter two}
\blindtext \blindtext
\section{Section}
\blindtext \blindtext

\end{document}

-
Welcome to TeX.SX! – Heiko Oberdiek May 2 '14 at 15:30