[tex-live] lua path

Reinhard Kotucha reinhard.kotucha at web.de
Wed Dec 11 01:22:19 CET 2013


On 2013-12-10 at 11:00:40 +0000, Arthur Reutenauer wrote:

 > > What I'm doing is very simple:
 > > 
 > >   require("something")
 > > 
 > > in a lua script. I want the something.lua module to install in a
 > > texmf tree.
 > 
 >   For me, it's enough to say
 > 
 > 	kpse.set_program_name('luatex')
 >
 > before require'ing a Lua file that is in one of my texmf trees, for
 > it to be found by TeXLua.

It's not needed if your script is installed in SELFAUTOLOC or there is a
symlink to your script in SELFAUTOLOC.  

  $ kpsewhich --var-value SELFAUTOLOC
  /usr/local/texlive/2013/bin/x86_64-linux

It's essential that scripts are installed this way, otherwise kpathsea
can't determine the location of it's config file.

If you install your script anywhere else, you can add the line 

  kpse.set_program_name('luatex')

and kpathsea uses luatex instead of your script in order to determine
the location of its config file.  luatex is already in SELFAUTOLOC.

 > (And I'm still not able to make kpse.find_file work, but that's
 > probably not necessary.)

It seems that dofile() doesn't use kpathsea but you can use
kpse.find_file() and pass the result to dofile().

  dofile(kpse.find_file('somefile.lua'))

kpse.find_file() is not needed in order to locate lua modules,
definitely!

Arthur and Bob, *please* provide files which allow me to reproduce
your problems.  Unless I know what *exactly* you are doing I can't
help.  Everything works fine for me, at home and at work, and on Unix
and Windows.

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
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 tex-live mailing list