[NTG-context] Two level declaration using "vardef".

2004-06-20 Thread vinuth madinur
Hello everybody, One small query (:-} In a two level definition like: def test(expr p)= __temp_call(p) enddef; def __temp_call(expr p)(text t)= enddef; so as to allow definitions for macros like "draw". Now, I want to have a macro similar to "draw" but also I want

[NTG-context] Re: ntg-context digest, Vol 1 #784 - 10 msgs

2004-06-15 Thread vinuth madinur
Hello everybody, Thanks for helping me solve the problem. It was wonderful seeing the metafun manual. One more query : In a two level definition like: def test(expr p)= __temp_call(p) enddef; def __temp_call(expr p)(text t)= enddef; so as to allow definitions for macros like "dr

[NTG-context] MPost: how to pass variables from mpost to TeX.

2004-06-13 Thread vinuth madinur
Hi everyone, My mpost doesn’t have “textext” macro. So, what are the other ways of doing it? What I want to do is this : %I have a variable “GbLableName” GbLableName=”B_2”; %Now I want to use this variable like this: lable.bot( btex GbLableName etex , (0,0) ); But this will jus

[NTG-context] MPOST: How to pass variables from mpost to TeX

2004-06-11 Thread vinuth madinur
Hello all, Please see the following code: GbLabelName="Gubbi"; . . . label.bot(btex $GbLabelName$ etex, (0,0) ); .Here I get "GbLabelName" itself in the output instead of "Gubbi". I tried using "\GbLabelName"  and also "\scantokens\GbLabelName" instead of just "GbLabelName" , but they give errors

[NTG-context] Re: help required w.r.t " vardef "

2004-04-14 Thread vinuth madinur
I'm sorry that I hadn't read the mail by Jonathan Nicholl. Yeah, that was very clear and precise . thank u all. But I still can't figure out how I can have the contents of variables or the expansion of "def" as suffixes.I now think it's not possible with "def". I'll try out somethings now. Than

[NTG-context] Re: help required w.r.t " vardef "

2004-04-14 Thread vinuth madinur
Thanks Hans! That wolud help me a lot.Also thanks for the reference u mentioned.I'll try it. Now one last thing : Is there a way of having variable arrays whose contents can be used as "suffixes"? something like , a[0]:= "A" ; a[1]:= "B" ; a[2]:= "C" ; %a variable array "a[

[NTG-context] Re: help required w.r.t " vardef "

2004-04-09 Thread vinuth madinur
Thankx Hans, But why does this work with "def" and not with "vardef" . "list" is just a macro name i've used. And "A,B,C,A" is just the replacement text I want when I call the macro "list". Is there any other way of doing this? Vinuth. -- __ Check o

[NTG-context] help required w.r.t " vardef " in mpost.

2004-04-06 Thread vinuth madinur
In the following code : vardef list = A , B , C , A enddef; def triangle = forsuffixes $=list: pair T.$; endfor; enddef; beginfig(1) triangle; T.A = (2,3); T.B = (3,5); T.C = (2,6); T = T.A -- T.B -- T.C -- cycle; draw T; endfig; end; In macro "list" if i give just