![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
On 2/13/2017 11:36 PM, Sergey Slyusarev wrote:
It's a single tex run so you can do: \starttext \newbox\MyMpBox \setbox\MyMpBox\hbox{foo} \startMPcode draw textext("\copy\MyMpBox") ; \stopMPcode \startMPcode draw textext("\copy\MyMpBox") rotated 45; \stopMPcode \stoptext
This is not much different from:
\starttext
\startMPinclusions
string t;
t := "foo";
\stopMPinclusions
\startMPcode
draw textext(t);
\stopMPcode
\startMPcode
draw textext(t) rotated 45;
\stopMPcode
\stoptext
but the problem was not with passing just text, but with more complex images that may or may not contain text, without specifically addressing text after image is defined.
\starttext \startMPinclusions vardef my_text_t = textext("foo") enddef ; \stopMPinclusions \startMPcode draw textext(my_text_t); \stopMPcode \startMPcode draw textext(my_text_t) rotated 45; \stopMPcode \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------