Hi Wolfgang,

Many thanks for you help. I solved this problem by simply

\setuplayout[%
     ... ,
     leftedge=20mm,
     rightedge=20mm]
\setupheader[after=\hrule]

It seems that if you give only one argument to \setupheader, it  
applies to the whole header, including the left and right edges. So,  
I just extend the edges off the page (or anywhere I need -- I don't  
use the edges for anything else).

I'll use your \vrule idea to control the line thickness, although the  
\hrule default is about right anyway.

Thanks,

Robin


>> Moreover, how do you get a rule in the header that extends from the
>> left of the left margin, right across to the right of the right
>> margin (including the gaps in between)?
>>
>> On 06/03/2007, at 10:00 PM, [EMAIL PROTECTED] wrote:
>>
>>> From: Oliver Buerschaper <[EMAIL PROTECTED]>
>>> Date: 6 March 2007 9:19:23 PM
>>> Subject: Re: [NTG-context] Some questions about context
>>>
>>>> And another question (in other topic): how we can do lines at
>>>> header and
>>>> footer like fancyheaders in latex?
>>>
>>> For your headers try this:
>>>
>>> \setupheader
>>>     [text]
>>>     [after=\hrule]
>
> Hi Robin,
>
> I tried to make something working and came to the following three
> methods to draw a rule under the header at the whole pagewidth.
>
> If you use ConTeXts default layout with different margins you should
> use bigger values for the rulewidth than only pagewidth.
>
> \setuplayout[location=middle,cutspace=\backspace,width=middle]
> %\setuppapersize[A5][A4]
> %\showframe
>
> \startuseMPgraphic{headerrule}
> setbounds currentpicture to unitsquare xyscaled (\the\paperwidth,\the
> \headerheight); draw (0,0)--(\the\paperwidth,0);
> \stopuseMPgraphic
>
> \defineoverlay
>   [headerrule]
>   [\useMPgraphic{headerrule}]
>
> \defineoverlay
>   [headerrule]
>   [\vrule height\headerheight width0pt%
>    \vrule width\paperwidth height 0.4pt\relax]
>
> \defineoverlay
>   [headerrule]
>   [{\framed[width=\paperwidth,height=
> \headerheight,frame=off,bottomframe=on]{}}]
>
> \setupbackgrounds
>   [header]
>   [text]
>   [background=headerrule]
>
> \starttext
>
> \input knuth
>
> \stoptext
>
> Wolfgang

_______________________________________________
ntg-context mailing list
[email protected]
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to