From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/80604 Path: news.gmane.org!not-for-mail From: Ingo Hohmann Newsgroups: gmane.comp.tex.context Subject: deferred variable lookup in environment? Date: Sat, 02 Feb 2013 00:09:51 +0100 Message-ID: <510C4B3F.5080304@ingohohmann.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 1359760213 23818 80.91.229.3 (1 Feb 2013 23:10:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 1 Feb 2013 23:10:13 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Feb 02 00:10:33 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 1U1Pkb-0002tg-UB for gctc-ntg-context-518@m.gmane.org; Sat, 02 Feb 2013 00:10:30 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 46FEB1022F; Sat, 2 Feb 2013 00:10:11 +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 RNEFgJlJIVN2; Sat, 2 Feb 2013 00:10:05 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 141C31021D; Sat, 2 Feb 2013 00:10:05 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 978B81021D for ; Sat, 2 Feb 2013 00:10:02 +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 aCRpSInuKO0m for ; Sat, 2 Feb 2013 00:09:59 +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 D9D6110218 for ; Sat, 2 Feb 2013 00:09:59 +0100 (CET) Original-Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r11N9xCr023013 for ; Sat, 2 Feb 2013 00:09:59 +0100 Original-Received: from [192.168.178.135] (p5DC0C049.dip0.t-ipconnect.de [93.192.192.73]) by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis) id 0MY6Rk-1UWC9J2zpo-00V9mQ; Sat, 02 Feb 2013 00:09:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 X-Provags-ID: V02:K0:Ic2hiIrsfxSCxkViQCsvr6YWYyog7hu6tlFdVvNJ9vO C2tOIG9moUK44YgORHMAX1iEGXXGPNyqpCJkV/71htGmzuq6tZ /KMQXP1qojGLz+gwbN0vVtmtuA8IhB1skmtJdbeUW1LuXkzj+p A6X2NQt/dAzEVbky3he1AjslN+yYcFMH8fcX05ayfhAEQzPa0W NnztJNSA0BXkASpw1jinWwxiUNnG3rxuj+JwYiwTeMI9Zn3L1c +SBPsnrLETjeSz515XanZ4gOGGMAndSrp8Zm51Hb8mJr4wOVNy wMn6B7ERp+qN/d7J62sTjM44Pib62AsPedqenzWemvGAFfUL1r 3nox/JyoVV9CtOrwnhVPvqU+7XELNwOnSUrw8dUe+ X-Bayes-Prob: 0.9999 (Score 4.7, tokens from: @@RPTN) X-CanIt-Geo: ip=212.227.126.187; country=DE; latitude=51.0000; longitude=9.0000; http://maps.google.com/maps?q=51.0000,9.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 03ITb9X7u - b981e230940a - 20130202 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.71 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:80604 Archived-At: Hi, sorry if the subject is misleading, I'm not sure how to say it in few words. I'm trying to have the date in a layer in an environment. In the text using the environment, I want to be able to set the date. If the date is not set, the current date should be used, otherwise the set date. This is what I've tried, but it is always the currentdate, that is displayes. Environment file: \def\mydate{} \definelayer[firstpage] % name of the layer [x=0mm, y=0mm, % from upper left corner of paper width=\paperwidth, height=\paperheight] % let the layer cover the full paper \setlayer[firstpage] % name of the layer [hoffset=14cm, voffset=3.5cm] % placement (from upper left corner of the layer) {\framed[frame=on, width=4cm, height=2cm]{ % always shows \currentdate \doiftextelse{\mydate}{\mydate}{\currentdate} }} \setupbackgrounds[page][background={firstpage}] File using this environment: \environment[testenv] \def\mydate{2011-11-11} \starttext % this shows the value from mydate \doiftextelse{\mydate}{\mydate}{\currentdate} \stoptext Is it possible to get \mydate in the layer? Kind regards, Ingo ___________________________________________________________________________________ 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 ___________________________________________________________________________________