From: Hans Hagen via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Hans Hagen <j.hagen@xs4all.nl>
Subject: Re: img.scan in lmtx?
Date: Thu, 5 Aug 2021 17:51:22 +0200 [thread overview]
Message-ID: <b981d037-fb27-6290-1553-18e9591a42cc@xs4all.nl> (raw)
In-Reply-To: <C2B3A58B-D642-4058-B002-C8E9DF6E164A@fiee.net>
On 8/5/2021 12:26 PM, Henning Hraban Ramm via ntg-context wrote:
>
>
>> Am 08.07.2021 um 23:09 schrieb Hans Hagen <j.hagen@xs4all.nl>:
>>
>> On 7/8/2021 8:31 PM, Henning Hraban Ramm wrote:
>>>> Am 27.01.2020 um 09:16 schrieb Hans Hagen <j.hagen@xs4all.nl>:
>>>>
>>>> On 1/26/2020 11:50 PM, Henning Hraban Ramm wrote:
>>>>
>>>>> I use the lua function img.scan{filename}, but in lmtx I get "attempt to index a nil value (global 'img')", so I guess this got renamed or moved?
>>>> Just the high level command:
>>>>
>>>> figures.getinfo(name,page)
>>
>> local t = figures.getinfo("name.pdf",10) -- optional page number
>
> Finally coming back to this.
>
> Since I don’t know what the function is supposed to return, I thought I’ll check:
>
> local image = figures.getinfo(imgname,1)
> print("TEST", image, #image)
> for k, v in ipairs(image) do
> print("TEST", oldname, k, v)
> end
>
> but that gives only:
>
> TEST table: 0x7fbd4e4e1320 0
>
> i.e. the table is empty.
>
> Or did I misunderstand something? My Lua skills are still severely lacking...
it's a hash not an array so .... pairs
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2021-08-05 15:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-26 22:50 Henning Hraban Ramm
2020-01-27 8:16 ` Hans Hagen
2021-07-08 18:31 ` Henning Hraban Ramm
2021-07-08 21:09 ` Hans Hagen
2021-08-05 10:26 ` Henning Hraban Ramm via ntg-context
2021-08-05 15:51 ` Hans Hagen via ntg-context [this message]
2021-08-05 17:00 ` Henning Hraban Ramm via ntg-context
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b981d037-fb27-6290-1553-18e9591a42cc@xs4all.nl \
--to=ntg-context@ntg.nl \
--cc=j.hagen@xs4all.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).