[luatex] [MiKTeX] Calling texlua from texlua, with a space in the tex binary path

Siep Kroonenberg siepo at cybercomm.nl
Sun Nov 2 11:37:14 CET 2014


On Sun, Nov 02, 2014 at 12:06:48AM +0100, Reinhard Kotucha wrote:
> On 2014-11-01 at 12:29:29 +0100, Siep Kroonenberg wrote:
> 
>  > I am investigating this in connection with my epspdf texlua script,
>  > which calls luatex at some point. A user who had installed miktex
>  > under Program Files ran into a problem. When I ran my test suite --
>  > another texlua script -- I ran into more problems.
>  > 
>  > So I wrote a texlua test script which calls another texlua script in
>  > the same directory and ran it with portable miktex, with TL/linux
>  > and with TL/w32. Note that TL is portable out of the box in all
>  > respects that matter here. None has its binaries on the searchpath.
> 
> Hi Siep,
> I must admit that I don't know what you mean with "None has its
> binaries on the searchpath.".  LuaTeX has to be in PATH, otherwise the
> shebang line
> 
>   #!/usr/bin/env texlua
> 
> wouldn't work.

I am talking about calling the script with the full path of the
script interpreter, which contains a space:

X:\>"\\vbitmuis\tldev\Mas ter\bin\win32\texlua" x:\epspdf\lua\tlu_call\tlu_caller_rk.tlu

Output from the patched version:

PATH[1]:        C:\WINDOWS\system32
PATH[2]:        C:\WINDOWS
PATH[3]:        C:\WINDOWS\System32\Wbem

prepending "//vbitmuis/tldev/Mas ter/bin/win32" (os.selfdir) to PATH

PATH[1]:        C:\WINDOWS\system32
PATH[2]:        C:\WINDOWS
PATH[3]:        C:\WINDOWS\System32\Wbem

Note that under TL/w32 os.getenv returns the parent path. Maybe
this should be considered a bug, although the modified path is
visible to child processes.

For completeness: this is the output with portable miktex:

X:\>"x:\mik port\miktex\bin\texlua" x:\epspdf\lua\tlu_call\tlu_caller_rk.t
1. os.execute
'x:\mik' is not recognized as an internal or external command,
operable program or batch file.
...

PATH[1]:        C:\WINDOWS\system32
PATH[2]:        C:\WINDOWS
PATH[3]:        C:\WINDOWS\System32\Wbem

prepending "x:\mik port\miktex\bin" (os.selfdir) to PATH

PATH[1]:        x:\mik port\miktex\bin
PATH[2]:        C:\WINDOWS\system32
PATH[3]:        C:\WINDOWS
PATH[4]:        C:\WINDOWS\System32\Wbem

Under MikTeX, os.getenv does return the modified path.

-- 
Siep Kroonenberg


More information about the luatex mailing list