Re: [NTG-context] cld questions

2021-09-06 Thread Henning Hraban Ramm via ntg-context
> Am 06.09.2021 um 20:00 schrieb Hans Hagen : > > function() Image(Width, Height, filename) end Oh, of course. Me stupid. I was looking at the code for too long... Hraban ___ If your question is of interest to other

Re: [NTG-context] cld questions

2021-09-06 Thread Hans Hagen via ntg-context
On 9/6/2021 6:20 PM, Henning Hraban Ramm via ntg-context wrote: Another question: I think I understood the need for function arguments. My macro, defined with interfaces.implement, works while I call "Image" below, but if I call "ClippedImage" (one level of indirection more), I get: """ tex err

Re: [NTG-context] cld questions

2021-09-06 Thread Henning Hraban Ramm via ntg-context
Another question: I think I understood the need for function arguments. My macro, defined with interfaces.implement, works while I call "Image" below, but if I call "ClippedImage" (one level of indirection more), I get: """ tex error > tex error on line 28 in file virtual://page.nopage.1: M

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