From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/29954 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: TeX trigger in MP macro Date: Fri, 04 Aug 2006 01:01:06 +0200 Message-ID: <44D28032.4010902@wxs.nl> References: <44D1EC33.9030203@gmx.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1154646084 26429 80.91.229.2 (3 Aug 2006 23:01:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 3 Aug 2006 23:01:24 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Fri Aug 04 01:01:21 2006 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 ciao.gmane.org with esmtp (Exim 4.43) id 1G8mBs-0006X7-Et for gctc-ntg-context-518@m.gmane.org; Fri, 04 Aug 2006 01:01:20 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4D0B91FF65; Fri, 4 Aug 2006 01:01: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 24038-02-3; Fri, 4 Aug 2006 01:01:13 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 001401FF14; Fri, 4 Aug 2006 01:01:12 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C0AC61FF14 for ; Fri, 4 Aug 2006 01:01:09 +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 24038-02-2 for ; Fri, 4 Aug 2006 01:01:08 +0200 (CEST) Original-Received: from mail.pragma-ade.net (dsl-083-247-100-017.solcon.nl [83.247.100.17]) by ronja.ntg.nl (Postfix) with SMTP id 4AA4E1FE68 for ; Fri, 4 Aug 2006 01:01:08 +0200 (CEST) Original-Received: from [10.100.1.102] (unverified [10.100.1.102]) by controller-1 (SurgeMail 3.5b3) with ESMTP id 31351 for ; Fri, 04 Aug 2006 01:01:08 +0200 User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) Original-To: mailing list for ConTeXt users In-Reply-To: <44D1EC33.9030203@gmx.net> X-Server: High Performance Mail Server - http://surgemail.com r=-274017400 X-Authenticated-User: hagen@controller-1 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 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:29954 Archived-At: Peter Rolf wrote: > Hi all, > > Currently I am using > > \startuniqueMPgraphic{foo} > ... > if (\DbgFill=0) : > fill whatever > fi > ... > \stopuniqueMPgraphic > > in my MP graphics. \DbgFill (0|1) is just a trigger, which prevents > filling in case of visual debugging. Instead of always writing this > 'long' form, it should be possible to use a self written mp-macro > instead. But my naive approach > > def dbg_fill (expr p) = > if (\DbgFill=0) : > fill p ; > fi > enddef ; > > doesn't work. I get > > >>> DbgFill >>> > ! Unknown relation will be considered false. > > > How do I realize this trigger inside pure MP code and set it outside in > TeX? The trigger should be global and can change during runtime. Any > help is welcome. > can you make a test file? Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------