Re: [NTG-context] Conflict between MetaPost (LMTX) and cmarrows

2021-04-27 Thread Hans Hagen

Hi,

you can't assume fuzzy scratch variables as used in

  def flex(text t) =   % t is a list of pairs
hide(n_:=0; for z=t: z_[incr n_]:=z; endfor
dz_:=z_[n_]-z_1)
z_1 for k=2 upto n_-1: ...z_[k]{dz_} endfor ...z_[n_] enddef;
  newinternal n_; pair z_[],dz_;

to be official .. in mpxl we use names like

  temp_pair_z

i.e. a temp_ namespace (as well as a mfun_ one) for all these 
potentially clashing short names


you could do

  newinternal n_; pair z_[],dz_;

at the top of your file (because we don't use them) but stil ...

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
___


Re: [NTG-context] Conflict between MetaPost (LMTX) and cmarrows

2021-04-27 Thread Hans Hagen

On 4/27/2021 6:31 PM, Jairo A. del Rio wrote:

Hi, Hans. I've attached the relevant files.

Jairo

El mar, 27 de abr. de 2021 a la(s) 07:35, Hans Hagen (j.ha...@xs4all.nl 
) escribió:


On 4/27/2021 9:23 AM, Jairo A. del Rio wrote:
 > So, should I share relevant files? AFAIK only cmarrows and .mf
files in
 > the cm source folder are involved. I hope you can check it if a
solution
 > is possible and not too demanding. Thanks beforehand.
you can make a minimal failure example but I gues sthat the solution
has
to be in the mf macros (as there is where some pair/numeric clash
happens)


indeed, as i mentioned, some variable is not set up right

you need to patch (probably in all these arrow files)

save x,y,x_,y_;

to

save x,y,x_,y_,z_;

and (in mapto)

   numeric x,x_[],y,y_[];

to

   numeric x,x_[],y,y_[];
   pair z_[];


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
___


Re: [NTG-context] Conflict between MetaPost (LMTX) and cmarrows

2021-04-27 Thread Hans Hagen

On 4/27/2021 9:23 AM, Jairo A. del Rio wrote:
So, should I share relevant files? AFAIK only cmarrows and .mf files in 
the cm source folder are involved. I hope you can check it if a solution 
is possible and not too demanding. Thanks beforehand.
you can make a minimal failure example but I gues sthat the solution has 
to be in the mf macros (as there is where some pair/numeric clash happens)


-
  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
___


Re: [NTG-context] Conflict between MetaPost (LMTX) and cmarrows

2021-04-27 Thread Jairo A. del Rio
So, should I share relevant files? AFAIK only cmarrows and .mf files in the
cm source folder are involved. I hope you can check it if a solution is
possible and not too demanding. Thanks beforehand.

Regards,

Jairo

El lun, 26 de abr. de 2021 a la(s) 03:56, Hans Hagen (j.ha...@xs4all.nl)
escribió:

> On 4/26/2021 9:59 AM, Jairo A. del Rio wrote:
> >
> >
> > El lun, 26 de abr. de 2021 a la(s) 01:49, Hans Hagen (j.ha...@xs4all.nl
> > ) escribió:
> >
> > On 4/26/2021 6:59 AM, Jairo A. del Rio wrote:
> >  > The following:
> >  >
> >  > \starttext
> >  >
> >  > \startMPinitializations
> >  >
> >  > input cmarrows;
> >  >
> >  > setup_cmarrows(arrow_name = "texarrow"; parameter_file =
> "cmr6.mf";
> >  > macro_name = "nicearrow");
> >  >
> >  > \stopMPinitializations
> >  >
> >  > \startMPpage
> >
> >  > metafun > log > error: Equation cannot be performed (numeric=pair)
> > I don't know, but from the message it looks like some 'local'
> variables
> > is not saved and defined. I'm surprised that loading some mf file
> works
> > at all (because it also assumes some mf related definitions). I also
> > hav
> > eno clue if such a package adopts 'core' metafun code (and mpiv
> metafun
> > is different from mpii).
> >
> >
> > It's a generic, "pure" MetaPost package:
> >
> > https://www.ctan.org/pkg/cmarrows 
>
> that doesn't make it immune from clashes in used variables with differnt
> types ... metafun is more than plain mp so more can clash
>
> > Fonts are in /fonts/source/public in a TeX Live distribution, in case it
> > helps.
> i have a rather minimal tex setup so i can't run that (i'm not going to
> clutter my system now)
>
> 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
___


Re: [NTG-context] Conflict between MetaPost (LMTX) and cmarrows

2021-04-26 Thread Hans Hagen

On 4/26/2021 9:59 AM, Jairo A. del Rio wrote:



El lun, 26 de abr. de 2021 a la(s) 01:49, Hans Hagen (j.ha...@xs4all.nl 
) escribió:


On 4/26/2021 6:59 AM, Jairo A. del Rio wrote:
 > The following:
 >
 > \starttext
 >
 > \startMPinitializations
 >
 > input cmarrows;
 >
 > setup_cmarrows(arrow_name = "texarrow"; parameter_file = "cmr6.mf";
 > macro_name = "nicearrow");
 >
 > \stopMPinitializations
 >
 > \startMPpage

 > metafun > log > error: Equation cannot be performed (numeric=pair)
I don't know, but from the message it looks like some 'local' variables
is not saved and defined. I'm surprised that loading some mf file works
at all (because it also assumes some mf related definitions). I also
hav
eno clue if such a package adopts 'core' metafun code (and mpiv metafun
is different from mpii).


It's a generic, "pure" MetaPost package:

https://www.ctan.org/pkg/cmarrows 


that doesn't make it immune from clashes in used variables with differnt 
types ... metafun is more than plain mp so more can clash


Fonts are in /fonts/source/public in a TeX Live distribution, in case it 
helps.
i have a rather minimal tex setup so i can't run that (i'm not going to 
clutter my system now)


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
___


Re: [NTG-context] Conflict between MetaPost (LMTX) and cmarrows

2021-04-26 Thread Jairo A. del Rio
El lun, 26 de abr. de 2021 a la(s) 01:49, Hans Hagen (j.ha...@xs4all.nl)
escribió:

> On 4/26/2021 6:59 AM, Jairo A. del Rio wrote:
> > The following:
> >
> > \starttext
> >
> > \startMPinitializations
> >
> > input cmarrows;
> >
> > setup_cmarrows(arrow_name = "texarrow"; parameter_file = "cmr6.mf";
> > macro_name = "nicearrow");
> >
> > \stopMPinitializations
> >
> > \startMPpage
>
> > metafun > log > error: Equation cannot be performed (numeric=pair)
> I don't know, but from the message it looks like some 'local' variables
> is not saved and defined. I'm surprised that loading some mf file works
> at all (because it also assumes some mf related definitions). I also hav
> eno clue if such a package adopts 'core' metafun code (and mpiv metafun
> is different from mpii).
>

It's a generic, "pure" MetaPost package:

https://www.ctan.org/pkg/cmarrows

Fonts are in /fonts/source/public in a TeX Live distribution, in case it
helps.

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

Jairo
___
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
___


Re: [NTG-context] Conflict between MetaPost (LMTX) and cmarrows

2021-04-26 Thread Hans Hagen

On 4/26/2021 6:59 AM, Jairo A. del Rio wrote:

The following:

\starttext

\startMPinitializations

input cmarrows;

setup_cmarrows(arrow_name = "texarrow"; parameter_file = "cmr6.mf"; 
macro_name = "nicearrow");


\stopMPinitializations

\startMPpage



metafun > log > error: Equation cannot be performed (numeric=pair)
I don't know, but from the message it looks like some 'local' variables 
is not saved and defined. I'm surprised that loading some mf file works 
at all (because it also assumes some mf related definitions). I also hav 
eno clue if such a package adopts 'core' metafun code (and mpiv metafun 
is different from mpii).


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
___