From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/80262 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Layer vs. overlay Date: Tue, 15 Jan 2013 11:09:48 +0100 Message-ID: <10BF7AFF-32C7-4C8C-A1C6-538C9EB591EA@gmail.com> References: <3608C682-5ACB-4006-9CC7-9D848CB5BFC0@gmail.com> <37BA1BD5-D127-4A53-887A-92F5C19FF3A0@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1358244593 23153 80.91.229.3 (15 Jan 2013 10:09:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Jan 2013 10:09:53 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Jan 15 11:10:11 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 1Tv3T9-0000kB-Ax for gctc-ntg-context-518@m.gmane.org; Tue, 15 Jan 2013 11:10:11 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A1120101EB; Tue, 15 Jan 2013 11:09: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 lbAL9BgIRcyr; Tue, 15 Jan 2013 11:09:52 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id AFF3A101E5; Tue, 15 Jan 2013 11:09:52 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7BB44101E5 for ; Tue, 15 Jan 2013 11:09: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 V6rIEy1S8kRE for ; Tue, 15 Jan 2013 11:09: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 5D042101E2 for ; Tue, 15 Jan 2013 11:09:50 +0100 (CET) Original-Received: from mail-bk0-f49.google.com (mail-bk0-f49.google.com [209.85.214.49]) by filter2-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r0FA9mnu014617 for ; Tue, 15 Jan 2013 11:09:49 +0100 Original-Received: by mail-bk0-f49.google.com with SMTP id jm19so2491256bkc.22 for ; Tue, 15 Jan 2013 02:09:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=6osJTyXfyTJXXpbb7zbIwF0cIG0yS5hbYcrV1vpwl4U=; b=yq5SETspWAlL++91Cl/d7ySQkMqh0bcZjeb/22Llb67XX90LqIkbwXGLDCI9xGQnS7 OVrtrR3LKQRFHhl7atOetzwYXwKnLUs78e6q7PnyAcFjAfGr1/9h+SYI0aFYa762fGbX QBiZXJj+JP2uGnPkFv46iVp88kiw1DiWGE5pk0yWdOjEl3cF3rJy0rF5Yp+q9TWBWmDJ +L59ZGed006Q6b/4FnSI2UZdMD2CNz2smLnbHgxzzjQZaiUhqSLVxpzPz83/TIqCSplt JDD23jKse0BMSTTfFX58Vy4KXlWuQ58U4sQyHqiq9Wct3mkt0YHWN9EJxx9+efa658yQ 51Sg== X-Received: by 10.204.150.218 with SMTP id z26mr41189893bkv.95.1358244588609; Tue, 15 Jan 2013 02:09:48 -0800 (PST) Original-Received: from keima.localdomain (nrbg-4dbe67b4.pool.mediaWays.net. [77.190.103.180]) by mx.google.com with ESMTPS id z5sm12124002bkv.11.2013.01.15.02.09.47 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 15 Jan 2013 02:09:47 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.1499) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.214.49; 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: 0TIMa9MjU - 3eca023a74e5 - 20130115 (trained as not-spam) 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:80262 Archived-At: Am 15.01.2013 um 09:04 schrieb Proch=E1zka Luk=E1=B9 Ing. - Pontex s. r. o.= : > On Sat, 12 Jan 2013 19:11:47 +0100, Wolfgang Schuster wrote: > = >> Move \definelayer and \setupbackgrounds *before* \startTEXpage because t= he environment creates a local group and you background setup is lost. > = > ... Thanks for the hint - here's my next trial. > = > It should write "BEFORE" to tho top right corner of the page. > = > ---- > \setupbodyfont[30pt] > = > \starttext > A > = > \bgroup > \definelayer[beforetext][width=3D\paperwidth,preset=3Drighttop] > = > \setupbackgrounds > [page] > [background=3D{foreground,beforetext}] > = > \startTEXpage > \setlayer[beforetext]{\framed[width=3D2in]{BEFORE}} > \externalfigure[cow][width=3D30cm] > \stopTEXpage > \egroup > = > Z > \stoptext > ---- > = > The problem now is the layer "beforetext" has width of the page in the mo= ment is is defined - 21 cm. > = > But the layer is supposed to be used later inside \start/stop-TEXpage who= se page size may be arbitrary, or better, the size will result from the con= tent it will contain. > = > In my example - an image of 30 cm width is to define the page size. > = > And the text "BEFORE" is not put to the top right corner of the (30 cm) p= age (what I'd like to achieve) but to cca 2 thirds of these 30 cm (given by= \pagewidth which was 21 cm at the moment of definition). > = > I would probably need a way to alter the layer size to the current conten= t... > = > Or any other way to place something to the top right corner of the page f= rom within \start/stop-TEXpage, where page size is not known in advance? \setupbodyfont[30pt] \starttext A \definelayer [beforetext][width=3D\overlaywidth,height=3D\overlayheight] \defineoverlay[beforetext][{\setups[beforetext]\tightlayer[beforetext]}] \startsetups[beforetext] \setlayer[beforetext][preset=3Drighttop]{\framed[width=3D2in]{BEFORE}} \stopsetups \startTEXpage[background=3D{foreground,beforetext}] \externalfigure[cow][width=3D30cm] \stopTEXpage Z \stoptext A similar example is also on the wiki: http://wiki.contextgarden.net/Layers= #Place_labels_on_pictures Wolfgang ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________