我正在尝试在我的文档中使用 biblatex、biblatex-apa 和 biber,但我认为去年左右的可怕的 biblatex 更新让我陷入困境。
我的情况最像这一个,但我不能使用建议的答案将我的后端更改为 bibtex,因为 biblatex-apa 要求 biber 作为后端。但是,当我将后端更改为 bibtex 并且不使用 APA 样式时,它会编译而没有错误,尽管不是期刊所需的格式。
理想情况下,我希望帮助使这些程序、biber、biblatex-apa 和 biblatex 与我的 XeLaTeX(2016)兼容,但我想如果有一种类似的方法可以在使用 backend=bibtex 时获得类似 APA 或足够相似的格式,那也是可以的。
谢谢你!
示例文档文本:
\documentclass[12pt]{article}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=apa, backend=biber]{biblatex}
\DeclareLanguageMapping{american}{american-apa}
\addbibresource{mybib.bib}
\begin{document}
\maketitle
\cite{foo}
\printbibliography
\end{document}
编译后生成的代码如下:
This is XeTeX, Version 3.14159265-2.6-0.99996 (TeX Live 2016) (preloaded format=xelatex)
restricted \write18 enabled.
entering extended mode
(./xz-zz-xing.tex
LaTeX2e <2016/03/31> patch level 3
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texmf-dist/tex/latex/base/size12.clo))
(/usr/share/texmf-dist/tex/latex/geometry/geometry.sty
(/usr/share/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
(/usr/share/texmf-dist/tex/generic/oberdiek/ifvtex.sty)
(/usr/share/texmf-dist/tex/generic/ifxetex/ifxetex.sty))
(/usr/share/texmf-dist/tex/xelatex/xecjk/xeCJK.sty
(/usr/share/texmf-dist/tex/latex/l3kernel/expl3.sty
(/usr/share/texmf-dist/tex/latex/l3kernel/expl3-code.tex)
(/usr/share/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def))
(/usr/share/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty)
(/usr/share/texmf-dist/tex/latex/l3packages/xparse/xparse.sty)
(/usr/share/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty)
(/usr/share/texmf-dist/tex/latex/fontspec/fontspec.sty
(/usr/share/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
(/usr/share/texmf-dist/tex/latex/base/fontenc.sty
(/usr/share/texmf-dist/tex/latex/euenc/eu1enc.def)
(/usr/share/texmf-dist/tex/latex/euenc/eu1lmr.fd))
(/usr/share/texmf-dist/tex/xelatex/xunicode/xunicode.sty
(/usr/share/texmf-dist/tex/latex/tipa/t3enc.def
(/usr/share/texmf-dist/tex/latex/euenc/eu1lmss.fd))
(/usr/share/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/share/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/share/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/share/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
(/usr/share/texmf-dist/tex/latex/graphics-def/xetex.def))))
(/usr/share/texmf-dist/tex/latex/fontspec/fontspec.cfg)))
(/usr/share/texmf-dist/tex/xelatex/xecjk/xunicode-addon.sty)
(/usr/share/texmf-dist/tex/xelatex/xunicode/xunicode.sty
*** Reloading Xunicode for encoding 'EU1' ***
) (/usr/share/texmf-dist/tex/xelatex/xecjk/xunicode-extra.def)
(/usr/share/texmf-dist/tex/xelatex/xecjk/xeCJK.cfg))
(/usr/share/texmf-dist/tex/generic/babel/babel.sty
(/usr/share/texmf-dist/tex/generic/babel-english/english.ldf
(/usr/share/texmf-dist/tex/generic/babel/babel.def
(/usr/share/texmf-dist/tex/generic/babel/xebabel.def))))
(/usr/share/texmf-dist/tex/latex/csquotes/csquotes.sty
(/usr/share/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
(/usr/share/texmf-dist/tex/latex/csquotes/csquotes.def)
(/usr/share/texmf-dist/tex/latex/csquotes/csquotes.cfg))
(/usr/share/texmf-site/tex/latex/biblatex/biblatex.sty
(/usr/share/texmf-dist/tex/generic/iftex/iftex.sty)
(/usr/share/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
(/usr/share/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
(/usr/share/texmf-dist/tex/generic/oberdiek/ifluatex.sty)
(/usr/share/texmf-dist/tex/generic/oberdiek/ltxcmds.sty))
(/usr/share/texmf-dist/tex/latex/oberdiek/kvoptions.sty
(/usr/share/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
(/usr/share/texmf-dist/tex/generic/oberdiek/etexcmds.sty)))
(/usr/share/texmf-dist/tex/latex/logreq/logreq.sty
(/usr/share/texmf-dist/tex/latex/logreq/logreq.def))
(/usr/share/texmf-dist/tex/latex/base/ifthen.sty)
(/usr/share/texmf-dist/tex/latex/url/url.sty)
(/usr/share/texmf-dist/tex/generic/xstring/xstring.sty
(/usr/share/texmf-dist/tex/generic/xstring/xstring.tex))
(/usr/share/texmf-site/tex/latex/biblatex/blx-dm.def)
(/usr/share/texmf-site/tex/latex/biblatex-apa/dbx/apa.dbx)
(/usr/share/texmf-site/tex/latex/biblatex/blx-compat.def)
(/usr/share/texmf-site/tex/latex/biblatex/biblatex.def)
(/usr/share/texmf-site/tex/latex/biblatex-apa/bbx/apa.bbx
(/usr/share/texmf-site/tex/latex/biblatex/bbx/standard.bbx)
! Illegal parameter number in definition of \blx@defformat@d.
<to be read again>
3
l.368 ...{\usebibmacro{name:apa:last-first}{#1}{#3
}{#4}{#5}{#7}?}}
?
! Illegal parameter number in definition of \blx@defformat@d.
<to be read again>
4
l.368 ...ebibmacro{name:apa:last-first}{#1}{#3}{#4
}{#5}{#7}?}}
?
! Illegal parameter number in definition of \blx@defformat@d.
<to be read again>
5
l.368 ...macro{name:apa:last-first}{#1}{#3}{#4}{#5
}{#7}?}}
?
它继续这样运行很多行,直到决定开始处理文档,编译时没有出现更多问题,但是参考书目有些奇怪。
另外,当我运行 biber 时,我收到很多警告但没有错误,并且没有兼容性问题,因为我的 biblatex 是 3.4r-1,而我的 biber 是 2.5,根据 PDF 文档中的兼容性矩阵,它们是兼容的。
我希望这些信息足以提供帮助!
答案1
该问题是由于版本不匹配造成的。
您运行的是biblatex
3.4 和 Biber 2.5。但只有6.6。适合您的biblatex-apa
正确版本应该是 6.9。biblatex-apa
biblatex
在 TeX live 的非存储库系统上(参见例如如何在 Debian 或 Ubuntu 上安装“原始” TeXLive?) 可轻松用于tlmgr
将所有相关软件包更新为正确的 CTAN 版本。CTAN 版本 (几乎) 始终匹配,目前我们有biblatex
3.7、Biber 2.7 和biblatex-apa
7.4。
由于你只能使用不可更新的 TeX 发行版,因此你必须biblatex-apa
手动安装正确的版本。从https://github.com/plk/biblatex-apa/releases/tag/v6.9并按照说明进行操作(方法 3:“手动安装”)如何在 Linux 系统上安装单独的软件包?。