[tex-k] Unsupported extra colon in kpsewhich --expand-path

Heiko Oberdiek oberdiek at uni-freiburg.de
Sat Dec 15 10:10:04 CET 2007


Hello Karl,

On Fri, Dec 14, 2007 at 07:11:39PM -0600, Karl Berry wrote:

> Hi Heiko,
> 
>     This way --expand-path seems useless?
> 
> Maybe, but it's intentional, as
>   http://tug.org/texinfohtml/kpathsea.html#Default-expansion explains.
> --expand-path doesn't know anything about the formats (which is what's
> needed to do the defaults), it just does the "pure" envvar expansions.

The documentation says (kpathsea.pdf/TL2007):
a)
| `--expand-path=string ' outputs the complete expansion of
| string as a colon-separated path.
b)
| This is useful to construct a search path for a program
| that doesn't accept recursive subdirectory specifications.
c)
| Nonexistent directories are culled from the output:

Remarks:

a) It isn't true. On Windows the path separator is ';', not ':'.
b) For what use is it to find the same files as
  `kpsewhich --format=texmfscripts'?
c) Nice feature.

> Is there a problem with using --show-path?  Simply:
> kpsewhich --show-path=texmfscripts

* Basically unknown output format, e.g. path separator.

However it could be part of the solution:
1. getting path list as --show-path
2. modifiying path list to add the subdirs.
3. Feeding it back to kpathsea library for file search with ls-R support.

Remarks:
1. A function would be nice that does not concatenate the result,
   but returns an array. Then LuaTeX could return a table.
   That would solve the path separator problem.
   Remains the questions about the possible output formats:
   * Preceding '!!'
   * Directory separator?
   * '//'?
3. `kpathsea --path' doesn't seem to support '!!'.

Yours sincerely
  Heiko <oberdiek at uni-freiburg.de>
-- 


More information about the tex-k mailing list