ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* path in LuaMetaFun
@ 2021-02-20 11:59 Pablo Rodriguez
  2021-02-20 12:19 ` Pablo Rodriguez
  0 siblings, 1 reply; 5+ messages in thread
From: Pablo Rodriguez @ 2021-02-20 11:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear list,

I have the fowllowing sample:

 \starttext
 \startmakeup[page][align=middle]
 \startMPcode{doublefun}
  draw lmt_followtext [
  text = "\feature[+][smallcaps]\bf\samplefile{zapf} ",
  path = ((0,0)..(3,3.25)..(9,-3.25)..(12,0)..(9,3.25)..(3,-3.25)..(0,0)),
  autoscaleup = "max",
  reverse=true,
 ] xsized .75TextWidth ;
 \stopMPcode
 \startMPcode{doublefun}
  draw lmt_followtext [
  text = "\feature[+][smallcaps]\bf\samplefile{zapf} ",
  path = ((0,0)..(3,3.25)..(9,-3.25)..(12,0)..(9,3.25)..(3,-3.25)..cycle),
  autoscaleup = "max",
  reverse=true,
 ] xsized .75TextWidth ;
 \stopMPcode
 \stopmakeup
 \stoptext

I’m afraid I don’t understand how to close the path. Cycle has problems
with part of the text and returning to the start seems to distort the
path itself.

Which is the right way to close the path or what am I missing?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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] 5+ messages in thread

* Re: path in LuaMetaFun
  2021-02-20 11:59 path in LuaMetaFun Pablo Rodriguez
@ 2021-02-20 12:19 ` Pablo Rodriguez
  2021-02-20 12:28   ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Pablo Rodriguez @ 2021-02-20 12:19 UTC (permalink / raw)
  To: ntg-context

On 2/20/21 12:59 PM, Pablo Rodriguez wrote:
> [...]
> Which is the right way to close the path or what am I missing?

I see that cycle is the way to go:

 \starttext
 \startmakeup[page][align=middle]
 \dontleavehmode
 \startMPcode{doublefun}
  path p ; p := (0,0)..(3,3.5)..(9,-3.5)..(12,0)..(9,3.5)..(3,-3.5)..(0,0);
  draw p xsized .9TextWidth withcolor .625red;
  path p ; p := (0,0)..(3,3.5)..(9,-3.5)..(12,0)..(9,3.5)..(3,-3.5)..cycle;
  draw p xsized .9TextWidth ;
 \stopMPcode
 \stopmakeup
 \stoptext

Closing without cycle gives an asymetrical path. I’d rather say it is
wrong, but this is all Greek to me.

On the other side, I’m afraid that cycle has problems with lmt_followtext.

Could anyone confirm this?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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] 5+ messages in thread

* Re: path in LuaMetaFun
  2021-02-20 12:19 ` Pablo Rodriguez
@ 2021-02-20 12:28   ` Hans Hagen
  2021-02-20 18:04     ` Pablo Rodriguez
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2021-02-20 12:28 UTC (permalink / raw)
  To: Pablo Rodriguez,
	ntg-context@ntg.nl >> mailing list for ConTeXt users

On 2/20/2021 1:19 PM, Pablo Rodriguez wrote:
> On 2/20/21 12:59 PM, Pablo Rodriguez wrote:
>> [...]
>> Which is the right way to close the path or what am I missing?

control points that determine the way curves are made

> I see that cycle is the way to go:

indeed

>   \starttext
>   \startmakeup[page][align=middle]
>   \dontleavehmode
>   \startMPcode{doublefun}
>    path p ; p := (0,0)..(3,3.5)..(9,-3.5)..(12,0)..(9,3.5)..(3,-3.5)..(0,0);
>    draw p xsized .9TextWidth withcolor .625red;
>    path p ; p := (0,0)..(3,3.5)..(9,-3.5)..(12,0)..(9,3.5)..(3,-3.5)..cycle;
>    draw p xsized .9TextWidth ;
>   \stopMPcode
>   \stopmakeup
>   \stoptext
> 
> Closing without cycle gives an asymetrical path. I’d rather say it is
> wrong, but this is all Greek to me.
> 
> On the other side, I’m afraid that cycle has problems with lmt_followtext.
could be, i'm playing a bit with the converter and introduced a issue 
but that will be fixed in the next upload

(i want the metafun manual to run ok in lmtx, also performance wise, 
read: faster)

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] 5+ messages in thread

* Re: path in LuaMetaFun
  2021-02-20 12:28   ` Hans Hagen
@ 2021-02-20 18:04     ` Pablo Rodriguez
  2021-02-21 14:08       ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Pablo Rodriguez @ 2021-02-20 18:04 UTC (permalink / raw)
  To: ntg-context

On 2/20/21 1:28 PM, Hans Hagen wrote:
> On 2/20/2021 1:19 PM, Pablo Rodriguez wrote:
>> [...]
>> On the other side, I’m afraid that cycle has problems with lmt_followtext.
> could be, i'm playing a bit with the converter and introduced a issue
> but that will be fixed in the next upload
Many thanks for your new upload, Hans.

Another minor detail:

  \starttext
  \startTEXpage
  \startMPcode{doublefun}
    draw lmt_followtext [
     text  =  "\feature[+][smallcaps]\bf\samplefile{zapf}  ",
     path  =  ((0,0)..(3,3)..(9,-3)..(12,0)..(9,3)..(3,-3)..cycle),
     autoscaleup  =  "max",
     %~  reverse=true,
    ] xsized .75TextWidth ;
  \stopMPcode
  \stopTEXpage
  \stoptext

One circle is bigger than the other one (reverse=true switches them).

I guess this might be solved with struts, but I don’t know how to apply
them there.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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] 5+ messages in thread

* Re: path in LuaMetaFun
  2021-02-20 18:04     ` Pablo Rodriguez
@ 2021-02-21 14:08       ` Hans Hagen
  0 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2021-02-21 14:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Pablo Rodriguez

On 2/20/2021 7:04 PM, Pablo Rodriguez wrote:
> On 2/20/21 1:28 PM, Hans Hagen wrote:
>> On 2/20/2021 1:19 PM, Pablo Rodriguez wrote:
>>> [...]
>>> On the other side, I’m afraid that cycle has problems with lmt_followtext.
>> could be, i'm playing a bit with the converter and introduced a issue
>> but that will be fixed in the next upload
> Many thanks for your new upload, Hans.
> 
> Another minor detail:
> 
>    \starttext
>    \startTEXpage
>    \startMPcode{doublefun}
>      draw lmt_followtext [
>       text  =  "\feature[+][smallcaps]\bf\samplefile{zapf}  ",
>       path  =  ((0,0)..(3,3)..(9,-3)..(12,0)..(9,3)..(3,-3)..cycle),
>       autoscaleup  =  "max",
>       %~  reverse=true,
>      ] xsized .75TextWidth ;
>    \stopMPcode
>    \stopTEXpage
>    \stoptext
> 
> One circle is bigger than the other one (reverse=true switches them).
> 
> I guess this might be solved with struts, but I don’t know how to apply
> them there.
You get what you ask for: different text ends up at the left or right 
edge depending on the reverse.

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] 5+ messages in thread

end of thread, other threads:[~2021-02-21 14:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-20 11:59 path in LuaMetaFun Pablo Rodriguez
2021-02-20 12:19 ` Pablo Rodriguez
2021-02-20 12:28   ` Hans Hagen
2021-02-20 18:04     ` Pablo Rodriguez
2021-02-21 14:08       ` 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).