# page number in top right intersects with the page text

My text and the top right page number seem to intersect when using fancyhdr:

\documentclass[a4paper,oneside,12pt]{report}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{bm}
\usepackage{graphicx}
\usepackage{subfigure}
\usepackage{float}
\usepackage{url}
\setcounter{secnumdepth}{5}
\usepackage{hyperref}
\usepackage [numbers,square,sort]{natbib}
\usepackage{ulem}
\usepackage[cm]{fullpage}
\usepackage{pslatex}  % for times new roman font
\usepackage[nonumberlist]{glossaries}
\usepackage[top=2cm, bottom=2.5cm, left=3.5cm, right=2.5cm]{geometry}
\usepackage{fancyhdr}

\hypersetup{
citecolor=black,
filecolor=black,
urlcolor=black
}

\makeglossaries
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\newcommand{\abs}[1]{ \lvert #1 \rvert}

\pagenumbering{roman}

\input{./glossary.glo}

\begin{document}

\input{./chapters/titlepage.tex}
\input{./chapters/declaration.tex}
\input{./chapters/dedication.tex}
\input{./chapters/abstract.tex}
\tableofcontents
\listoftables
\listoffigures
\include{./chapters/acknowledgement.tex}
\pagenumbering{arabic}
\include{./chapters/introduction}
\include{./chapters/theory}
\include{./chapters/literature}
\include{./chapters/methodology}
\include{./chapters/results}
\include{./chapters/discussion}
\include{./chapters/conclusion}

\printglossaries
\begin{small}
\bibliographystyle{ieeetr}

\bibliography{projbib}
\end{small}
\end{document}


-
The problem is caused probably by myheadings pagestyle, but I cannot see its declaration in the code you pasted. Also, what is the purpose of including package fullpage if you also set the margins with geometry? –  JLDiaz Jul 31 '12 at 9:28
Welcome to TeX.SX. When you have a problem with your LaTeX code, you should always try to trace back exactly what the cause it (at least as far as possible) and remove all irrelevant code. In this way you can provide a minimal working example (MWE), which allows us to give you much better advice. –  canaaerus Jul 31 '12 at 9:42
i'm good at latex, but not that good, i added the fullpage a while ago to get fine control over the size of the page that i use. i had no idea that it conflicts with fancyhdr, any way i removed the \usepackage[cm]{fullpage} and the problem is gone. thanks jLDiaz –  mike Jul 31 '12 at 9:47

A minimal working example of your problem is

\documentclass[a4paper,oneside,12pt]{report}
\usepackage[cm]{fullpage}
\usepackage{fancyhdr}
\usepackage{lipsum}

\begin{document}

\pagenumbering{arabic}
\lipsum[1]

\end{document}


It is resolved by replacing the \usepackage[cm]{fullpage} by your geometry package line

\usepackage[top=2cm, bottom=2.5cm, left=3.5cm, right=2.5cm]{geometry}


Thus in your original file you should just delete the line with the fullpage package.

In general the geometry package is to be preferred over the older fullpage exactly because of this type of problem.

-
agreed, solved, and thanks. –  mike Jul 31 '12 at 10:45
Ok, so i accepted and upvoted it now that i have enough karma to upvote. Thanks again –  mike Dec 31 '12 at 14:02