From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/50725 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: two newbie questions (about conditional processing) Date: Sat, 23 May 2009 19:34:55 +0200 Message-ID: References: <68bfdc900905201825w1e8aee29ibd1ec946dd733b83@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v935.3) Content-Type: text/plain; charset="us-ascii"; Format="flowed"; DelSp="yes" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1243100202 30361 80.91.229.12 (23 May 2009 17:36:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 23 May 2009 17:36:42 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat May 23 19:36:35 2009 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 1M7v98-0004uc-MS for gctc-ntg-context-518@m.gmane.org; Sat, 23 May 2009 19:36:34 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id F3DB31FEEC; Sat, 23 May 2009 19:36:33 +0200 (CEST) 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 23118-06-2; Sat, 23 May 2009 19:35:44 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id CFBDD1FEB8; Sat, 23 May 2009 19:35:43 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 00C851FEB8 for ; Sat, 23 May 2009 19:35:41 +0200 (CEST) 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 25610-02 for ; Sat, 23 May 2009 19:35:28 +0200 (CEST) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by ronja.ntg.nl (Postfix) with ESMTP id 9C9841FEB5 for ; Sat, 23 May 2009 19:35:28 +0200 (CEST) Original-Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.155]) by filter1-til.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n4NHZRbi006911 for ; Sat, 23 May 2009 19:35:28 +0200 Original-Received: by fg-out-1718.google.com with SMTP id e21so738435fga.8 for ; Sat, 23 May 2009 10:35:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=hR7f+YmeVpE+L73dnuM/60ZwIJXP/B7lOehCvkTc67w=; b=prq51OTdxUDvXHX+VquizulPDNbwKR1oeoiRBuzuwBc+nqiNxJ6s2vgGjTLEYbbOK5 /CyALt04kZ2jKcslKeygyJYIsaelKK9mWe4zN0KWrdk7UtFAWBsjBOMZQcawrKQDYVHs gQnzSjQQXKAXLc4uZldRWeaqMkJqiqUGz8VQw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=fdDh0Hl0jR6i9ikmAujNjWgHdrDfMU9kXHBfz3VXXvIiW1jy9+74ZyCvoT32ZiLFNR Dg0+mBURx/gmE7/vIC/OHaVvtC/KuNvfSGmBO7lbmNLBBz0BRmU5gF0n3+GgFcbaxRK4 2OLyrSdT6ei00d1xJXaQT40tMY7+OiJ5sbRzE= Original-Received: by 10.86.36.11 with SMTP id j11mr4135518fgj.56.1243100127364; Sat, 23 May 2009 10:35:27 -0700 (PDT) Original-Received: from ?10.40.137.22? ([82.113.121.152]) by mx.google.com with ESMTPS id 12sm7449497fgg.10.2009.05.23.10.35.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 23 May 2009 10:35:26 -0700 (PDT) In-Reply-To: <68bfdc900905201825w1e8aee29ibd1ec946dd733b83@mail.gmail.com> X-Mailer: Apple Mail (2.935.3) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=72.14.220.155; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 230427581 - a5ffc400bcd0 - 20090523 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 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:50725 Archived-At: Am 21.05.2009 um 03:25 schrieb Yue Wang: > Hi, > > I have a new book to design, but I don't know how to do page/content > conditional processing). Please help me:) > > - I want my chapter page (first page of each chapter) to be really > distinctive. that is, I define a dark color background, and want all > the text on the first page set in white. how can I do that? for > example > \chapter{hello} > \dorecurse{10}{\input zapf } % all the characters in the first page > should white, others should set in black. Took me a while but with the help of the MkII/IV manual I was able to implement the chapter layout. \enableattributeinheritance \newif\ifchapterpage \installpagehandler{color}% {\dowithnextbox {\ifchapterpage \actualshipout {\framed[background=color,backgroundcolor=black,foregroundcolor=white] {\attributedbox\nextbox}} \else \actualshipout{\flushnextbox} \fi\global\chapterpagefalse} \normalhbox} \starttext \setuppaper[method=color] \subject{Tufte}\chapterpagetrue \dorecurse{10}{\input tufte\par} \page \setuppaper[method=color] \subject{Knuth}\chapterpagetrue \dorecurse{10}{\input knuth\par} \stoptext Wolfgang ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________