Re: [NTG-context] image file resolver in Lua?

2018-02-20 Thread Henning Hraban Ramm
Am 2018-02-04 um 13:06 schrieb Hans Hagen : > \getfiguredimensions[t:/sources/cow.pdf] > > \starttabulate[|T|T|] > \NC \string\figurewidth \NC \figurewidth \NC \NR > \NC \string\figureheight\NC \figureheight\NC \NR > \NC \string\figurexscale

Re: [NTG-context] image file resolver in Lua?

2018-02-08 Thread Henning Hraban Ramm
Am 2018-02-04 um 13:06 schrieb Hans Hagen : > Not sure what you want top know but a lot of image properties can be checked > by prerolling: > > \getfiguredimensions[t:/sources/cow.pdf] ... > \NC \string\figurefilepath \NC \figurefilepath \NC \NR > \NC

Re: [NTG-context] image file resolver in Lua?

2018-02-06 Thread Henning Hraban Ramm
Am 2018-02-06 um 17:09 schrieb Procházka Lukáš Ing. : > I'm usually implementing complicated solutions via Lua, with functions with > obligatory arg(s) first followed by one optional argument of table type: Thank you for your effort! I actually already wrote parts of my

Re: [NTG-context] image file resolver in Lua?

2018-02-06 Thread Procházka Lukáš Ing .
Hello Henning, On Tue, 06 Feb 2018 13:13:12 +0100, Henning Hraban Ramm wrote: I’ll try as soon as I get some time, since algorithmic image placement is a recurring problem for me, as I try to replace InDesign in my workflow. I thought about providing a module, but each of my

Re: [NTG-context] image file resolver in Lua?

2018-02-06 Thread Henning Hraban Ramm
Am 2018-02-06 um 09:34 schrieb Procházka Lukáš Ing. : > Hello Henning, > >> This is really interesting, but my original question was about the file path >> resolver, i.e. how to get "t:/sources/cow.pdf" from just "cow"? >> > > I guess there was a similar question here: > >

Re: [NTG-context] image file resolver in Lua?

2018-02-06 Thread Procházka Lukáš Ing .
Hello Henning, This is really interesting, but my original question was about the file path resolver, i.e. how to get "t:/sources/cow.pdf" from just "cow"? I guess there was a similar question here: https://mailman.ntg.nl/pipermail/ntg-context/2017/088324.html Reading till the

Re: [NTG-context] image file resolver in Lua?

2018-02-05 Thread Pablo Rodriguez
On 02/04/2018 07:04 PM, Henning Hraban Ramm wrote: > Am 2018-02-04 um 13:06 schrieb Hans Hagen : > >> Not sure what you want top know but a lot of image properties can be checked >> by prerolling: >> \getfiguredimensions[t:/sources/cow.pdf] > > This is really interesting, but my

Re: [NTG-context] image file resolver in Lua?

2018-02-05 Thread Rudolf Bahr
On Sun, Feb 04, 2018 at 01:06:08PM +0100, Hans Hagen wrote: > On 2/3/2018 7:57 AM, Rudolf Bahr wrote: > > On Fri, Feb 02, 2018 at 04:17:32PM +0100, Henning Hraban Ramm wrote: > > > Am 2018-02-02 um 12:08 schrieb Rudolf Bahr : > > > > > > > On Fri, Feb 02, 2018 at 08:40:08AM +0100,

Re: [NTG-context] image file resolver in Lua?

2018-02-04 Thread Henning Hraban Ramm
Am 2018-02-04 um 13:06 schrieb Hans Hagen : > Not sure what you want top know but a lot of image properties can be checked > by prerolling: > \getfiguredimensions[t:/sources/cow.pdf] This is really interesting, but my original question was about the file path resolver, i.e. how

Re: [NTG-context] image file resolver in Lua?

2018-02-04 Thread Hans Hagen
On 2/3/2018 7:57 AM, Rudolf Bahr wrote: On Fri, Feb 02, 2018 at 04:17:32PM +0100, Henning Hraban Ramm wrote: Am 2018-02-02 um 12:08 schrieb Rudolf Bahr : On Fri, Feb 02, 2018 at 08:40:08AM +0100, Henning Hraban Ramm wrote: Ahoi, I’m using a Lua function to calculate image

Re: [NTG-context] image file resolver in Lua?

2018-02-02 Thread Rudolf Bahr
On Fri, Feb 02, 2018 at 04:17:32PM +0100, Henning Hraban Ramm wrote: > Am 2018-02-02 um 12:08 schrieb Rudolf Bahr : > > > On Fri, Feb 02, 2018 at 08:40:08AM +0100, Henning Hraban Ramm wrote: > >> Ahoi, > >> > >> I’m using a Lua function to calculate image sizes, cropping etc. >

Re: [NTG-context] image file resolver in Lua?

2018-02-02 Thread Henning Hraban Ramm
Am 2018-02-02 um 12:08 schrieb Rudolf Bahr : > On Fri, Feb 02, 2018 at 08:40:08AM +0100, Henning Hraban Ramm wrote: >> Ahoi, >> >> I’m using a Lua function to calculate image sizes, cropping etc. >> This snippet: >> >> local filename = figures.current().status.fullname >> local

Re: [NTG-context] image file resolver in Lua?

2018-02-02 Thread Rudolf Bahr
On Fri, Feb 02, 2018 at 08:40:08AM +0100, Henning Hraban Ramm wrote: > Ahoi, > > I’m using a Lua function to calculate image sizes, cropping etc. > This snippet: > > local filename = figures.current().status.fullname > local pic = img.scan{filename = filename} > > ... works most of the time,

[NTG-context] image file resolver in Lua?

2018-02-01 Thread Henning Hraban Ramm
Ahoi, I’m using a Lua function to calculate image sizes, cropping etc. This snippet: local filename = figures.current().status.fullname local pic = img.scan{filename = filename} ... works most of the time, but sometimes the "current" image is the previous one, might be because I’m using layers