[luatex] lua scripts
T T
t34www at googlemail.com
Thu Apr 21 15:22:35 CEST 2011
On 21 April 2011 03:33, Bob Tennent <rdt at cs.queensu.ca> wrote:
>
> Will this batch script work on non-MikTeX Windows, such as TeXLive? I
It will. I tried also on MikTeX 2.7 and it works there too, so
chances are it will also work on older versions.
> know that MikTeX and TeXLive will wrap lua scripts in their packages.
> But a package at CTAN might be installed "privately" and so I think a
> generic wrapper script has to be provided for Windows users (who can't
> use the #! trick).
In that case I would first check the current directory for the script
and then search with kpsewhich. I would suggest something like this:
@setlocal
@set script=
@if exist "%~dpn0.lua" set script="%~dpn0.lua"
@if not defined script for /f "delims=" %%I in ('kpsewhich
--format=texmfscripts %~n0.tlu') do @set script="%%I"
@if not defined script goto :scriptnotfound
@texlua %script% %*
@goto :eof
:scriptnotfound
@echo script not found: %~n0.lua 1>&2
@exit /b 1
Cheers,
Tomek
More information about the luatex
mailing list