Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

fancyhdr, headers length

391 views
Skip to first unread message

Panos N.

unread,
Nov 2, 2006, 10:10:50 AM11/2/06
to
Hi,

I use the package fancyhdr in order to place headers and footers in a
document. My problem is that the header's length doesn't cover the whole
page but just half of it...

The output is like this :

header page x
---------------------------------------

text text text text text text text text text text text text text text text text

---------------------------------------
footer


I use the following commands to create the header :
Code:

\pagestyle{fancy}
\fancyhf{}
\lhead{some text}
\chead{}
\rhead{some text}
\lfoot{}
\cfoot{some text}
\rfoot{}

Thank you in advance

José Carlos Santos

unread,
Nov 2, 2006, 10:45:09 AM11/2/06
to

Without a minimal example, it is hard to say what's the cause, but
my guess is that you changed the value of \textwidth after your
commands to create the head and the footer, and not before, as you
should have done. Like this:

\documentclass{article}
\usepackage{fancyhdr}


\pagestyle{fancy}
\fancyhf{}
\lhead{some text}
\chead{}
\rhead{some text}
\lfoot{}
\cfoot{some text}
\rfoot{}

\setlength{\textwidth}{127mm}
\begin{document}
\section{Something}
Something. Something. Something. Something. Something.
Something. Something. Something. Something. Something.
Something. Something. Something. Something. Something.
\end{document}

If you put the line \setlength{\textwidth}{127mm} *before* the line
\pagestyle{fancy}, then all goes well.

Best regards,

Jose Carlos Santos

Lars Madsen

unread,
Nov 2, 2006, 10:46:55 AM11/2/06
to

just a guess here (since you ddn't provide a minimal example)

do you ajust the textwidth later in the document??
in that case try altering the dimentions first and then define your headers.


--

/daleif (remove RTFSIGNATURE from email address)

LaTeX FAQ: http://www.tex.ac.uk/faq
LaTeX book: http://www.imf.au.dk/system/latex/bog/ (in Danish)
Remember to post minimal examples, see URL below
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl

Panos N.

unread,
Nov 2, 2006, 10:52:14 AM11/2/06
to


Thanks Jose,

This was finally the problem.

0 new messages