From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/49058 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Background for current page only Date: Sat, 4 Apr 2009 10:45:09 +0200 Message-ID: <7E51A017-C3EE-4CDD-8203-50ECA14C415D@gmail.com> References: <20090403205435.GA28996@khaled-laptop> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: text/plain; charset="us-ascii"; Format="flowed"; DelSp="yes" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1238834839 29086 80.91.229.12 (4 Apr 2009 08:47:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 Apr 2009 08:47:19 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Apr 04 10:48:37 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 1Lq1YI-0005gO-OJ for gctc-ntg-context-518@m.gmane.org; Sat, 04 Apr 2009 10:48:34 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id AFC441FBAC; Sat, 4 Apr 2009 10:47:08 +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 16300-04; Sat, 4 Apr 2009 10:46:20 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B44821FB71; Sat, 4 Apr 2009 10:46:20 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B0C011FB71 for ; Sat, 4 Apr 2009 10:46:19 +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 14028-01 for ; Sat, 4 Apr 2009 10:46:09 +0200 (CEST) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by ronja.ntg.nl (Postfix) with ESMTP id 51B671FB6B for ; Sat, 4 Apr 2009 10:46:09 +0200 (CEST) Original-Received: from mail-fx0-f176.google.com (mail-fx0-f176.google.com [209.85.220.176]) by filter2-til.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n348k8ad024183 for ; Sat, 4 Apr 2009 10:46:08 +0200 Original-Received: by fxm24 with SMTP id 24so1385320fxm.2 for ; Sat, 04 Apr 2009 01:46:08 -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=PVMHI0yJjrUj1SdAuRq66koFJ8du9RxRDmSki1dv5sg=; b=NtZKZtRgNUpOd/KRNazfaAWErIguDR6ZO4ZRMt/Co7PvnBSGjSGV+cmfU6tMU33Trk Qt65c9Z3BY9KofXqvqIw/9affz/+cJohRXRb7kMttSLQ5i7Su2rbHneh+eH0L+2+i4P1 Oq/oAemvnZijLI2HHxnn/uZ7zXMK9eNqh3z7M= 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=cdFki71Qi5vEPIcOl7ZGZuPjJDQ7YJqo7J86FTHljIcmpmZ1f2PpCiHB2kfP8putGh rEg9Wt8X0nvl3kh8doHfw4tIuQvqvS2kyhR/lCBX2fM98qEwaA/wUa5pX6BbLhjJtWb1 ZbHvNSDFqZCzOAjm50ApCzksCPQvZ+KLOPGEI= Original-Received: by 10.86.31.18 with SMTP id e18mr1568581fge.72.1238834768244; Sat, 04 Apr 2009 01:46:08 -0700 (PDT) Original-Received: from ?192.168.2.23? (p5B294844.dip.t-dialin.net [91.41.72.68]) by mx.google.com with ESMTPS id 3sm4746580fge.4.2009.04.04.01.46.02 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 04 Apr 2009 01:46:07 -0700 (PDT) In-Reply-To: <20090403205435.GA28996@khaled-laptop> X-Mailer: Apple Mail (2.930.3) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.220.176; 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: 203797460 - a2a1b5f6aab6 - 20090404 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.218 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:49058 Archived-At: Am 03.04.2009 um 22:54 schrieb Khaled Hosny: > How to set a background for the current page only? \setupbackgrounds > sets backgrounds for all pages, I don't seem to find a way to turn it > on/off for certain pages (\setupbackgrounds[state=start/stop] has no > effect). Tricky thing, here is a (not so) quick and dirty solution. \unprotect \let\!!savedbackgroundcolor\empty \def\onbackground {\globallet\@@mapagebackgroundcolor\!!savedbackgroundcolor} \def\offbackground {\globallet\!!savedbackgroundcolor\@@mapagebackgroundcolor \globalletempty\@@mapagebackgroundcolor} \def\nobackground {\globallet\@@mapagebackgroundcolor\!!savedbackgroundcolor \globalletempty\@@mapagebackgroundcolor \appendtoks\globallet\@@mapagebackgroundcolor\!! savedbackgroundcolor\to\afterpage} \def\gobackground {\globallet\@@mapagebackgroundcolor\!!savedbackgroundcolor \appendtoks\globalletempty\@@mapagebackgroundcolor\to\afterpage} \protect \setupcolors[state=start] \setupbackgrounds[page][background=color,backgroundcolor=lightgray] \offbackground \starttext \input tufte \page \gobackground \input tufte \page \input tufte \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 ___________________________________________________________________________________