![](https://secure.gravatar.com/avatar/565476157eb3895a9c928ffce26d988d.jpg?s=120&d=mm&r=g)
Hi Reinhard, You can debug the kpathsea in texlua just like you would a standalone script by setting KPATHSEA_DEBUG=-1 in the environment before running the script, perhaps that will help. Reinhard Kotucha wrote:
I can strip down the texlua script: ------------------------------------------------------------------ #!/usr/bin/env texlua
if os.type == 'windows' then kpse.set_program_name('ppower4.exe', 'ppower4') else kpse.set_program_name('ppower4')
Also, have you tried kpse.set_program_name('ppower4', 'ppower4')
The command
kpsewhich -format=texmfscripts pp4p.jar
returns the correct path on both, Unix and Windows. Hence, I think it's a LuaTeX problem.
Or you could try to set the program name to 'kpsewhich' (that is what I usually do in standalone scripts). The wrapper luatex provides around kpathsea is really shallow, so I am just as surprised by this problem as you are. Best wishes, Taco