On Thursday, October 5, 2023 at 6:19:10 AM UTC-4 Albert Krewinkel wrote: That's elegant. Another way to get the value of `myDir` would be local myDir = pandoc.path.directory(arg[0]) and should also work on all platforms. It relies on pandoc's built-in path library and on a feature of the default lua interpreter, which pandoc replicates for compatibility: https://www.lua.org/manual/5.4/manual.html#7 I find with pandoc 3.1.8 that while `arg` is defined for a script executed with `pandoc lua`, it is nil for a filter executed with `pandoc -L`. So I'm back to my borrowed elegant solution. -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/82dabe2b-28c9-4ea3-a299-36a8c01b31b6n%40googlegroups.com.