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
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
Hi everyone,
My mpost doesnt 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
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
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
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[
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
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