Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

On page 27, the kpathsea manual states:

  • [A search path is a colon-separated list of path elements.]
  • ...
  • 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 somebody could point me to a more accurate description or provide an explanation how it works. The following are some questions I have.

  1. 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 suspect the order is given by: longest prefix first ... shortest prefix last.)
  2. Is e a prefix of itself? (I supect yes.)

The following is a possible solution to Question 1. Could it be that there is an implicit assumption that there may be at most one prefix of any path element that can may an ls-R database? If so, should the directory containing the ls-R database be in TEXMFDBS? It would make sense. For example, find /usr/local/texlive -name ls-R gives:

/usr/local/texlive/texmf-local/ls-R
/usr/local/texlive/2011/texmf/ls-R
/usr/local/texlive/2011/texmf-dist/ls-R
/usr/local/texlive/2011/texmf-var/ls-R
/usr/local/texlive/2011/texmf-config/ls-R

and kpsewhich -var-value=TEXMFDBS gives:

{!!/usr/local/texlive/2011/texmf-config,
!!/usr/local/texlive/2011/texmf-var,
!!/usr/local/texlive/2011/texmf,
!!/usr/local/texlive/2011/../texmf-local,
!!/usr/local/texlive/2011/texmf-dist}

EDIT (2 March, 2012) I sent an email to the kathsea mailing list. I got a reply from Karl Berry suggesting that there should be no more than one ls-R database along one path leading from the root to any leaf. Also, the directory containing the ls-R database should be in TEXMFDBS.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

The expert suggests that there should be no more than one ls-R database along one path leading from the root to any leaf. Also, the directory containing the ls-R database should be in TEXMFDBS.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.