apa7 Biblatex 空书目

apa7 Biblatex 空书目

我在 MikTex2.9/TexStudio2.12.22 中有两个论文大纲。它们都需要 APA 格式。我遇到了空书目/引文未定义警告的严重问题。

我已经使用 MikTex 控制台更新了我的所有软件包,但问题并没有解决。

我已多次删除缓存目录,但问题仍未解决。

这两个 LaTex 文件分别是 Morality.tex 和 Inequality.tex。这两个文件都位于各自论文的唯一顶级目录下的 tex 子目录中,并且两个位置都有相同的 Zotero 生成的 bib 文件。正如我所说,这些文档现在都只是外壳。出于调试目的,我在两个 tex 子目录中使用相同的 bib 文件,并在文件中使用相同的 \autocite。

对于 Morality.tex,以下内容可以正常工作并生成参考书目:

\documentclass[stu, 12pt, noextraspace, floatsintext, biblatex, draftall]{apa7}
\usepackage [american]{babel}
%\usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}
%\DeclareLanguageMapping{american}{american-apa}
\addbibresource{Morality.bib}
%
% A bunch of other \usepackage commands ommited for brevity
%
\begin{document}
    \maketitle
    \section{Introduction}
%
% Text omitted for brevity
%
    \autocite{boxAllModelsAre}
    \printbibliography
\end{document}

以下也可以正常工作:

\documentclass[stu, 12pt, noextraspace, floatsintext, draftall]{apa7}
\usepackage [american]{babel}
\usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}
%\DeclareLanguageMapping{american}{american-apa}
\addbibresource{Morality.bib}
%
% A bunch of other \usepackage commands ommited for brevity
%
\begin{document}
    \maketitle
    \section{Introduction}
%
% Text omitted for brevity
%
    \autocite{boxAllModelsAre}
    \printbibliography
\end{document}

如果我删除

sortcites=true,sorting=nyt,

然后我从 PDFLaTex 获得以下内容,但 Biber 无法运行:

line 34: Token not allowed in a PDF string (PDFDocEncoding):(hyperref) removing `\hbox'
line 34: Token not allowed in a PDF string (PDFDocEncoding):(hyperref) removing `\hsize'
line 34: Token not allowed in a PDF string (PDFDocEncoding):(hyperref) removing `\hss'
line 34: Token not allowed in a PDF string (PDFDocEncoding):(hyperref) removing `\hss'
line 72: Citation 'boxAllModelsAre' on page 6 undefined
line 73: Empty bibliography
: There were undefined references.
: Please (re)run Biber on the file:(biblatex) Morality(biblatex) and rerun LaTeX afterwards.

在另一个文件 Inequality.tex 上,我找不到任何可以正常工作的命令组合。我总是得到空书目错误,当 Biber 运行时,它会告诉我“Morality.bib”未找到。

这是我在与加载 BibLaTex 相关的日志中获得的内容:

Package biblatex Info: Trying to load bibliography style 'apa'...
Package biblatex Info: ... file 'apa.bbx' found.

("C:\Program Files\MiKTeX 2.9\tex/latex/biblatex-apa\apa.bbx"
File: apa.bbx 2020/04/08 v9.9 APA biblatex references style
Package biblatex Info: Trying to load bibliography style 'standard'...
Package biblatex Info: ... file 'standard.bbx' found.

("C:\Program Files\MiKTeX 2.9\tex/latex/biblatex/bbx\standard.bbx"
File: standard.bbx 2019/12/01 v3.14 biblatex bibliography style (PK/MW)
\c@bbx:relatedcount=\count431
\c@bbx:relatedtotal=\count432
))
Package biblatex Info: Trying to load citation style 'apa'...
Package biblatex Info: ... file 'apa.cbx' found.

("C:\Program Files\MiKTeX 2.9\tex/latex/biblatex-apa\apa.cbx"
File: apa.cbx 2020/04/08 v9.9 APA biblatex citation style
Package biblatex Info: Delimiter 'nameyeardelim' in context '' already defined,
 overwriting.
Package biblatex Info: Delimiter 'nameyeardelim' in context 'textcite' already 
defined, overwriting.
Package biblatex Info: Delimiter 'andothersdelim' in context '' already defined
, overwriting.
Package biblatex Info: Redefining '\parencite'.
Package biblatex Info: Redefining '\fullcite'.
Package biblatex Info: Redefining '\citeyear'.
Package biblatex Info: Redefining '\cite'.
Package biblatex Info: Redefining '\footcite'.
Package biblatex Info: Redefining '\textcites'.
Package biblatex Info: Redefining '\cites'.
Package biblatex Info: Redefining '\parencites'.
Package biblatex Info: Redefining '\footcites'.
Package biblatex Info: Redefining '\footcitetexts'.
Package biblatex Info: Redefining '\smartcites'.
Package biblatex Info: Redefining '\textcite'.
Package biblatex Info: Redefining '\citeauthor'.
)
Package biblatex Info: Trying to load configuration file...
Package biblatex Info: ... file 'biblatex.cfg' found.

("C:\Program Files\MiKTeX 2.9\tex/latex/biblatex\biblatex.cfg"
File: biblatex.cfg 
))

有什么建议么?

我要重启这台机器进入 ArchLinux,然后尝试在 TexLive 下使用 TexStudio。我已经设置好了,但还没能找到一个可读性足够强的编辑器配色方案,否则我早就去那里了。

答案1

现在我不确定这是否是 BibLaTex/MikTex 问题。它最初只出现在我的台式电脑上。上面的文件在我的 Windows 笔记本电脑上的 MikTex/TexStudio 下以及在我的台式电脑上的 ArchLinux 上的 TexLive/TexStudio 下都能正确编译。然而,当我在笔记本电脑上向这些文件添加文本时,我开始遇到同样的问题。

最终,我在两台机器上用 TexLive 2020 替换了 MikTex,用 Kile 替换了 TexStudio,两台机器上一切都运行良好。我已经是 KDE/Kate 的粉丝了,我对 Kile 非常满意,用户体验很棒。

相关内容