From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/33783 Path: news.gmane.org!not-for-mail From: Robin Kirkham Newsgroups: gmane.comp.tex.context Subject: Re: Some questions about context Date: Sun, 11 Mar 2007 14:15:47 +1100 Message-ID: <0B14DE3D-1BED-4CBE-A236-0FAA7846BC70@csiro.au> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1173582977 24493 80.91.229.12 (11 Mar 2007 03:16:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 11 Mar 2007 03:16:17 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sun Mar 11 04:16:11 2007 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1HQEXY-0003yQ-Sz for gctc-ntg-context-518@m.gmane.org; Sun, 11 Mar 2007 04:16:08 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B4F8D1FE1D; Sun, 11 Mar 2007 04:11:19 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 14117-02; Sun, 11 Mar 2007 04:11:11 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7A61A1FE18; Sun, 11 Mar 2007 04:11:11 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8BE9F1FE18 for ; Sun, 11 Mar 2007 04:11:09 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 14383-02-2 for ; Sun, 11 Mar 2007 04:11:06 +0100 (CET) Original-Received: from mx.aanet.com.au (mx.aanet.com.au [202.63.43.136]) by ronja.ntg.nl (Postfix) with ESMTP id 4FB401FE14 for ; Sun, 11 Mar 2007 04:11:04 +0100 (CET) Original-Received: from mail.aanet.com.au (mail.aanet.com.au [202.61.184.228]) by mx.aanet.com.au (Postfix) with SMTP id 30EDE2D41B4 for ; Sun, 11 Mar 2007 13:15:49 +1000 (EST) Original-Received: (qmail 21746 invoked by uid 89); 11 Mar 2007 03:15:49 -0000 Original-Received: by simscan 1.2.0 ppid: 21716, pid: 21734, t: 0.1594s scanners: attach: 1.2.0 clamav: 0.88.1/m:37/d:1390 Original-Received: from cust5289.vic01.dataco.com.au (HELO ?192.168.1.12?) (202.164.198.169) by mail.aanet.com.au with SMTP; 11 Mar 2007 03:15:49 -0000 In-Reply-To: X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:33783 Archived-At: 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, ntg-context-request@ntg.nl wrote: >> >>> From: Oliver Buerschaper >>> 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