ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Using \startuseMPgraphic inside a textext() in METAPOST?
@ 2020-04-27  8:47 Gerben Wierda
  2020-04-27  9:24 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Gerben Wierda @ 2020-04-27  8:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

I am in METAPOST which is inside TeX and I’d like (in METAPOST, not in TeX) to let a string follow a path. Adapting from the MetaFun manual around page 250, I tried this:

\starttext

\startMPpage[instance=doublefun]
pic p;
p := textext("\startuseMPgraphic[instance=doublefun]{followtokens}path RotPath ; RotPath := fullcircle ;\stopuseMPgraphic\followtokens{I am creating a line of text here}");
draw pic;
\stopMPpage

\stoptext

But that does not work. Is there a way I can from within my METAPOST code get  string (TeX code) to follow a path I have? In my case, I cannot escape outside the \startMPpage- -\stopMPpage environment, as the actual path is constructed there and the text following the path should be on that page.

G

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

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Using \startuseMPgraphic inside a textext() in METAPOST?
  2020-04-27  8:47 Using \startuseMPgraphic inside a textext() in METAPOST? Gerben Wierda
@ 2020-04-27  9:24 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2020-04-27  9:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Gerben Wierda

On 4/27/2020 10:47 AM, Gerben Wierda wrote:
> I am in METAPOST which is inside TeX and I’d like (in METAPOST, not in 
> TeX) to let a string follow a path. Adapting from the MetaFun manual 
> around page 250, I tried this:
> 
> \starttext
> 
> \startMPpage[instance=doublefun]
> pic p;
> p := textext("\startuseMPgraphic[instance=doublefun]{followtokens}path 
> RotPath ; RotPath := fullcircle ;\stopuseMPgraphic\followtokens{I am 
> creating a line of text here}");
> draw pic;
> \stopMPpage
> 
> \stoptext
> 
> But that does not work. Is there a way I can from within my METAPOST 
> code get  string (TeX code) to follow a path I have? In my case, I 
> cannot escape outside the \startMPpage- -\stopMPpage environment, as the 
> actual path is constructed there and the text following the path should 
> be on that page.
search for lmt_followtext in the luametafun manual

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2020-04-27  9:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-27  8:47 Using \startuseMPgraphic inside a textext() in METAPOST? Gerben Wierda
2020-04-27  9:24 ` Hans Hagen

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).