ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Save/Redraw labels as pictures
@ 2012-12-08 11:42 Troy Henderson
  2012-12-08 15:55 ` Alan BRASLAU
  2012-12-09  0:17 ` Hans Hagen
  0 siblings, 2 replies; 5+ messages in thread
From: Troy Henderson @ 2012-12-08 11:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 473 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 543 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Save/Redraw labels as pictures
  2012-12-08 11:42 Save/Redraw labels as pictures Troy Henderson
@ 2012-12-08 15:55 ` Alan BRASLAU
  2012-12-08 17:52   ` Troy Henderson
  2012-12-09  0:17 ` Hans Hagen
  1 sibling, 1 reply; 5+ messages in thread
From: Alan BRASLAU @ 2012-12-08 15:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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 <thenders@gmail.com> 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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Save/Redraw labels as pictures
  2012-12-08 15:55 ` Alan BRASLAU
@ 2012-12-08 17:52   ` Troy Henderson
  0 siblings, 0 replies; 5+ messages in thread
From: Troy Henderson @ 2012-12-08 17:52 UTC (permalink / raw)
  Cc: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 125 bytes --]

>
> Hans has be playing with MetaPost instances which got broken.
>

Well I am running MKIV included in TeX Live 2012.

Troy

[-- Attachment #1.2: Type: text/html, Size: 295 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Save/Redraw labels as pictures
  2012-12-08 11:42 Save/Redraw labels as pictures Troy Henderson
  2012-12-08 15:55 ` Alan BRASLAU
@ 2012-12-09  0:17 ` Hans Hagen
  2012-12-10  3:01   ` Troy Henderson
  1 sibling, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2012-12-09  0:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Save/Redraw labels as pictures
  2012-12-09  0:17 ` Hans Hagen
@ 2012-12-10  3:01   ` Troy Henderson
  0 siblings, 0 replies; 5+ messages in thread
From: Troy Henderson @ 2012-12-10  3:01 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 87 bytes --]

>
> vardef J = thelabel(textext("J") scaled 2,origin) enddef ;


That will work!

Troy

[-- Attachment #1.2: Type: text/html, Size: 267 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-12-10  3:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-08 11:42 Save/Redraw labels as pictures Troy Henderson
2012-12-08 15:55 ` Alan BRASLAU
2012-12-08 17:52   ` Troy Henderson
2012-12-09  0:17 ` Hans Hagen
2012-12-10  3:01   ` Troy Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).