From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/19065 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Header background won't go away Date: Wed, 16 Mar 2005 22:46:04 +0100 Message-ID: <4238A91C.5090204@wxs.nl> References: <423734EA.8080407@capdm.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1111046954 21554 80.91.229.2 (17 Mar 2005 08:09:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 17 Mar 2005 08:09:14 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Mar 17 09:09:14 2005 Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1DBq46-0005Vp-AK for gctc-ntg-context-518@m.gmane.org; Thu, 17 Mar 2005 09:09:10 +0100 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1E625128C2; Thu, 17 Mar 2005 09:10:38 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 22814-03-12; Thu, 17 Mar 2005 09:10:34 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3DEA5128AD; Thu, 17 Mar 2005 09:10:34 +0100 (CET) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 07D63128A8 for ; Thu, 17 Mar 2005 09:10:32 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 22814-03-11 for ; Thu, 17 Mar 2005 09:10:29 +0100 (CET) Original-Received: from mailrelay02.solcon.nl (maillb.solcon.nl [212.45.32.200]) by ronja.ntg.nl (Postfix) with ESMTP id B30431289E for ; Thu, 17 Mar 2005 09:10:22 +0100 (CET) Original-Received: from server-1.pragma-net.nl (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by mailrelay02.solcon.nl (8.12.11/SQL-8.12.11-5/8.12.11) with ESMTP id j2H8ALkK007095 for ; Thu, 17 Mar 2005 09:10:21 +0100 Original-Received: by server-1.pragma-net.nl (Postfix, from userid 65534) id D260418527; Thu, 17 Mar 2005 08:54:15 +0100 (CET) Original-Received: from [10.100.1.191] (unknown [10.100.1.191]) by server-1.pragma-net.nl (Postfix) with ESMTP id 021B917D59 for ; Thu, 17 Mar 2005 07:54:11 +0000 (UTC) User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <423734EA.8080407@capdm.com> X-Virus-Scanned: ClamAV 0.80/705/Fri Feb 11 17:51:32 2005 clamav-milter version 0.80j on mailrelay02 X-Virus-Status: Clean X-Virus-Scanned: by amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 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: by amavisd-new at ntg.nl X-MailScanner-From: ntg-context-bounces@ntg.nl X-MailScanner-To: gctc-ntg-context-518@m.gmane.org Xref: news.gmane.org gmane.comp.tex.context:19065 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:19065 Duncan Hothersall wrote: > Hi all. > > I have a book with parts and chapters, which wants a tint in the > background of the header line. I have the following set-up producing > almost what I want (apologies for the length but I've stripped out as > much as I can to still show the same effect): > > -- > \setupsectionblock[bodypart][page=right] > %... > \setuppagenumbering[alternative=doublesided] > \setuplayout[location=doublesided, > backspace=8.5pc,topspace=5.5pc,top=0pt,topdistance=0pt, > header=12pt,headerdistance=12pt,height=61pc,footer=16pt, > bottom=6pc,leftedge=9pc,leftedgedistance=0pt,leftmargin=0pt, > leftmargindistance=0pt,width=29pc,rightmargindistance=0pt, > rightmargin=6.5pc,rightedgedistance=0pt,rightedge=6.5pc] > \setuphead[part] > [placehead=yes,command=\XPart,resetnumber=no,page=right, > header=high,before=,after=] > \def\XPart#1#2{#1 #2} %simplified > \setuphead[chapter] > [command=\XChapter,header=high, > before=\vbox to 14pc\bgroup,after=\vss\egroup] > \def\XChapter#1#2{#1 #2} %simplified > %... > \setupcolors[rgb=no,cmyk=no,spot=yes,state=start] > \definecolor[PantoneTwoNineFour][c=1,m=.56,y=0,k=.18] > \definecolor[IFSblueheadertint][PantoneTwoNineFour][p=.12] > %... > \setupbackgrounds[header] > [leftedge,leftmargin,text,rightmargin,rightedge] > [background=color,backgroundcolor=IFSblueheadertint,state=start] > \setupheader[state=start] > \setupheadertexts[margin] > [] > [\hfill\llap{\tfx\getmarking[chapter][current]}] > [\hbox to \leftmarginwidth{\rlap{\tfx\getmarking[section][last]\hfil}}] > [] > %... > \starttext > \startbodymatter > \part{First part} > Looks good, but still has band on next page > \chapter{First chapter} > Looks good, no band on first page of chapter. \page[yes] > \section{First section} > Looks good, the band is there. \page[yes] > \section{Second section} > Looks good, the band is still there. > \chapter{Second chapter} > Ugh, the band has impinged on my title, and I'm getting an extra odd > page at the end too. > \stopbodymatter > \stoptext > -- > > The above code runs in live.contextgarden.net and demonstrates my > problems, which are: > > 1. The big problem - the second chapter title page doesn't suppress the > band, even though the first one did. NB this behaviour seems to change > depending on whether the previous chapter ends on an odd or even page. > Bug, or incorrect header setup? > > 2. Empty pages (like the back of the part title) have the colour band on > them - how can this be suppressed for empty pages? > > 3. There's an extra odd page at the end (I've tried a few of the > suggested fixes for this but can't get them to work). > > If anyone can answer, especially question 1, I'd be really grateful! you can do a stepwise page change: \setuphead[part][page={yes,blank,right}] \setuphead[chapter][header=high,page={yes,blank,right}] also, in order to let backgrounds adapt to each page, say: \setupbackgrounds[state=repeat] otherwise only text|page backgrounds will be calculated each page and the other ones when backgrounds are set/changed (otherwise too slow) Hans (some day i'll make this nicer) ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------