cmdl...@gmail.com writes:
> Hi, I'm using fancyhdr with a custom ornamental header line (using
> symbols from the fourier-orns package). In some sections in my document,
> I need to switch to two columns. The problem is that the header line
> doesn't extend all the way across the page as it does in single column
> mode. It only extends across the first column.
>
> Here's an example:
Hello,
I have not been following comp.text.tex for a long time. I recently
picked it up again, and I stumbled upon this problem. So forgive me to
come in very late in this discussion. I have started working again on
fancyhdr the last weeks after a long time of doing nothing. So now I
investigated what your problem is. I excerpt from your document:
> %Header line defined here.
> \def\headrule{{\hrulefill \raisebox{-2.1pt}[10pt][10pt]{~~~\decofourleft\decotwo\decofourright~~~} \hrulefill}}
The problem here is that you do not give the width of the headrule. In
the standard definition of fancyhdr the rule is set inside a box of
width \headwidth. In TeX if you put some 'horizontal' material in your
document (what this is) the default width is defined by \hsize. Now in
LaTeX this usually is equal to the \textwidth of the document, but in
multicol it is smaller (slightly less than half that) because it has to
typeset the text to that width.
So if the headers/footers are typeset while multicol is active, your
header will be typeset with the width of the multicol column.
A solution (apart from the solution Jon had given) is to put the whole
thing is a box of width \headwidth, like \makebox[\headwidth]{...},
together with replacing the ~~~ with a \hspace.
I will prepare an update of fancyhdr where I will set \hsize to
\headwidth during the processing of the headers/footers, but as I just
submitted a new version I will wait a few weeks with that.
--
Piet van Oostrum <
pie...@pietvanoostrum.com>
WWW:
http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]