构建源外参考书目:无法打开“blx.bib”

构建源外参考书目:无法打开“blx.bib”

我的Makefile

MK=lualatex -output-directory=$(TARGET)
TEX_FILE=report
TARGET=./target

$(TEX_FILE):
        $(MK) $(TEX_FILE).tex
        bibtex $(TARGET)/$(TEX_FILE)
        $(MK) $(TEX_FILE).tex
        $(MK) $(TEX_FILE).tex

因此,在运行时执行的命令是:lualatex -output-directory=./target report.tex

report.tex

\usepackage[...]{biblatex}
\bibliography{report}

Bib(la)tex 运行良好,target/report-blx.bib

但第二次运行时,lualatex出现抱怨:

I couldn't open database file report-blx.bib
---line 18 of file ./target/report.aux
 : \bibdata{report-blx
 :                    ,report}

答案1

用作biber后端biblatex

\usepackage[backend=biber,...]{biblatex}

biber并在bibtexMakefile 中使用:

biber --output_directory=$(TARGET) $(TEX_FILE)

相关内容