From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/81353 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: different page background for chapter title page Date: Sat, 23 Mar 2013 13:27:47 +0100 Message-ID: <514D9FC3.50108@wxs.nl> References: <514D94BF.8000302@uni-bonn.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1364041673 18515 80.91.229.3 (23 Mar 2013 12:27:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 23 Mar 2013 12:27:53 +0000 (UTC) Cc: "Thomas A. Schmitz" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Mar 23 13:28:19 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UJNYY-0007t8-FA for gctc-ntg-context-518@m.gmane.org; Sat, 23 Mar 2013 13:28:18 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 989CF101E3; Sat, 23 Mar 2013 13:27:54 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id qj9S5c0MwsgC; Sat, 23 Mar 2013 13:27:53 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 00040101E4; Sat, 23 Mar 2013 13:27:52 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 79654101E4 for ; Sat, 23 Mar 2013 13:27:51 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id HlPIwjrBJGhi for ; Sat, 23 Mar 2013 13:27:50 +0100 (CET) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id 9C8FF101E3 for ; Sat, 23 Mar 2013 13:27:50 +0100 (CET) Original-Received: from smtp.ziggozakelijk.nl (D57D1DA2.static.ziggozakelijk.nl [213.125.29.162]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r2NCRnvE021593 for ; Sat, 23 Mar 2013 13:27:50 +0100 X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.103; Original-Received: from [10.100.1.103] (unverified [10.100.1.103]) by pragma-net.nl (SurgeMail 6.1c) with ESMTP (TLS) id 12633-1713362 for multiple; Sat, 23 Mar 2013 13:27:47 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.2; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 In-Reply-To: <514D94BF.8000302@uni-bonn.de> X-Authenticated-User: hagen@controller-9 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.125.29.162; country=NL; region=11; city=Den Haag; latitude=52.0833; longitude=4.3000; http://maps.google.com/maps?q=52.0833,4.3000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0QJf0rOoW - 7a0ebadbb70d - 20130323 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:81353 Archived-At: Hi, You know the price you have to pay: wikifying .. \setuplayout [header=0cm, topspace=1.625cm, footer=0cm, width=fit, height=fit] \startMPinclusions numeric MyTitlePageDone[] ; \stopMPinclusions \startuseMPgraphic{background:normal} StartPage ; fill (topboundary Page --cycle) enlarged(0,5mm) shifted (0,-5mm) withcolor \MPcolor{color:background:\namedstructureuservariable{chapter}{mycolor}} ; StopPage ; \stopuseMPgraphic \defineoverlay [background:normal] [\useMPgraphic{background:normal}] \startuseMPgraphic{background:title} if unknown MyTitlePageDone.\namedstructureuservariable{chapter}{mycolor} : StartPage ; fill ((topboundary Page --cycle) enlarged(0,5mm)) shifted (0,-20mm) withcolor \MPcolor{color:title:\namedstructureuservariable{chapter}{mycolor}} ; StopPage ; MyTitlePageDone.\namedstructureuservariable{chapter}{mycolor} := 1 ; fi ; \stopuseMPgraphic \defineoverlay [background:title] [\useMPgraphic{background:title}] \setupbackgrounds [page] [background={background:normal,background:title}] % could be drawn in one go \definecolor [color:title:one] [r=0.86,g=0.88,b=0.76] \definecolor [color:background:one] [.9(color:title:one)] \definecolor [color:title:two] [g=0.86,r=0.88,b=0.76] \definecolor [color:background:two] [.9(color:title:two)] \starttext \startchapter[title=One][mycolor=one] \input tufte \page \input knuth \stopchapter \startchapter[title=Two][mycolor=two] \input tufte \page \input knuth \stopchapter \stoptext Of course more solutions are possible. Btw, watch the topboundary trickery and the fractional color. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________