I need to put the number for each page that is numbered at the top right hand corner of the document. Currently that condition is satisfied except for the first page of each chapter. That is, for the page that contains the title of the chapter the number is at the bottom (center) of the page. Can anyone help with this?
[Tex/LaTex] How to put the page numbers where I need them
header-footerpage-numbering
Best Answer
By default the first page of each
\chapter
is set using theplain
page style under the basicbook
andreport
document classes. To see why this is the case, consider the\chapter
macro:Note the setting of
\thispagestyle{plain}
. If you wish to change that, you can either create a new page style and updateplain
.Creating a new style:
Using
fancyhdr
you can either use the defaultfancy
page style or create your own. Here's how to create your own:The usage with something like
titleps
is similar:Now you either insert this style on the chapter pages manually using
or you update this through a patch to be implemented globally. Here's a patch using
etoolbox
(place this in your document preamble):Update
plain
:This is similar to the above solutions. For
fancyhdr
, useFor
titleps
useThe above changes slightly if you're using a two-side document setup. However, it changes drastically if you're using another document class.