09 October 2018 10:53 Hans Hagen wrote:
How should I call context.setupexternalfigures? \directlua{ context.setupexternalfigures { % directory = { 'images', (string.gsub(os.getenv('IMG_PATH'),'\\', '/')) } % directory = { 'images', resolvers.cleanpath(os.getenv('IMG_PATH')) }
On 10/8/2018 11:36 PM, [moi@gilleswaeber.ch](mailto:moi@gilleswaeber.ch) wrote: directory = { 'images', resolvers.expandpath('IMG_PATH') } } }
(or pass the path on the command line, say --imagepath=... and get it with document.arguments.imagepath)
It seems the problem was that directory must not be an array. This one worked for me: context.setupexternalfigures { directory = 'images,' .. resolvers.expandpath('IMG_PATH') } Thanks, Gilles