[tex-live] kpse don't find files under $TEXMF/scripts

Khaled Hosny khaledhosny at eglug.org
Sun Mar 28 15:07:46 CEST 2010


On Sun, Mar 28, 2010 at 11:57:50AM +0200, Manuel Pégourié-Gonnard wrote:
> Hi,
> 
> Khaled Hosny a écrit :
> > The lua_altopt module installed under texmf-dist/scripts/ is not seen by
> > kpse,
> 
> This statement is too imprecise to be true. Kpse will or will not see the file
> depending on the options you pass to it.

That was my naive observation, I don't claim any understanding of how
kpse path search work.

> > If this is the expected behaviour, then we either need to special case
> > lua modules (e.g. have a searchable scripts/lua/ subdir) or move lua
> > modules somewhere else.
> > 
> Currently LUAINPUTS is .;$TEXMF/scripts/{$progname,$engine,}/lua//;$TEXINPUTS
> which means that with format = 'lua' (and I guess this is what require() is
> using), lua scripts in texmfscripts will be found only if their path contains a
> directory named lua. (By the way, we may remove this restriction in the near
> future.)
> 
> So I'd recommend to follow Reinhard's advice: locate the script using kpse an
> load it using dofile(). More precisely,
> 
> local f = kpse.find_file('lua_altgetopt.lua', 'lua')
>     or kpse.find_file('lua_altgetopt.lua', 'texmfscripts')
> dofile(assert(f, 'lua_altgetopt not found'))
> 
> should do the trick.
> 
> I agree that it is suboptimal, and we'll see to fix this one way or another
> (either by changing LUAINPUTS or by installing the files in a lua subdirectory)
> soon.

Using texmfscripts as format does work, so I guess we should install
require'able lua scripts under scripts/lua/ (I just tested it).

Regards,
 Khaled

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer


More information about the tex-live mailing list