Page Layoutreport | Page Number on Chapter Page

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
crdafisica
Posts: 10
Joined: Thu Jun 26, 2008 4:25 am

report | Page Number on Chapter Page

Post by crdafisica »

Hi everyone,

I'm writing a document using the report class and I want the page numbers to be placed at the top right corner of each page. The command \pagestyle{myheadings} at the beginning of the document does exactly that for all pages but the chapter pages.

Anyone knows how to solve this problem ? Why is that happening only with chapter pages ?

Below I show you all a simple example to illustrate the problem. I've tried to find the answer using the search engine with no success.

Thanks in advance for any help.

Code: Select all

\documentclass[12pt]{report}

\begin{document}
\pagestyle{myheadings}

\chapter{ABSTRACT}
text 

\newpage
text

\newpage
text

\end{document}
Last edited by crdafisica on Tue Jan 31, 2012 10:09 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10321
Joined: Mon Mar 10, 2008 9:44 pm

report | Page Number on Chapter Page

Post by Stefan Kottwitz »

Hi,

the first page of a chapter has a plain page style by default. Have a look into some books, you may see that chapter start pages often look differently.

You could change it for such a page locally by

Code: Select all

\thispagestyle{myheadings}
right after your \chapter command, or define it once for all in your preamble, changing plain into myheadings:

Code: Select all

\makeatletter
\let\ps@plain\ps@myheadings
\makeatother
Stefan
LaTeX.org admin
crdafisica
Posts: 10
Joined: Thu Jun 26, 2008 4:25 am

Re: report | Page Number on Chapter Page

Post by crdafisica »

Thanks Stefan. Everything is working now. :)
Post Reply