From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/71236 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Stefan_M=FCller?= Newsgroups: gmane.comp.tex.context Subject: MetaObj with labels in built-in objects (MetaObj Standard Library) Date: Tue, 20 Sep 2011 15:25:38 +0200 Message-ID: <4E789452.2050807@gmx.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1316525188 2646 80.91.229.12 (20 Sep 2011 13:26:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 20 Sep 2011 13:26:28 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Sep 20 15:26:21 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R60L6-0000LN-Qn for gctc-ntg-context-518@m.gmane.org; Tue, 20 Sep 2011 15:26:21 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6EEDDCAFAC; Tue, 20 Sep 2011 15:26:19 +0200 (CEST) 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 wcA2Pu-1kTIl; Tue, 20 Sep 2011 15:26:08 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id AAC28CAFA9; Tue, 20 Sep 2011 15:26:08 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5A390CAFA9 for ; Tue, 20 Sep 2011 15:26:06 +0200 (CEST) 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 mMa47P7T6nuC for ; Tue, 20 Sep 2011 15:25:55 +0200 (CEST) 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 C5913CAFA8 for ; Tue, 20 Sep 2011 15:25:54 +0200 (CEST) Original-Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by filter2-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with SMTP id p8KDPpOu025810 for ; Tue, 20 Sep 2011 15:25:54 +0200 Original-Received: (qmail invoked by alias); 20 Sep 2011 13:25:51 -0000 Original-Received: from 89-186-152-249.dynamic.primacom.net (EHLO [192.168.100.108]) [89.186.152.249] by mail.gmx.net (mp018) with SMTP; 20 Sep 2011 15:25:51 +0200 X-Authenticated: #11064435 X-Provags-ID: V01U2FsdGVkX1+dwWpwCtOdoSGOhKLQ82K35ixh05hE/w/I2svB64 8dwm3NzCFAqpWV User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 X-Y-GMX-Trusted: 0 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.165.64.22; 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: 0bFz1pPPs - 8029b6df7ab0 - 20110920 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.218 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:71236 Archived-At: Hi list, some time ago I posted on this list about problems with MetaObj in ConTeXt when using labels. There's a wiki article about this now [1]. Just recently I was forced to notice that this solution does not work when the label to be drawn is part of the object definition. So the example from [1] works fine with the added boolean flag, but the following example (which means basically all built-in MetaObj objects with text) does not. It compiles well but there is no text. --8<--------------------start--------------------8<-- \startMPinclusions[+] input metaobj; boolean firstrun; firstrun := true; \stopMPinclusions \startMPpage if firstrun: newBox.a(\sometxt{Text}); a.c = origin; fi; drawObj(a); firstrun := false; \stopMPpage -->8--------------------stop-------------------->8-- I'm out of ideas how to fix this. I tried putting the text into a separate pictrue variable and use this in "newBox". In addition, I thought it should be possible to modify metaobj.mp to check for a boolean variable (e.g. "firstrun") and let the macros there react to its value accordingly , but I always got either no text or errors. I can draw the picture I wanted to get in the first place with plain MetaFun, but I thought MetaObj would be even more "fun". Now I'm very curious if someone on this list can come up with something. I think it would be great if MetaObj could be fully used within ConTeXt. Thanks in advance for taking the time to think about this and any hints! Kind regards, Stefan. [1] http://wiki.contextgarden.net/MetaObj_and_Labels ___________________________________________________________________________________ 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 ___________________________________________________________________________________