Include all *.bib files in one directory to a bibliography
By default, in TeX Live bibtex
looks for local .bib
files in your local texmf/bibtex/bib
folder. So you can put your directory containing the bib files there, or make a symbolic link inside that folder to your directory. Either one will work. Then you just use \bibliography{a,b,c}
for .bib
file a.bib
, b.bib
etc.
As far as I know, there is no built in way to add all files in one directory, something like \bibliography{*.bib}
.
However, you could set the environment variable BIBINPUTS
to ./dir:
; then you will be able to use \bibliography{a,b,c}
to load ./dir/a.bib
, ./dir/b.bib
and so on. You could also set as many paths as you want, something like ./dirA:./dirB:./dirC:
. The colon here is used to separate paths and when used on the beginning or in the end, is used to add the default path.
To set BIBINPUTS
you could use env BIBINPUTS='./dir:' pdftex yourfile.tex
in your command line or Makefile.
There is also a BSTINPUTS
variable to set paths for .bst
files.