MPost: how to pass variables from mpost to TeX.
![](https://secure.gravatar.com/avatar/91e7b223de7e67b288b48aed523f4e65.jpg?s=120&d=mm&r=g)
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 just display GbLableName instead of B_2. So can someone please tell how this can be done? I know too little about TeX. Someone suggested about using Textext macro. But my MPost version doesnt have it. So are there any other ways of doing it? Looking forward for it .. Vinuth.M.Madinur. -- ______________________________________________ Check out the latest SMS services @ http://www.linuxmail.org This allows you to send and receive SMS through your mailbox. Powered by Outblaze
![](https://secure.gravatar.com/avatar/6af1f724a401c9f6f746a973f33ff595.jpg?s=120&d=mm&r=g)
Hi,
My mpost doesnt have textext macro. So, what are the other ways of doing it?
Sorry, I thought you were using metafun (since you asked on the ConTeXt mailing list I didn't think of using plain mp) You have to do something like that is described at: http://www.ursoswald.ch/metapost/tutorial/DynamicTeXLabels.html Patrick (I hope I understand your problem right)
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
vinuth madinur wrote:
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 just display “GbLableName” instead of “B_2”.
So can someone please tell how this can be done? I know too little about TeX.
Someone suggested about using “Textext” macro. But my MPost version doesn’t have it. So are there any other ways of doing it?
btex ... etex is scanned by some mp tools and then tex'd; no expansion takes place then, so GBLableName becomes text textext is more clever; why not use metafun then? it has everything metapost + more also, \starttext \startMPpage your code \stopMPpage \stoptext with (texexec --pdf thatfile.tex) will work ok; from within metafun/context you can use text variables (\MPstring and such); see metafun manual 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 -----------------------------------------------------------------
participants (3)
-
Hans Hagen Outside
-
Patrick Gundlach
-
vinuth madinur