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.

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

share|improve this question
    
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
add comment

1 Answer 1

up vote 5 down vote accepted

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.

share|improve this answer
    
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
add comment

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.