Hi, How can I replace the following textext code to use sometxt? \startMPpage numeric u ; u := 1cm ; for i = 0 upto 5: dotlabel.bot(textext("$X_{" & decimal(i+1) & "}"), (i*u,0)); endfor ; \stopMPpage Also is sometxt supposed to be a replacement for textext in the long run? Thanks Aditya
On 6/23/06, Aditya Mahajan wrote:
Hi,
How can I replace the following textext code to use sometxt?
\startMPpage numeric u ; u := 1cm ; for i = 0 upto 5: dotlabel.bot(textext("$X_{" & decimal(i+1) & "}"), (i*u,0)); endfor ; \stopMPpage
I don't know if there's any shortcut to it (textext seems to be easier to write in your case), but according to Hans's examples: \starttext \startTeXtexts \dostepwiserecurse{6}{1}{-1}{\TeXtext{\recurselevel}{$U_{\recurselevel}$}} \stopTeXtexts \startMPpage numeric u ; u := 1cm ; for i = 0 upto 5: dotlabel.bot(sometxt(i+1), (i*u,0)); endfor ; \stopMPpage \stoptext
Also is sometxt supposed to be a replacement for textext in the long run?
Left to Hans to answer ... I would say that textext won't disapper, but in the current implementation \sometxt might be ten times faster for lots of tables. Btw: try to use some complex math or double quotes inside textext. Mojca
Aditya Mahajan wrote:
Hi,
How can I replace the following textext code to use sometxt?
\startMPpage numeric u ; u := 1cm ; for i = 0 upto 5: dotlabel.bot(textext("$X_{" & decimal(i+1) & "}"), (i*u,0)); endfor ; \stopMPpage
you cannot, since \sometxt is expanded this is what textext is about, collect stuff in loops and so
Also is sometxt supposed to be a replacement for textext in the long run?
actually, this is what started the processo fcooking up a variant; i have been playing with (a still very alpha version) of luatex and piping the mp graphics into a pending mp session; this means that one can gets mp support in context with only 1 (sic) mp run. Although taco, fabrice and I got it kind of working we're still breeding on better things than pipes since there are tricky sync problems involved. So, maybe next year ... (well, the demo was impressive: run time graphics nearly as fast as with an intermediate mp run) 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)
-
Aditya Mahajan
-
Hans Hagen
-
Mojca Miklavec