介紹

介紹

介紹

我有一個 TeX 文件,其中包含許多使用 TeXStudio 在 Windows 10 上使用 TeXLive 作為後端建置的參考。自從從 BibTeX 遷移到 BibLaTeX/Biber 以來,我一直無法訪問library.bib位於$TEXMFLOCAL.

我之前使用標準 BibTeX 來撤銷儲存在由以下人員建立的集中式/資料庫參考書目中的參考文獻:門德利BibTeX 格式。該庫位於$TEXMFLOCAL/bibtex/bib/local/library.bib(翻譯為D:\Dev\texlive\texmf-local\bibtex\bib\local\library.bib在我的系統上)

目前軟體

  • 門德利1.16
  • 2015年TeXLive
  • TeXStudio 2.10.8

編譯序列

pdfLatex -> BibTeX/Biber(視情況而定) -> pdfLatex -> pdfLatex

在調試這個問題的同時,我還清除了輔助檔案並從頭開始編譯,以消除損壞檔案的任何潛在問題。

BibTeX MWE

借助 BibTeX,我可以使用以下方式存取該庫:

\documentclass[10pt,a4paper,final]{article}
\usepackage{lipsum} % just for MWE

\begin{document}
  \section{Some Title}
    \lipsum[2]
  \section{Another Title}
    \lipsum[2]
    \par Summarised point \cite{TheRef2016}
  \bibliographystyle{unsrt}
  \bibliography{library}
\end{document}

BibLaTeX MWE(BibTeX 後端)

這個範例的功能如預期的那樣,仍然使用 BibTeX 作為後端。

\documentclass{article}
\usepackage{lipsum} % just for MWE
\usepackage[backend=bibtex]{biblatex}
\addbibresource{library.bib}

\begin{document}
  \section{Some Title}
    \lipsum[2]
  \section{Another Title}
    \lipsum[2]
    \par Some text here \cite{TheRef2016}
  \printbibliography
\end{document}

BibLaTeX MWE(Biber 後端)

位於同一目錄中的檔案.bib可以正常運作,如 wiki 上的 MWE 所示(MWEB(用於 BibLaTeX)-Tex.SE Wiki)。

但是,將其調整為像以前一樣使用集中參考書目會導致錯誤訊息,指出找不到參考書目文件。

\documentclass{article}
\usepackage{lipsum} % just for MWE
\usepackage[backend=biber]{biblatex}
\addbibresource{library.bib} % Also tried with \bibliography{library.bib}

\begin{document}
  \section{Some Title}
    \lipsum[2]
  \section{Another Title}
    \lipsum[2]
    \par Some reference \cite{TheRef2016}
  \printbibliography
\end{document}

以下是使用 Biber 編譯時給出的錯誤訊息:

INFO - Looking for bibtex format file 'library.bib' for section 0
ERROR - Cannot find 'library.bib'!

結論

我可能錯過了一些基本的東西,但在過去的幾個小時裡一直被這個問題困擾,沒有找到解決方案。

提前致謝。

相關內容