[tex-live] TeXLive (Windows) bash script -> exe

Joseph Wright joseph.wright at morningstar2.co.uk
Mon May 19 17:58:20 CEST 2014

On 19/05/2014 16:42, Ulrike Fischer wrote:
> Am Mon, 19 May 2014 15:59:43 +0200 schrieb Mojca Miklavec:
>> Yes, you can rewrite the program in lua and execute it with texlua.
>> If you write your script in lua, it will be guaranteed to work on all
>> operating systems.
> I would love to use texlua to avoid bat and sh-skripts:
> http://tex.stackexchange.com/questions/175055/how-to-adapt-a-batch-script-write18-call-to-linux-systems)

In a slightly different context, the LaTeX team are currently rewriting
the build scripts for LaTeX (expl3 first then LaTeX2e) in Lua precisely
because it allows us to keep in sync between Unix and Windows.
(See e.g.

> But is is actually possible to change the current directory with
> lua? And if yes how?

LuaTeX has lfs build in so offers lfs.chdir. For our work, we've taken a
slightly hybrid approach, combining platform-neutral Lua, lfs and some
OS-specific code, e.g. for file copying, etc. With a bit of work, the
OS-specific stuff can be abstracted to a small subset of commands (e.g.
file copying, path separators, etc.).
Joseph Wright

More information about the tex-live mailing list