[luatex] lua scripts

Bob Tennent rdt at cs.queensu.ca
Thu Apr 21 04:33:02 CEST 2011


>> Ask on the MikTeX list.
>
> I did. They sent me here.

> Who did?  Odd advice.  We are not developing MikTeX.  I can tell you
  all about script wrapping in TeX Live, but not in MikTeX.  This is not
  something standardized, like TDS.

My initial question was interpreted as a luatex/texlua issue, for which
this is the appropriate list.

> Anyway, on MikTeX 2.9 the following batch works (should be a single
  line in case it gets broken):

    @for /f "delims=" %%I in ('kpsewhich --format=texmfscripts
     %~n0.lua') do texlua %%I %*

  (If you save it as foo.bat, it will search and launch foo.lua script.)

Thanks. For the record, this fails if a file name on the path has a
blank, such as Documents and Settings. Adding quotes around the second
occurrence of %%I fixes this. 

Will this batch script work on non-MikTeX Windows, such as TeXLive? I
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).

Bob T.


More information about the luatex mailing list