[tex-live] search path

Dan Luecking luecking at uark.edu
Wed Jan 6 06:13:23 CET 2010

On Tue Jan 5 at 15:39:16 CET 2010 Herbert Voss 
(<mailto:tex-live%40tug.org?Subject=Re%3A%20%5Btex-live%5D%20search%20path&In-Reply-To=%3C4B434F14.4050600%40FU-Berlin.DE%3E>Herbert.Voss at FU-Berlin.DE)

>I have two files pstricks-add.tex. One in
>and another one in
>a "kpsewhich pstricks-add.tex" finds the one in the main
>tex tree:
><http://www.tug.org/pipermail/tex-live/2010-January/http://tug.org/mailman/listinfo/tex-live>voss at shania:~> 
>kpsewhich pstricks-add.tex
>my local pstricks-add.tex will only be found before the one
>in the main tree, when it is saved in the ../tex/generic part
>of my local tree. But in the past kpsewhich found *.tex files,
>saved in ../texmf-local/tex/latex/.., always _before_ those,
>which are in the main ../tex/generic/.. part.

I have run across this, too. In fact, I noticed that kpsewhich
was finding a different file than tex was actually using.

The reason for this is that when you use kpsewhich without
specifying a program name, the bare TEXINPUTS variable is used,
which, in the default texmf.cnf, is set to
Thus, /tex/kpsewhich/ (usually nonexistent) is checked first
in all trees (texmf-local usually before texmf-dist) and then
tex/generic/ (in all trees), and then other subdirectories of
/tex/, including latex.

I rather dislike this behavior, but it is hard to say what
ought to be the default value for TEXINPUTS. I myself get
around this by defining the TEXINPUTS.kpsewhich variable,
set to
since that is the order I usually want. And when I want to
emulate some other tex binary, I use kpsewhich with the
--progname option.

If you use latex, then, because TEXINPUTS.latex is
you will get latex searched before generic and your local
version will be used. Ideally, if you want to maintain
local versions that preempt distributed versions, it is
best to maintain them in parallel locations. (In my case,
it was a problem with duplicated filenames for completely
different files.)

I really don't know what the behavior of kpsewhich was before
TL2009, since I never encountered such a problem before.


Daniel H. Luecking
Department of Mathematical Sciences
1 University of Arkansas
Fayetteville, AR 72701 

More information about the tex-live mailing list