From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/74614 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Dynamic content on layers - wiki example not working Date: Tue, 21 Feb 2012 12:53:17 +0100 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1329825224 12076 80.91.229.3 (21 Feb 2012 11:53:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 21 Feb 2012 11:53:44 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Feb 21 12:53:36 2012 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 1RzoHo-0003EP-PA for gctc-ntg-context-518@m.gmane.org; Tue, 21 Feb 2012 12:53:36 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 02AF9CB211; Tue, 21 Feb 2012 12:53:36 +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 SLUmODK4+fVU; Tue, 21 Feb 2012 12:53:35 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 12DF0CB226; Tue, 21 Feb 2012 12:53:31 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1EDE1CB226 for ; Tue, 21 Feb 2012 12:53:29 +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 G5QnJjlh08sb for ; Tue, 21 Feb 2012 12:53:23 +0100 (CET) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id 555BBCB211 for ; Tue, 21 Feb 2012 12:53:23 +0100 (CET) Original-Received: from mail-ee0-f41.google.com (mail-ee0-f41.google.com [74.125.83.41]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q1LBrLsF011392 for ; Tue, 21 Feb 2012 12:53:21 +0100 Original-Received: by eekc13 with SMTP id c13so3032700eek.14 for ; Tue, 21 Feb 2012 03:53:21 -0800 (PST) Received-SPF: pass (google.com: domain of schuster.wolfgang@googlemail.com designates 10.14.100.80 as permitted sender) client-ip=10.14.100.80; Authentication-Results: mr.google.com; spf=pass (google.com: domain of schuster.wolfgang@googlemail.com designates 10.14.100.80 as permitted sender) smtp.mail=schuster.wolfgang@googlemail.com; dkim=pass header.i=schuster.wolfgang@googlemail.com Original-Received: from mr.google.com ([10.14.100.80]) by 10.14.100.80 with SMTP id y56mr12991352eef.68.1329825201198 (num_hops = 1); Tue, 21 Feb 2012 03:53:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=xQQC7J/A3UpoRozVIhH7bEpGuL0jEwq3TB2zGW6pitU=; b=EzSOwe1yruaVInDkZrG/OlmWy0tEwztQFB6RdgxFAz2gDdQZ3dTnjOr8w94hTSPCu8 bpuCzYSeNG/w7XAoX30TH+oq56j8z7pb6bitjOW7Ib5/f56UDDCNmES0uKn8LwE5q861 OM+jf3f8HLqOfLbEDwCcAYVp0Ia20+wTJOrGo= Original-Received: by 10.14.100.80 with SMTP id y56mr10375029eef.68.1329825201119; Tue, 21 Feb 2012 03:53:21 -0800 (PST) Original-Received: from [192.168.2.35] (p57AFB738.dip.t-dialin.net. [87.175.183.56]) by mx.google.com with ESMTPS id n56sm89374765eeh.6.2012.02.21.03.53.18 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 21 Feb 2012 03:53:20 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.1257) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.83.41; 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: 0LGAzRlSc - 81d75d64b4f0 - 20120221 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.71 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:74614 Archived-At: Am 21.02.2012 um 12:00 schrieb luigi scarso: > On Tue, Feb 21, 2012 at 11:34 AM, Mari Voipio wrote: >> Hello! >> >> I'm trying to place dynamic content on a layer and now it turns out >> that while getting a different pic every time is easy, getting the >> layers redrawn wasn't that simple. The wiki has this code: >> >> \definelayer >> [pagenumber] >> [width=\paperwidth, >> height=\paperheight, >> preset=middle, >> state=repeat] >> >> \setlayer[pagenumber]{Page \pagenumber} >> >> \setupbackgrounds[page][background=pagenumber] >> >> \starttext >> \dorecurse{4}{\page[empty]} >> \stoptext >> >> >> >> AFAIK, that should be a complete minimal sample. Unfortunately it >> doesn't seem to work, at least my ConTeXt MkIV of February 8 only >> gives "Page 1" on every one of those 4 pages... > right, it's ok >> >> >> How to fix this? Preferably on the "Dummies" level, I'd prefer not to >> see the bowels of my ConTeXt, if I can avoid it. > going on on > http://wiki.contextgarden.net/Layers > you see > > \definelayer > [pagenumber] > [width=\paperwidth, > height=\paperheight, > preset=middle] > > \startsetups layer > > \setlayer[pagenumber]{Page \pagenumber} > > \stopsetups > > \setupbackgrounds[page][setups=layer,background=pagenumber] > > \starttext > \dorecurse{4}{\page[empty]} > \stoptext Here is a slightly different version which is better when you need more dynamic layers. \definelayer [pagenumber][width=\overlaywidth,height=\overlayheight,preset=middle] \defineoverlay[pagenumber][\texsetup{layer}] \startsetups layer \setlayer[pagenumber]{Page \pagenumber} \tightlayer[pagenumber] \stopsetups \setupbackgrounds[page][background=pagenumber] \starttext \dorecurse{4}{\page[empty]} \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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________