Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
 \pagestyle{headings}
 \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?

share|improve this question
3  
\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

2 Answers 2

up vote 4 down vote accepted

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}
 \pagestyle{headings}

  \makeatletter
 \let\ps@plain\ps@headings
 \makeatother

 \begin{document}
  \chapter{Chapter}
   \blindtext \blindtext
   \section{Section}
    \blindtext \blindtext
 \end{document}
share|improve this answer
    
thanks, that worked :-) –  vertoe 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
\newcommand\pagestyleTitlepages[1]{\renewcommand\plainstyle{#1}}
\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}
  \pagestyleTitlepages{headings}

  \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}
share|improve this answer
    
Welcome to TeX.SX! –  Heiko Oberdiek May 2 at 15:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.