From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/81350 Path: news.gmane.org!not-for-mail From: "Thomas A. Schmitz" Newsgroups: gmane.comp.tex.context Subject: different page background for chapter title page Date: Sat, 23 Mar 2013 12:40:47 +0100 Message-ID: <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 1364038853 27356 80.91.229.3 (23 Mar 2013 11:40:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 23 Mar 2013 11:40:53 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Mar 23 12:41:20 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 1UJMp5-0006HG-U3 for gctc-ntg-context-518@m.gmane.org; Sat, 23 Mar 2013 12:41:20 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0A657101EB; Sat, 23 Mar 2013 12:40:56 +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 ORB3BoTrfavM; Sat, 23 Mar 2013 12:40:53 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 565D8101E4; Sat, 23 Mar 2013 12:40:53 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1390B101E4 for ; Sat, 23 Mar 2013 12:40: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 BSDX1ds2q+TQ for ; Sat, 23 Mar 2013 12:40:50 +0100 (CET) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by balder.ntg.nl (Postfix) with ESMTP id 14EAD101E3 for ; Sat, 23 Mar 2013 12:40:49 +0100 (CET) Original-Received: from uni-bonn.de (mail.uni-bonn.de [131.220.15.113]) by filter2-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r2NBemvl020037 for ; Sat, 23 Mar 2013 12:40:49 +0100 Original-Received: from [87.178.52.112] (account tschmit1@uni-bonn.de HELO localhost.localdomain) by fe2.uni-bonn.de (CommuniGate Pro SMTP 5.4.9) with ESMTPSA id 40417394 for ntg-context@ntg.nl; Sat, 23 Mar 2013 12:40:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 X-Bayes-Prob: 0.9964 (Score 4.7, tokens from: @@RPTN) X-CanIt-Geo: ip=131.220.15.113; country=DE; region=07; city=Bonn; postalcode=53115; latitude=50.7333; longitude=7.1000; http://maps.google.com/maps?q=50.7333,7.1000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0TJeXEN03 - 0aa9cfb372bb - 20130323 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.218 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:81350 Archived-At: Hi all, I'm sure there must be a solution for this, but I haven't been able to find it yet: I want my chapter titles typeset in a sort of frame which will span the entire page, not only the text area, so I guess the easiest way to do that would be a page background. How can I set up a background that will appear only on the title page, in addition to the regular background? Bonus question: I also want the color schemes of both backgrounds to be different in every chapter, so the solution should make this possible. The example is a bit silly, but it shows what I'm looking for, I hope. Thanks, and all best Thomas \setuplayout [header=0cm, topspace=1.625cm, footer=0cm, width=fit, height=fit] \definecolor [color:background] [r=0.86,g=0.61,b=0.54] \definecolor [color:title] [r=0.91,g=0.75,b=0.7] \startuseMPgraphic{background:normal} StartPage ; numeric h ; h = 10mm ; z[1] = ulcorner Page ; z[2] = urcorner Page ; z[3] = z[2] shifted (0, -h) ; z[4] = z[1] shifted (0, -h) ; path p ; p = z[1] -- z[2] -- z[3] -- z[4] -- cycle ; fill p withcolor \MPcolor{color:background} ; StopPage ; \stopuseMPgraphic \defineoverlay [background:normal] [\useMPgraphic{background:normal}] \startuseMPgraphic{background:title} StartPage ; numeric h ; h = 10mm ; z[1] = ulcorner Page shifted (0, -1.5*h) ; z[2] = urcorner Page shifted (0, -1.5*h); z[3] = z[2] shifted (0, -h) ; z[4] = z[1] shifted (0, -h) ; path p ; p = z[1] -- z[2] -- z[3] -- z[4] -- cycle ; fill p withcolor \MPcolor{color:title}; StopPage ; \stopuseMPgraphic \defineoverlay [background:title] [\useMPgraphic{background:title}] \setupbackgrounds[page][background={background:normal,background:title}] \starttext \startchapter[title=One] \input tufte \page \input knuth \stopchapter \startchapter[title=Two] \definecolor [color:background] [r=0.82,g=0.85,b=0.68] \definecolor [color:title] [r=0.86,g=0.88,b=0.76] \input tufte \page \input knuth \stopchapter \stoptext ___________________________________________________________________________________ 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 ___________________________________________________________________________________