09 October 2018 10:53 Hans Hagen wrote: > On 10/8/2018 11:36 PM, [m...@gilleswaeber.ch](mailto:m...@gilleswaeber.ch) > 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')) } > 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
___________________________________________________________________________________ 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 ___________________________________________________________________________________