In a report, I would like to place a page number at the bottom, running 1, 2, 3,… as is usually the case with a document: 1 for the 1st page; 2 for the 2nd page, …
However, in each Chapter of this document, I would like to put another page number at the top. For example, in Chapter II, 2-1 at top right on the 1st page of Chapter II and 47 at the bottom if Chapter II begins in the 47th page from the beginning, 2-2 at top left on the 2nd page of Chapter II and 48 at the bottom, and so forth.
Please tell me a set of proper TEX commands for this 2 different types of page numbers for each page.
Best Answer
Since the first page of a chapter is handled differently than others, and is actually typeset using the
plain
page style viaat a call to
\chapter
, one can modify theplain
page style and additionally usefancyhdr
to create a separate page style (fancy
) for the rest of the non-first-chapter-pages.Note that I've added a footer rule on the first chapter page, which can be removed. Also, no marks are added to the inner pages of the chapters, but this can also be added. Since there was no requirement in the original post, it's been kept simple here.
The advantage with this approach is that you are able to modify what you want displayed in the header/footer on the first chapter page separately from that of the other pages, since the chapter first page is usually typeset differently and may require a different look.
Note that modification of the
plain
page style will also impact how all the other\chapter
-like first pages look. For example,\tableofcontents
, which typesets as a\chapter*
by default, will also have this. If this is unwanted, a little more work is required.