4

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}
\linespread{1.5}
\usepackage{subfigure}
\usepackage{float}
\usepackage{url}
\setcounter{secnumdepth}{5}
\usepackage{hyperref}
\usepackage [numbers,square,sort]{natbib}
\usepackage{ulem}
\usepackage[cm]{fullpage}
\addtolength{\voffset}{1.0cm}
\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}

%\addtolength{\textheight}{3.5cm}


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


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


\pagenumbering{roman}

\input{./glossary.glo}

\begin{document}
\pagestyle{myheadings}


\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}

http://imgur.com/x8Fyt

3
  • 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.
    – bodo
    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
6

A minimal working example of your problem is

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

\begin{document}
\pagestyle{myheadings}

\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.

1
  • Ok, so i accepted and upvoted it now that i have enough karma to upvote. Thanks again
    – mike
    Dec 31 '12 at 14:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.