[Tex/LaTex] Changing page number location

header-footerpage-numbering

I need to do the following:

For the first page of every section, the page number should be at the bottom and centered. The text should stop one "double space" above it.

For all other pages, the page number should be at the top right, with the text starting one "double space" below that.

How can I:

  1. Change the location of the page number according to the above?
  2. How can I specify a "double space" distance above/below the page number?

Best Answer

You could use a package like fancyhdr or scrpage2 to customize header and footer. Compile this example and look at header and footer of the pages with filler text:

\documentclass{article} 
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{fancyhdr}
\renewcommand*{\headrulewidth}{0pt}
\fancyhf{}
\rhead{\thepage}
\pagestyle{fancy}
\begin{document}
\thispagestyle{plain}
\blinddocument
\end{document}

The commands and their usage are described in the fancyhdr manual.