Re: [NTG-context] Use MetaPost to distort images?

2021-09-05 Thread Henning Hraban Ramm via ntg-context
> Am 04.09.2021 um 19:06 schrieb Hans Hagen : > > On 9/4/2021 2:18 PM, Henning Hraban Ramm via ntg-context wrote: > >> I guess it’s on me to write a wiki page about GM. > > you can then also add some comparison with im (i.e. what does it offer more > than gm) Oh no... IM and GM have a histo

Re: [NTG-context] Use MetaPost to distort images?

2021-09-05 Thread Hans Hagen via ntg-context
On 9/5/2021 9:40 AM, Henning Hraban Ramm via ntg-context wrote: Am 04.09.2021 um 19:06 schrieb Hans Hagen : On 9/4/2021 2:18 PM, Henning Hraban Ramm via ntg-context wrote: I guess it’s on me to write a wiki page about GM. you can then also add some comparison with im (i.e. what does it of

[NTG-context] parameters TeX->LuaTeX

2021-09-05 Thread Hans van der Meer via ntg-context
There is something I do not understand in the passing of parameters from TeX to LuaTex. This is my TeX definition: \def\ListSort[#1]#2{\directlua{hvdm.listsort([===[#2]===],[===[#1]===])}} Calling \ListSort[sep={ + }]{} delivers the string 'sep={ + }' into LuaTeX as the printout in the logfile

Re: [NTG-context] parameters TeX->LuaTeX

2021-09-05 Thread Hans van der Meer via ntg-context
And \ListSort[[abc]]{value} turns out to be worse: doesn't makes it into LuaTeX at all. dr. Hans van der Meer > On 5 Sep 2021, at 10:14, Hans van der Meer via ntg-context > wrote: > > There is something I do not understand in the passing of parameters from TeX > to LuaTex. > This is my TeX d

Re: [NTG-context] Use MetaPost to distort images?

2021-09-05 Thread Hans Hagen via ntg-context
On 9/5/2021 9:40 AM, Henning Hraban Ramm via ntg-context wrote: OTOH IM offers much more features (e.g. the geometric transformations I inquired about), and you can find lots of interesting examples (including the scripts Bruce mentioned). I couldn’t find another CLI tool that can do most of

Re: [NTG-context] parameters TeX->LuaTeX

2021-09-05 Thread Hans Hagen via ntg-context
On 9/5/2021 10:14 AM, Hans van der Meer via ntg-context wrote: There is something I do not understand in the passing of parameters from TeX to LuaTex. This is my TeX definition: \def\ListSort[#1]#2{\directlua{hvdm.listsort([===[#2]===],[===[#1]===])}} tex haalt de {} rond #2 weg Calling \List

Re: [NTG-context] Use MetaPost to distort images?

2021-09-05 Thread Henning Hraban Ramm via ntg-context
> Am 05.09.2021 um 10:10 schrieb Hans Hagen : > > On 9/5/2021 9:40 AM, Henning Hraban Ramm via ntg-context wrote: >>> Am 04.09.2021 um 19:06 schrieb Hans Hagen : >>> >>> On 9/4/2021 2:18 PM, Henning Hraban Ramm via ntg-context wrote: >>> I guess it’s on me to write a wiki page about GM. >>

[NTG-context] cld questions

2021-09-05 Thread Henning Hraban Ramm via ntg-context
Hi again, I’m converting a few macros into Lua (LMTX), but couldn’t find some answers in the docs: * How translates \ifodd\realpageno ? This doesn’t work: if ((tex.getcount("realpageno") mod 2) == 1) then a = 1 end I found tex.ifodd but don’t know how to use it either. * How to access my \d

Re: [NTG-context] getting line numbers

2021-09-05 Thread Fabrice Couvreur via ntg-context
Hi, I am trying to test this file but without success. I just do context test.tex but I suspect that is not it. When you say > We compile and run: > Which command is it with ? Thanks Fabrice Le ven. 3 sept. 2021 à 18:26, Hans Hagen via ntg-context a écrit : > On 9/3/2021 3:53 PM, Aditya Mahaja

Re: [NTG-context] cld questions

2021-09-05 Thread Hans Hagen via ntg-context
On 9/5/2021 12:01 PM, Henning Hraban Ramm via ntg-context wrote: Hi again, I’m converting a few macros into Lua (LMTX), but couldn’t find some answers in the docs: * How translates \ifodd\realpageno ? This doesn’t work: if ((tex.getcount("realpageno") mod 2) == 1) then a = 1 end we're tal

[NTG-context] Automatically adjust number of table columns

2021-09-05 Thread Sylvain Hubert via ntg-context
Dear List, I'm trying to make "\startchoice", "\stopchoice", and "\choice", such that: \startchoice \choice -1 \choice 0 \choice 1 \choice N/A \stopchoice results in (_ for whitespace) A. -1__B. 0__C. 1__D. N/A while \startchoice \choice not so

[NTG-context] MetaFun : textext.dflt / textext.dlft and MkIV / LMTX

2021-09-05 Thread Garulfo via ntg-context
Hi, After https://mailman.ntg.nl/pipermail/ntg-context/2021/102052.html It seems that there is no backward compatibility between MkIV and LMTX for textext.dflt (MVE below) | MkIV | LMTX | -|---|--| textext.dflt | OK | KO | as DefauLT (unlike ulft

[NTG-context] zint barcode module on LMTX/MacOS

2021-09-05 Thread Henning Hraban Ramm via ntg-context
Hi again, the LMTX zint module uses libzint, while MkIV calls the zint binary. The latter works for me, the first not. On MacOS, the library is "/opt/local/lib/libzint.dylib"*. I changed that in the source and the file appears to be found. Could you add that, Hans? *) Previously, zint for MacO

Re: [NTG-context] cld questions

2021-09-05 Thread Henning Hraban Ramm via ntg-context
> Am 05.09.2021 um 13:01 schrieb Hans Hagen : > > On 9/5/2021 12:01 PM, Henning Hraban Ramm via ntg-context wrote: >> * How translates \ifodd\realpageno ? >> This doesn’t work: >> if ((tex.getcount("realpageno") mod 2) == 1) then >> a = 1 >> end > > we're talking lua: 9 % 2 == 0 Oops. Too many

Re: [NTG-context] zint barcode module on LMTX/MacOS

2021-09-05 Thread Michal Vlasák via ntg-context
Hello Hraban, On Sun Sep 5, 2021 at 4:15 PM CEST, Henning Hraban Ramm via ntg-context wrote: > Hi again, > > the LMTX zint module uses libzint, while MkIV calls the zint binary. > The latter works for me, the first not. > > On MacOS, the library is "/opt/local/lib/libzint.dylib"*. > I changed that

Re: [NTG-context] zint barcode module on LMTX/MacOS

2021-09-05 Thread Henning Hraban Ramm via ntg-context
Hi Michal, thank you! > Am 05.09.2021 um 17:51 schrieb Michal Vlasák : > > On Sun Sep 5, 2021 at 4:15 PM CEST, Henning Hraban Ramm via ntg-context wrote: >> Hi again, >> >> the LMTX zint module uses libzint, while MkIV calls the zint binary. >> The latter works for me, the first not. >> >> On M

Re: [NTG-context] zint barcode module on LMTX/MacOS

2021-09-05 Thread Michal Vlasák via ntg-context
On Sun Sep 5, 2021 at 6:30 PM CEST, Henning Hraban Ramm via ntg-context wrote: > > Am 05.09.2021 um 17:51 schrieb Michal Vlasák : > > "execute" should be a function defined in LuaMetaTeX, that internally > > calls zint functions. > > Hm, ok, but where are the zint API calls defined? Sorry, do you

Re: [NTG-context] zint barcode module on LMTX/MacOS

2021-09-05 Thread Hans Hagen via ntg-context
On 9/5/2021 5:51 PM, Michal Vlasák via ntg-context wrote: Hello Hraban, "execute" should be a function defined in LuaMetaTeX, that internally calls zint functions. does context libs-imp-zint.mkxl produce something? -

Re: [NTG-context] zint barcode module on LMTX/MacOS

2021-09-05 Thread Michal Vlasák via ntg-context
On Sun Sep 5, 2021 at 7:37 PM CEST, Hans Hagen wrote: > On 9/5/2021 5:51 PM, Michal Vlasák via ntg-context wrote: > > Hello Hraban, > > > "execute" should be a function defined in LuaMetaTeX, that internally > > calls zint functions. > does > > context libs-imp-zint.mkxl > > produce something? Emp

Re: [NTG-context] zint barcode module on LMTX/MacOS

2021-09-05 Thread Henning Hraban Ramm via ntg-context
> Am 05.09.2021 um 19:53 schrieb Michal Vlasák via ntg-context > : > > On Sun Sep 5, 2021 at 7:37 PM CEST, Hans Hagen wrote: >> does >> >> context libs-imp-zint.mkxl >> >> produce something? > > Empty page (empty content stream) and Crop/Media/TrimBox is > [ 0 0 7.790488 103.5872 ]. > > The

Re: [NTG-context] zint barcode module on LMTX/MacOS

2021-09-05 Thread Hans Hagen via ntg-context
On 9/5/2021 7:53 PM, Michal Vlasák wrote: On Sun Sep 5, 2021 at 7:37 PM CEST, Hans Hagen wrote: On 9/5/2021 5:51 PM, Michal Vlasák via ntg-context wrote: Hello Hraban, "execute" should be a function defined in LuaMetaTeX, that internally calls zint functions. does context libs-imp-zint.mkx

Re: [NTG-context] Use MetaPost to distort images?

2021-09-05 Thread Aditya Mahajan via ntg-context
On Sun, 5 Sep 2021, Henning Hraban Ramm via ntg-context wrote: > > > Am 05.09.2021 um 10:10 schrieb Hans Hagen : > >> BTW, here’s my script: > >> Here are some results: > > > > Did you try that with the filter module? It would make it more portable > > I completely forgot I could do that (and I