Re: [NTG-context] update old MP code

2022-09-01 Thread Henning Hraban Ramm via ntg-context
Am 01.09.22 um 18:45 schrieb Taco Hoekwater: On 1 Sep 2022, at 18:28, Henning Hraban Ramm via ntg-context wrote: Am 01.09.22 um 15:40 schrieb Taco Hoekwater: Adding grouping makes sense: def Moire(expr size)(text densities)= begingroup endgroup As that at least makes it an expression

Re: [NTG-context] update old MP code

2022-09-01 Thread Taco Hoekwater via ntg-context
> On 1 Sep 2022, at 18:28, Henning Hraban Ramm via ntg-context > wrote: > > Am 01.09.22 um 15:40 schrieb Taco Hoekwater: >> Adding grouping makes sense: >>> >>> def Moire(expr size)(text densities)= >> begingroup >> endgroup >> As that at least makes it an expression instead of a statement

Re: [NTG-context] update old MP code

2022-09-01 Thread Henning Hraban Ramm via ntg-context
Am 01.09.22 um 15:40 schrieb Taco Hoekwater: Adding grouping makes sense: def Moire(expr size)(text densities)= begingroup endgroup As that at least makes it an expression instead of a statement list. But also depthless() is never defined? Oops, I forgot to copy that part (confusing

Re: [NTG-context] update old MP code

2022-09-01 Thread Taco Hoekwater via ntg-context
Hi Hraban, Adding grouping makes sense: > > def Moire(expr size)(text densities)= begingroup > save dn,a,b,k,labit,n,p,q,s,xs; > n := 32; > dn := 0; > for i := densities: >d[incr dn] := abs(i); >if i>1: labit[dn]:=1; fi > endfor > a := min(d[1],d[dn]); > b := max(d[1],d[dn]); >

[NTG-context] update old MP code

2022-09-01 Thread Henning Hraban Ramm via ntg-context
Hi, here’s a snippet of old Metapost code that I’d like to use in ConTeXt. I didn’t manage to update it to MetaFun – can you help me? Hraban - \setupbodyfont[plex,ss,8bp] \startreusableMPgraphic{moiree} % 1994 by Bogusław Jackowski (GUST) defaultfont := "\truefontname{Sans}"; pickup