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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using a standard Latex book shell to typeset a book. Does anyone know how to format page numbering as follows:

  1. for preliminary pages, e.g. title page, contents, preface, etc., put page number at the bottom-center;
  2. for mainmatter, put page number at the top-right.

I tried the follows


However, they also move the page numbers of preliminary pages to top right which are not desired.

share|improve this question
Welcome to TeX.SX! You can highlight code blocks by indenting with 4 spaces or by clicking the {} icon above the edit window. Good luck! – Count Zero Aug 6 '12 at 1:22

You can define two page styles; one for the preliminary pages and the other one for the mainmatter. Inside your document you can select the desired style using \pagestyle. A little example in which I named the two styles preliminary and mainmatter:






share|improve this answer

Your Answer


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.