From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/16090 Path: main.gmane.org!not-for-mail From: Floris van Manen Newsgroups: gmane.comp.tex.context Subject: metafun question Date: Mon, 16 Aug 2004 13:27:56 +0200 Sender: ntg-context-bounces@ntg.nl Message-ID: <687871799.20040816132756@klankschap.nl> References: <41133589.2070807@gmx.de> <41133396.6090009@wxs.nl> <411383D1.90501@gmx.de> <4117D780.6000901@wxs.nl> <411C7C2A.3080605@gmx.de> Reply-To: Floris van Manen , mailing list for ConTeXt users NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1092655708 21208 80.91.224.253 (16 Aug 2004 11:28:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 16 Aug 2004 11:28:28 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Mon Aug 16 13:28:19 2004 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Bwff1-00068i-00 for ; Mon, 16 Aug 2004 13:28:19 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1F48312784; Mon, 16 Aug 2004 13:28:18 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 16518-01; Mon, 16 Aug 2004 13:28:14 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 339D312778; Mon, 16 Aug 2004 13:28:14 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8A6A312778 for ; Mon, 16 Aug 2004 13:28:12 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 15286-05 for ; Mon, 16 Aug 2004 13:28:11 +0200 (CEST) Original-Received: from smtp-vbr3.xs4all.nl (unknown [194.109.24.23]) by ronja.ntg.nl (Postfix) with ESMTP id 9581F12772 for ; Mon, 16 Aug 2004 13:28:11 +0200 (CEST) Original-Received: from vm.lan (213-84-11-60.adsl.xs4all.nl [213.84.11.60]) by smtp-vbr3.xs4all.nl (8.12.11/8.12.11) with ESMTP id i7GBSBZQ071185 for ; Mon, 16 Aug 2004 13:28:11 +0200 (CEST) (envelope-from vm@klankschap.nl) X-Mailer: The Bat! (v2.10.01) Personal X-Priority: 3 (Normal) Original-To: mailing list for ConTeXt users In-Reply-To: <411C7C2A.3080605@gmx.de> X-Virus-Scanned: by XS4ALL Virus Scanner X-Virus-Scanned: by amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 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 X-Virus-Scanned: by amavisd-new at ntg.nl Xref: main.gmane.org gmane.comp.tex.context:16090 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:16090 it seems that metafun has difficulty understanding the example using the vardef self@# expr p = construct. ! Illegal parameter number in definition of \@MPG@dummy2. ... p of p enddef; \par vardef self@## expr p = cuta(@##,@##) @##... \dostartuseMPgraphic ...leuseMPgraphic {#1}{#2}{#3 }}\elabelgroup l.41 \stopuseMPgraphic why? i copied the sample of the mp manual: % interface=english output=pdftex \starttext \startuseMPgraphic{dummy2} vardef cuta(suffix a,b) expr p = drawarrow p cutbefore bpath.a cutafter bpath.b; point .5*length p of p enddef; vardef self@# expr p = cuta(@#,@#) @#.c{curl0}..@#.c+p..{curl0}@#.c enddef; beginfig(52); verbatimtex \def\stk#1#2{$\displaystyle{\matrix{#1\cr#2\cr}}$} etex circleit.aa(btex\strut Start etex); aa.dx=aa.dy; circleit.bb(btex \stk B{(a|b)^*a} etex); circleit.cc(btex \stk C{b^*} etex); circleit.dd(btex \stk D{(a|b)^*ab} etex); circleit.ee(btex\strut Stop etex); ee.dx=ee.dy; numeric hsep; bb.c-aa.c = dd.c-bb.c = ee.c-dd.c = (hsep,0); cc.c-bb.c = (0,.8hsep); xpart(ee.e - aa.w) = 3.8in; drawboxed(aa,bb,cc,dd,ee); label.ulft(btex$b$etex, cuta(aa,cc) aa.c{dir50}..cc.c); label.top(btex$b$etex, self.cc(0,30pt)); label.rt(btex$a$etex, cuta(cc,bb) cc.c..bb.c); label.top(btex$a$etex, cuta(aa,bb) aa.c..bb.c); label.llft(btex$a$etex, self.bb(-20pt,-35pt)); label.top(btex$b$etex, cuta(bb,dd) bb.c..dd.c); label.top(btex$b$etex, cuta(dd,ee) dd.c..ee.c); label.lrt(btex$a$etex, cuta(dd,bb) dd.c..{dir140}bb.c); label.bot(btex$a$etex, cuta(ee,bb) ee.c..tension1.3 ..{dir115}bb.c); label.urt(btex$b$etex, cuta(ee,cc) ee.c{(cc.c-ee.c)rotated-15}..cc.c); endfig; \stopuseMPgraphic \useMPgraphic{dummy2} \stoptext //floris