Re: [NTG-context] Conflict between MetaPost (LMTX) and cmarrows
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.hagen@xs4all.nl mailto:j.hagen@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 -----------------------------------------------------------------
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 -----------------------------------------------------------------
participants (1)
-
Hans Hagen