On Tue, Dec 11, 2007 at 08:41:05AM +0100, Taco Hoekwater wrote:
Perhaps a search path could be hacked by using the output of kpsewhich --show-path=texmfscripts and appending the module directories to each path component. But: * LuaTeX's kpse library doesn't have a "show_path" function.
If you want that (or any other access to existing kpathsea stuff) just let me know, it easy to add extra bindings.
"kpse.show_path" is worth a try.
Then the result can be divided in separate path specifications.
Under Linux I have ":" as path separator.
How does --show-path behaves under other operating systems
(windows, ...)? Does it use a different path separator?
If yes, then a function for getting the path separator
the kpathsea library uses:
kpse.path_separator
(either a string or a function that returns a string)
The directory part of the module name is now added
to each path specification. Again, is "/" the correct
directory separator, also under other operating systems
for kpathsea?
Then the modified path specifications are merged
and passed to kpse.expand_path.
The result is a path list for direct script lookup.
Better than kpse.expand_path would be a kpse.find_file
That uses the path specification list directly for finding
the script. Then the ls-R lookup speed up the process.
Yours sincerely
Heiko