[tex-live] Hook in kpathsea for files not found?

Zdenek Wagner zdenek.wagner at gmail.com
Thu Feb 21 15:15:55 CET 2013

2013/2/21 Dr. Werner Fink <werner at suse.de>:
> Hi,
> as I've been asked from users if it is possible to provide a message for
> each file not found, I'd like to asked for a feature in the kpathsea library.
> Such a feature may provide the possibility to show messages how to install a
> missed package like texlive-colortab or a virtual dependency like
> `tex(colortab.sty)' and how to install them.  This would be useful for TeXLive
> upstream as well as for distributions providing TeXLive packages[1,2].
I am afraid it will not be useful at all. Kpathsea looks at too many
places. Moreover, it may be instructed to look into the ls-R files and
not to the tree, thus a failure to find the file in ls-R will not tell
you which directory could contain the file. If you want to install the
package not existing in the TeX Live, you may wish to put it to
texmf-local. You should know TDS and structure the package that way.
Now the question is how to find texmf-local. It is simple:

kpsewhich --var-value TEXMFLOCAL


kpsewhich --var-value TEXMF

will give you the list of all TEXMF trees.

You can also use --show-path option to see where a specified file type
is expected. And kpsewhich <filename> will tell you whether the file
will be found.
>    Werner
> [1] https://aspratyush.wordpress.com/2012/12/
> [2] http://jaegerandi.blogspot.de/2012/12/easy-way-to-install-tex-packages-for.html
> --
>   "Having a smoking section in a restaurant is like having
>           a peeing section in a swimming pool." -- Edward Burr

Zdeněk Wagner

More information about the tex-live mailing list