我尝试从与 .bib 文件不同的目录运行 bibtex。根据“man bibtex”中的描述,我应该能够设置环境变量 BIBINPUTS 以包含我的 .bib 文件的位置。但这对我来说不起作用。我做错了什么?
$ # Mac OS X 10.7.4
$ bibtex -v
BibTeX 0.99d (TeX Live 2012)
kpathsea version 6.1.0
$BIBINPUTS=/path/to/directory
$bibtex mypaper
The style file: plain.bst
I couldn't open database file thesis.bib
---line 62 of file mypaper.aux
: \bibdata{thesis
: }
I'm skipping whatever remains of this command
I found no database files---while reading file mypaper.aux
Warning--I didn't find a database entry for "Hamlet"
Warning--I didn't find a database entry for "SP"
Warning--I didn't find a database entry for "Lbook"
Warning--I didn't find a database entry for "companion"
Warning--I didn't find a database entry for "book"
Warning--I didn't find a database entry for "Metafont"
我确信thesis.bib
存在/path/to/directory
。
有什么方法可以验证我bibtex
正在尝试读取的目录吗?
答案1
谢谢@jon。
要与 bibtex 一起使用BIBINPUTS
,必须将其导出到传递给子进程的环境中。所以
$export BIBINPUTS=/path/to/directory
$bibtex mypaper