[Dev-luatex] kpse.find_file

Reinhard Kotucha reinhard.kotucha at web.de
Sun Nov 1 04:22:55 CET 2009

I just fixed some nasty bugs in texlua wrappers for ppower4 and
pdfthumb which are under texmf-dist/scripts in TeX Live.

There are no problems on Windows:  When I type "ppower4 --help", I get

  PPower4 [-v|-n|-h|-V|--verbose=<n>|--nocompress|--help|--version] infile outfile

On Unix, however, I get a warning message:

  warning: kpathsea: configuration file texmf.cnf not found in these directories: [...]

Here is [...] with colons replaced my linebraeks:


...and pp4p.jar is obviously not found, Java then prints its own usage

It seems that texmf.cnf is searched in texmf-dist only, but how can
this happen?  Strange enough, everything works fine on Windows.

I can strip down the texlua script:
#!/usr/bin/env texlua

if os.type == 'windows' then
   kpse.set_program_name('ppower4.exe', 'ppower4')

jarfile=kpse.find_file('pp4p.jar', 'texmfscripts')

print (jarfile)

On Windows it returns /path/to/pp4p.jar, on Unix it returns "nil".

The command

  kpsewhich -format=texmfscripts pp4p.jar

returns the correct path on both, Unix and Windows.  Hence, I think
it's a LuaTeX problem.
I don't think that fixing this problem is urgent.  It's definitely not
worthwhile to delay a TeX Live release.

Karl, I can provide a simple solution for the time being: Because what
we have in TeX Live already works as expected on Windows, we only need
a solution for Unix.  I could simply copy the shell scripts we had in
TeX Live 2005 to texmf-dist/scripts/ppower4 and adapt the symlinks
accordingly.  Then everything works on all platforms.  What do you


Reinhard Kotucha			              Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.

More information about the dev-luatex mailing list