Take the 2-minute tour ×
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.

I'm having problems with the page numbers in my document. I'm using a template that my lecturer has given us all and haven't touched the page numbers but they appear in different places as you go through the document. It's at the bottom, centre of the page on the first page, and the numbers carry on from then on to be in the right hand top corner. I've tried to fix this myself but I can't seem to, however this is my first time using LaTeX. Any suggestions would be appreciated. Here is what I've got at the top of the document currently:

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,graphicx,hyperref,parskip,gensymb,fancyhdr}
\usepackage[cm]{fullpage}
\setlength{\headsep}{0.6 cm}
\pagestyle{myheadings}

\begin{document}

I also tried \pagenumbering{gobble} to get rid of them (which worked) and then \pagestyle{arabic} to bring them back- hoping they would all be in the same place but this didn't work. Preferably, I would like all of the numbers to be at the bottom of the page, in the centre. Thanks!

Edit:

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,graphicx,hyperref,parskip,gensymb,fancyhdr}
\usepackage[cm]{fullpage}
\setlength{\headsep}{0.6 cm}
\pagestyle{myheadings}

\begin{document}

\title{Modelling the Back End of a Bus}

\maketitle

\begin{abstract}
.....
\end{abstract}

\section{introduction}
....
\end{document}
share|improve this question
1  
Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. Your example is not a MWE by the way ;-) –  Christian Hupfer May 11 at 15:32
    
Use the fancyhdr package to get better control of the page layout for headers and footers. –  A.Ellett May 11 at 15:38
    
@A.Ellet: The OP uses fancyhdr already, but not \pagestyle{fancy} –  Christian Hupfer May 11 at 15:41
    
The described behaviour is the EXPECTED one. The first page of a chapter shouldn't have, generally, a running head. –  Przemysław Scherwentke May 11 at 15:43

2 Answers 2

up vote 2 down vote accepted
\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,graphicx,hyperref,parskip,gensymb,fancyhdr}
\usepackage[cm]{fullpage}
\setlength{\headsep}{0.6 cm}
\setlength{\headheight}{15pt}% comment this line and the next for no header
\addtolength{\textheight}{-15pt}
\usepackage{fancyhdr}
\pagestyle{fancy}
%   \renewcommand{\headrulewidth}{0pt}% if you don't want a rule
%   \fancyhf[lh,ch,rh]{}% for no header
%   \fancyhf[lh]{Something left}
%   \fancyhf[rh]{Something right}
%   \fancyhf[ch]{Something centre}

\title{Title}
\author{Author}

\begin{document}

\title{Modelling the Back End of a Bus}

\maketitle

\begin{abstract}
.....
\end{abstract}

\section{introduction}
....

\newpage

some text
\end{document}

fancy page style

share|improve this answer
    
Thank you, that's great! –  Ella May 11 at 16:58
    
@Ella Glad it helped. –  cfr May 11 at 17:38

Use fancyhdr:

\documentclass{article}
\usepackage{fancyhdr}
\pagestyle{fancy}
\rheader{\thepage}
\begin{document}
Every page will be numbered with the numbers in the upper right hand corner.
\end{document}
share|improve this answer
    
I have just tried this thank you, but the first page ends up with two page numbers- one on the left and one on the right, but the rest are fine. –  Ella May 11 at 15:49
    
@Ella You need to set all the positions \lhead{...}\chead{...}\rhead{...}\lfoot{...}\cfoot{....}\rfoot{...} where ... is whatever content you want to show up in that position. –  A.Ellett May 11 at 15:51
    
Better yet, use \fancyhf{} to clear all the fields and then set the one you want. By the way, it's better to use \fancyhead[R]{\thepage} rather than \rhead{\thepage}: it's clearer and more easily manageable. –  egreg May 11 at 20:38

Your Answer

 
discard

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.