Biber-“cite”宏在第二次编译时失败,而在参考书目中找到了条目

Biber-“cite”宏在第二次编译时失败,而在参考书目中找到了条目

我正在尝试使用 BibLatex 设置参考书目。运行后,即使是一条\cite{}语句也会在第二次编译时导致错误。pdflatexbiber

运行命令的顺序如下:

pdflatex mwe.tex
biber mwe (optionally multiply by 2 and/or add a bcf extension)
pdflatex mwe.tex

运行 biber 并尝试第二次运行 pdflatex 后,引擎出现错误,\cite{aa}并且没有打印任何参考书目。

以下是最小(尚未)可运行的示例:

\documentclass{article}
\usepackage[backend=biber, date=short, style=apa]{biblatex}
\title{some title}
\author{Authorov A. A.}
\date{\today}
\addbibresource{references.bib}
\begin{filecontents}{references.bib}
@misc{aa,
  author = {Some Author A.},
  title = {Some title},
  year = {2016}
}
\end{filecontents}
\begin{document}
\maketitle
Some sentence\cite{aa}

\printbibliography
\end{document}

Blg 文件输出:

[0] Config.pm:354> INFO - This is Biber 2.7
[1] Config.pm:357> INFO - Logfile is 'mwe.blg'
[28] biber-MSWIN64:303> INFO - === 
[51] Biber.pm:359> INFO - Reading 'mwe.bcf'
[136] Biber.pm:835> INFO - Found 1 citekeys in bib section 0
[149] Biber.pm:3670> INFO - Processing section 0
[168] Biber.pm:3840> INFO - Looking for bibtex format file 'references.bib' for section 0
[171] bibtex.pm:1435> INFO - Decoding LaTeX character macros into UTF-8
[176] bibtex.pm:1292> INFO - Found BibTeX data source 'references.bib'
[187] UCollate.pm:68> INFO - Overriding locale 'en-US' defaults 'variable = shifted' with 'variable = non-ignorable'
[187] UCollate.pm:68> INFO - Overriding locale 'en-US' defaults 'normalization = NFD' with 'normalization = prenormalized'
[188] Biber.pm:3499> INFO - Sorting list 'apa/global/' of type 'entry' with scheme 'apa' and locale 'en-US'
[189] Biber.pm:3505> INFO - No sort tailoring available for locale 'en-US'
[191] bbl.pm:608> INFO - Writing 'mwe.bbl' with encoding 'ascii'
[192] bbl.pm:712> INFO - Output to mwe.bbl

我正在运行 MikTex 2.9(64 位)、Biber 2.7 和 Windows 10。

看过类似的问题后,他们要么不使用 Biber,要么问题似乎有不同的根源。非常感谢任何提示和技巧。提前谢谢您!

答案1

这是一个解决方案:

\documentclass{article}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[backend=biber, date=short, style=apa]{biblatex}
\DeclareLanguageMapping{american}{american-apa}

\begin{filecontents}{\jobname.bib}
@misc{aa,
  author = {Some Author A.},
  title = {Some title},
  year = {2016}
}
\end{filecontents}

\addbibresource{\jobname.bib}

\def\printdateextralabel{\printlabeldateextra}

\title{some title}
\author{Authorov A. A.}
\date{\today}



\begin{document}
\maketitle
Some sentence\cite{aa}

\printbibliography
\end{document}

我从这里复制了代码:https://tex.stackexchange.com/a/329497/120578

可能与上述重复。

相关内容