Subject: Bug#2037: bibtex not searching $TEXINPUTS

From: Herbert Thielen <[email-masked]>
Date: Wed, 4 Sep 1996 14:44:31 +0200 (MET DST)

Just noticed this old bug report. In my opinion it's a bug in the
kpathsea library (which is linked statically in bibtex and is not
included in the kpathsea package, but in the kpathsea package source).

You can verify this behaviour by using kpsewhich (included in package
kpathsea):

  ernie:~$ touch /tmp/foo.bst
  ernie:~$ KPATHSEA_DEBUG=8 TEXMFCNF=. TEXINPUTS=/tmp kpsewhich foo.bst
  kdebug:Search path for .cnf files (from TEXMFCNF environment variable)
  [...]
  kdebug:Search path for .bst files (from compile-time paths.h)
  kdebug:  = .:/bibtex/bst:/usr/lib/texmf/bibtex/bst
  kdebug:  before expansion = .:$texmfloc/bibtex/bst:/usr/lib/texmf/bibtex/bst
  kdebug:  font override var applies = 0
  kdebug:  application config file path = (none)
  kdebug:  texmf.cnf path = (none)
  kdebug:  compile-time path = .:$texmfloc/bibtex/bst:/usr/lib/texmf/bibtex/bst
  kdebug:  suffix = .bst
  kdebug:  search only with suffix = 0
  kdebug:  runtime generation program = (none)
  kdebug:  extra program args = (none)

BSTINPUTS gets used correctly:

  ernie:~$ KPATHSEA_DEBUG=8 TEXMFCNF=. BSTINPUTS=/tmp kpsewhich foo.bst
  kdebug:Search path for .cnf files (from TEXMFCNF environment variable)
  [...]
  kdebug:Search path for .bst files (from BSTINPUTS environment variable)
  kdebug:  = /tmp
  kdebug:  before expansion = /tmp
  kdebug:  font override var applies = 0
  kdebug:  application config file path = (none)
  kdebug:  texmf.cnf path = (none)
  kdebug:  compile-time path = .:$texmfloc/bibtex/bst:/usr/lib/texmf/bibtex/bst
  kdebug:  suffix = .bst
  kdebug:  search only with suffix = 0
  kdebug:  runtime generation program = (none)
  kdebug:  extra program args = (none)

ernie:~$ dpkg -l kpathsea
Desired=Unknown/Install/Remove/Purge
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name            Version        Description
+++-===============-==============-============================================
ii  kpathsea        2.6-2          Path searching for TeX & friends

Regards
	Herbert.

---

From: [email-masked]
Date: Thu, 5 Sep 96 07:28 EDT

Bibtex has nothing to do with TEXINPUTS. As you can see here from the file
/usr/lib/texmf/web2c/texmf.cnf, bibtex is supposed to listen to its own
variables:

	% BibTeX bibliographies and style files.
	BIBINPUTS = .:$texmfloc/bibtex/bib//:$TEXMF/bibtex/bib
	BSTINPUTS = .:$texmfloc/bibtex/bst//:$TEXMF/bibtex/bst    

-- 
Dirk Eddelb"uttel                             http://qed.econ.queensu.ca/~edd

---

From: Herbert Thielen <[email-masked]>
Date: Thu, 5 Sep 1996 14:01:41 +0200 (MET DST)

[...]

Then the kpathsea doku is wrong and the bug should be reassigned to
kpathsea (I think it should be reassigned to kpathsea anyhow). From
/usr/info/kpathsea.info.gz:

    TeX environment variables
    =========================

      Kpathsea defines a sequence of environment variables to search for
    each file type it supports.  This makes it easy for different programs
    to check the same environment variables, in the same order.

      The following table lists the environment variables searched for each
    file type in the order they are searched (and a brief description of the
    file type).  That is, only if the first variable is unset is the second
    variable checked, and so on.  If none are set, various other things are
    checked; *note Path sources::..
[...]
    `.bst'
	 (BibTeX style file) `BSTINPUTS', `TEXINPUTS'

Regards
	Herbert.