[tex-k] kpathsea Question

Karl Berry karl at freefriends.org
Fri Mar 2 00:56:19 CET 2012

Hi Marc,

        To check a particular path element e, Kpathsea first sees if a
        prebuilt database applies to e, i.e., if the database is in a
        directory that is a prefix of e. If so, the path specification
        is matched against the contents of the database.

    A few things aren't clear in the last sentence of this
    description. I'd be much obliged if you could point me to a more
    accurate description or provide an explanation how it works. 

Looking at the source and/or experimentation are really the only ways to
get definitive answers.  I don't doubt the documentation could be
improved, though, and will try, once I fully understand what you're
getting at.

     * The path element e may have several prefixes. In what order are
     they searched?  For example, if e is equal to /a/b/c, then /a and
     /a/b are both prefixes of e.

I'm not sure if /a/ls-R or /a/b/ls-R would be found first, if both
exist.  Is that what you're asking?

     * Is e a prefix of itself?

Do you mean, would /a/b/c/ls-R be used to find /a/b/c/somefile?  I
believe the answer is yes, but I'm not completely sure without doing the
    implicit assumption that there may be at most one prefix of any path
    element that can may an ls-R database? 

I guess so.  That's all I ever remember seeing or using.  Is it useful
to have multiple ls-R's with different prefixes?  I don't see how ...

    If so, should the directory containing the ls-R database be in

Yes.  See also the comments at TEXMFDBS in texmf.cnf.

Just wondering ... what are you doing that needs explanations of such
obscure corners of system :)?


More information about the tex-k mailing list