ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Floris van Manen <vm@klankschap.nl>
Subject: metafun question
Date: Mon, 16 Aug 2004 13:27:56 +0200	[thread overview]
Message-ID: <687871799.20040816132756@klankschap.nl> (raw)
In-Reply-To: <411C7C2A.3080605@gmx.de>

it seems that metafun has difficulty understanding the example using
the    vardef self@# expr p =   construct.


! Illegal parameter number in definition of \@MPG@dummy2.
<to be read again> 
                    
<argument> ... 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

  parent reply	other threads:[~2004-08-16 11:27 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-06  7:38 Is there a bug during pagination of external figures? Stefan Wachter
2004-08-06  7:30 ` Hans Hagen
2004-08-06 13:06   ` Stefan Wachter
2004-08-06 13:12   ` Stefan Wachter
2004-08-06 12:55     ` Hans Hagen
2004-08-09 19:58     ` Hans Hagen
2004-08-13  8:30       ` Stefan Wachter
2004-08-13 14:57         ` Patrick Gundlach
2004-08-16 15:53           ` Stefan Wachter
2004-08-16 15:26             ` Patrick Gundlach
2004-08-16 20:29               ` REALLY STRANGE: (was: Is there a bug during pagination of external figures?) Stefan Wachter
2004-08-18  9:50                 ` error with _ in header? Patrick Gundlach
2004-08-18 11:24                   ` Eros Albertazzi
2004-08-18 14:19                     ` Hans Hagen
2004-08-18 12:23                   ` Stefan Wachter
2004-08-18 11:43                     ` Patrick Gundlach
2004-08-18 14:59                   ` Hans Hagen
2004-08-18 18:10                     ` Patrick Gundlach
2004-08-19  8:49                       ` Hans Hagen
2004-08-19 10:51                         ` Patrick Gundlach
2004-08-19 15:08                         ` Stefan Wachter
2004-08-19 14:40                           ` Hans Hagen
2004-08-19 14:40                           ` Hans Hagen
2004-08-16 21:28               ` Re: Is there a bug during pagination of external figures? Hans Hagen
2004-08-19  9:19                 ` Stefan Wachter
2004-08-19  9:07                   ` Hans Hagen
2004-08-19 15:50                     ` Stefan Wachter
2004-08-19 16:33                       ` Hans Hagen
2004-08-16 11:27         ` Floris van Manen [this message]
2004-08-16 13:46           ` metafun question Hans Hagen
2004-08-16 11:41         ` metafun question getting XY Floris van Manen
2004-08-16 13:45           ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=687871799.20040816132756@klankschap.nl \
    --to=vm@klankschap.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).