![](https://secure.gravatar.com/avatar/4f90ced6bd47c80395b33c0fde81a0d0.jpg?s=120&d=mm&r=g)
Hi Hans, Hans Hagen wrote:
luat-inp.lua is merged into luatools in order to make in 'stand-alone'
OK, I missed that. By the way, unless I screwed up completely, the new luatools you have sent me work: LuaTools | variable SELFAUTOLOC set to /usr/bin LuaTools | variable SELFAUTODIR set to /usr LuaTools | variable SELFAUTOPARENT set to / LuaTools | variable TEXMFCNF set to {$SELFAUTODIR,$SELFAUTOPARENT}{,{/share,}/texmf{-local,.local,}/web2c} LuaTools | skipping configuration for /usr/share/texmf/web2c from /home/tob/luatex-cache/context/c67bf06401a0e1a39f3ee04c60209dc5/trees/e027248d6557d124c703335e8a95ecd5 The symbolic links are not resolved, but "$SELFAUTODIR/share/texmf/web2c/" is the correct directory.
b) Following UNIX symbolic links does not seem to work under Linux. I played around with luat-inp.lua and it does not work.
hm, maybe taco knows ..
I think there is no way round but posix.readlink. However, it might be not needed as the new, just sent "luatools" works.
c) Werner asks: Why is the KPSE library not used?
several reasons:
I agree about the KPSE shortcomings, however, just for finding "texmf.cnf" KPSE should be good enough. (OK, finding "texmfcnf.lua" does not seem to work well as the "lua" extension means that "web2c" is not searched.)
For "luatex" itself (contrary to "luatools") there is no problem as luatex uses the compile-time path and finds the texmfcnf file.
hm, but since luatools is ran using texlus (which is luatex) the same should apply
I think the algorithm used to find the texmf.cnf file is different and thus a different file is found. Your algorithm never checks "$HOME/texmf/web2c" where a user could have put his file. For pdftex $HOME/texmf/web2c has a higher precedence than /usr/share/texmf/web2c. I assume that the same thing is true for "luatex". In any case the luatex binary contains the following string: /etc/texmf:/etc/texmf/web2c:/var/lib/texmf/web2c:{~/texmf,!!/etc/texmf,!!/var/lib/texmf,!!/usr/lib/texmf,!!/usr/local/share/texmf,!!/usr/share/texmf}/web2c Using KPSE the same string seems to be used to check for the config file. But "luatools" uses a completely different method. As long as the user does not have its own texmf.cnf there is no problem. (Should be the case most of the time.) However, as soon as (s)he has, luatex and "luatools" access different files!
- make sure that luatools is run by texlua and not by lua itself
That seems to be the case - my "lua" does not know about "lfs" and that works with texlua.
- don't use a stub, just rename luatools.lua to luatools and mtxrun.lua to mtxrun (so, no texmfstart like extra stubs which would slow down things considerably)
That is done differently: luatools.lua remains like that, but "/usr/bin/luatools" is a symbolic link to "luatools.lua". Tobias