如何在 Texmaker 中使用 Biber 後端正確實作 Biblatex?

如何在 Texmaker 中使用 Biber 後端正確實作 Biblatex?

我相信我已經正確配置了所有內容(查看了其他問題)。我已在命令中替換bibtex %為,並選擇了 PdfLaTex + Bib(la)tex + PdfLaTex (x2) + View Pdf。biber %最小工作範例如下:

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[backend=biber,style=apa,natbib=true]{biblatex}

\addbibresource{Example.bib}

\begin{document}

\citet{Cocks2011} liked to play in the snow. The snow was rather cold \citep{Cocks2011}.


\printbibliography

\end{document}

參考書目範例:

@article{Cocks2011,
author = {Cocks, L. Robin M. and Torsvik, Trond H.},
doi = {10.1016/j.earscirev.2011.01.007},
issn = {00128252},
journal = {Earth-Science Reviews},
keywords = {Laurentia,Palaeozoic,palaeogeography},
number = {1-2},
pages = {1--51},
publisher = {Elsevier B.V.},
title = {{The Palaeozoic geography of Laurentia and western Laurussia: A stable craton with mobile margins}},
url = {http://linkinghub.elsevier.com/retrieve/pii/S001282521100016X},
volume = {106},
year = {2011}
}

執行 biber 然後快速建置會產生以下錯誤:

 ! Package keyval Error: uniqueprimaryauthor undefined.See the keyval package documentation for explanation.Type H <return> for immediate help.... ... dateabbrev=false}

答案1

你所做的是正確的。對我來說,您的程式碼只有一個小問題:apa樣式需要\DeclareLanguageMapping 聲明。另外,您應該加載csquotes.因此,將這些行添加到您的序言中:

\usepackage[english]{babel} 
\DeclareLanguageMapping{english}{english-apa}
\usepackage{csquotes}

在此輸入影像描述

編輯(20/02/2019):正如下面 @moewe 的評論所示,\DeclareLanguageMapping現在在最新版本的biblatex-apa.

相關內容