latex page number position
Posted
by anton
on Super User
See other posts from Super User
or by anton
Published on 2010-05-07T14:07:49Z
Indexed on
2010/05/07
14:18 UTC
Read the original article
Hit count: 258
latex
I am working on a long document in latex with documentclass book. I need the page number to always be in the upper right corner of each page, even if that page is the first page of a chapter (right now on 1st pages of chatpers, the page number is bottom-centered, on all other pages it's top-right).
I control the position of the page number with fancyheader:
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{}
\chead{}
\rhead{\thepage}
\lfoot{}
\cfoot{}
\rfoot{}
\renewcommand{\headrulewidth}{0pt}
Also, I don;t know if the problem is realted but my chapters do not start from the top of the page. There is a white area, then comes chapter X, then a newline with the chapter line. What I also want is the chapter to start from the top of the page.
The main question here is how I can get the page number to always appear in the upper right corner, I mention the thing with the chapter title position only in case that might be related.
Thanks.
© Super User or respective owner