Save/Redraw labels as pictures
![](https://secure.gravatar.com/avatar/c454c7402b3c58eaddc7622147742a81.jpg?s=120&d=mm&r=g)
The following code produces the letter "J" on the first page, but does not draw that same picture on the second page. I would appreciate some advice on how to save and redraw this label in subsequence figures. Thanks, Troy Henderson \starttext \startMPinclusions[+] picture J; \stopMPinclusions \startMPpage J:=thelabel(btex J etex scaled 2,origin); draw J; \stopMPpage \startMPpage draw J; \stopMPpage \stoptext
![](https://secure.gravatar.com/avatar/ac3fbaf0a287c4cffbc9f18fa931586c.jpg?s=120&d=mm&r=g)
Hans has be playing with MetaPost instances which got broken.
\startMPpage\stopMPpage got the wrong instance
whereas \startTEXpage\startMPcode\stopMPcode\stopMPpage correctly got
the default instance.
Normally, this was fixed, but your minimal example still does not
work for me either. Something else is at cause...
The reasons Hans has modified MP instances are:
1. we wanted to isolate the chemistry drawing macros from other MP use,
but not from the user, and
2. we uncovered an error with mlib when using a very great number of
MP pictures.
Alan
On Sat, 8 Dec 2012 05:42:43 -0600
Troy Henderson
The following code produces the letter "J" on the first page, but does not draw that same picture on the second page. I would appreciate some advice on how to save and redraw this label in subsequence figures.
Thanks,
Troy Henderson
\starttext \startMPinclusions[+] picture J; \stopMPinclusions \startMPpage J:=thelabel(btex J etex scaled 2,origin); draw J; \stopMPpage \startMPpage draw J; \stopMPpage \stoptext
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
On 12/8/2012 12:42 PM, Troy Henderson wrote:
The following code produces the letter "J" on the first page, but does not draw that same picture on the second page. I would appreciate some advice on how to save and redraw this label in subsequence figures.
Thanks,
Troy Henderson
\starttext \startMPinclusions[+] picture J; \stopMPinclusions \startMPpage J:=thelabel(btex J etex scaled 2,origin); draw J; \stopMPpage \startMPpage draw J; \stopMPpage \stoptext
\starttext \startMPinclusions[+] vardef J = thelabel(textext("J") scaled 2,origin) enddef ; \stopMPinclusions \startMPpage draw J; \stopMPpage \startMPpage draw J; \stopMPpage \stoptext as text in handled at the tex end it is lost after graphic is done; imlemeno it ting selective persistence is possible but messy; maybe some day i'll do it ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (3)
-
Alan BRASLAU
-
Hans Hagen
-
Troy Henderson