几天来我一直在尝试解决 Biblatex 无法编译我的任何参考文献的问题。我运行的是 TeX Live 2013 (MacTeX),以 Aquamacs 作为编辑器,biber 1.7 和 biblatex 2.7。所有软件包都已更新。
奇怪的是,Biblatex 在运行时不会打印任何错误(实际上在迷你缓冲区中它显示该过程已成功)。日志中唯一显示问题的行是最后一行,它显示Biber abort trap: 6 at Wed Aug 14 09:33:22
如果我切换到 BibTex 而不是 Biblatex 作为后端,问题就会消失:BibTex 正确编译了所有参考文献(即使它给出了两个错误Your field is more than 20000 characters---line 1223 of file...
和"{" immediately follows a field name---line 1698 of file...
;在这两种情况下,BibTex 都以 结束I'm skipping whatever remains of this entry
并成功完成了工作)。
现在我尝试在同一个 tex 文件上的另一个 bib 文件上运行 Biblatex 作为后端:现在 Biblatex 编译成功。我猜 Biblatex 不喜欢我从 Zotero 导出的 bib 文件。
我从哪里开始使我的 bib 与 Biblatex 兼容?
MWE(当我backend=biber
用backend=biblatex
以下作品替换时):
%test.tex
\documentclass[a4paper]{article}
% Create command for paragraph style (new line after)
\newcommand{\myparagraph}[1]{\paragraph{#1}\mbox{}\\}
% Set the values for the bibliography
\usepackage[
backend=biber,
isbn=false,
url=false,
doi=false,
eprint=false,
]{biblatex}
%Point to the bibliography db
\addbibresource{ZoteroOutput.bib}
\begin{document}
\fullcite{greenwade93}
\include{test_chap}
\end{document}
%test_chap.tex
\fullcite{greenwade93}
第一个围兜条目(此处发布第一行、有问题的行和最后一行):
@book{rainie2012,
address = {Cambridge, {MA}},
title = {Networked: The New Social Operating System},
isbn = {0262017199},
shorttitle = {Networked},
publisher = {{MIT} Press},
author = {Rainie, Lee and Wellman, Barry},
year = {2012},
annote = {Extracted Annotations {(Tue} Jun 25 20:12:42 2013)
{"Are} people huddling alone in front of their screens? If they are connecting with someone online, is it a vague simulacrum of real community with people they could have seen, smelled, heard, and touched in the {\textquotedblleft} g ood old days" {(Rainie} and Wellman 2012:17)
{"Our} research supports the notion that small, densely knit groups like families, villages, and small organizations have receded in recent generations. A different social order has" {(Rainie} and Wellman 2012:17)
... 这里缺少几行(很长)
"technology supported task coordination, in the sense that everyone knew what everyone else was working on" {(Rainie} and Wellman 2012:199)
{"ICTs} supported {\textquotedblleft} distributed cognition, {\textquotedblright} enabling team members to share and integrate their own diverse perspectives" {(Rainie} and Wellman 2012:199)
"variety of {ICTs} enabled the teams to interact in many ways, using the media they felt was most appropriate to the task at hand" {(Rainie} and Wellman 2012:199) %%this is line 1223 (starting with "variety...)
"appears that networked work and networked organizations are better at linking ideas {\textemdash} bits {\textemdash} t han at linking parts {\textemdash} atoms" {(Rainie} and Wellman 2012:199)
{"ICTs} convey fewer social cues than in-person contacts. That is why people travel to meet in person: to build trust, develop nuanced understanding, and exchange tacit knowledge" {(Rainie} and Wellman 2012:200)
... 缺少行
{"Rochelle} C \^{o} t \'{e} Gabriele Plickert, and Barry Wellman, {\textquotedblleft} Does the Golden Rule, Rule? {\textquotedblright} in Contexts of Social Capital ed. {Ray-May} Hsung, Nan Lin, and Ronald Breiger {(London:} Routledge, 2009), 49 {\textendash} 71" {(Rainie} and Wellman 2012:348)
{"Eli} Pariser, T he Filter Bubble: What the Internet Is Hiding from You {(London:} Penguin, 2011" {(Rainie} and Wellman 2012:351)}
},
第二个参赛号码:
@book{shirky2008, %This is problematic line 1698
address = {New York, {NY}},
title = {Here Comes Everybody: The Power of Organizing Without Organizations},
isbn = {9780713999891},
shorttitle = {Here Comes Everybody},
abstract = {Read Clay Shirky's posts on the Penguin Blog. A revelatory examination of how the wildfirelike spread of new forms of social interaction enabled by technology is changing the way humans form groups and exist within them, with profound long-term economic and social effects-for good and for ill A handful of kite hobbyists scattered around the world find each other online and collaborate on the most radical improvement in kite design in decades. A midwestern professor of Middle Eastern history starts a blog after 9/11 that becomes essential reading for journalists covering the Iraq war. Activists use the Internet and e-mail to bring offensive comments made by Trent Lott and Don Imus to a wide public and hound them from their positions. A few people find that a world-class online encyclopedia created entirely by volunteers and open for editing by anyone, a wiki, is not an impractical idea. Jihadi groups trade inspiration and instruction and showcase terrorist atrocities to the world, entirely online. A wide group of unrelated people swarms to a Web site about the theft of a cell phone and ultimately goads the New York City police to take action, leading to the culprit's arrest. With accelerating velocity, our age's new technologies of social networking are evolving, and evolving us, into new groups doing new things in new ways, and old and new groups alike doing the old things better and more easily. You don't have to have a {MySpace} page to know that the times they are a changin'. Hierarchical structures that exist to manage the work of groups are seeing their raisons d'tre swiftly eroded by the rising technological tide. Business models are being destroyed, transformed, born at dizzying speeds, and the larger social impact is profound. One of the culture's wisest observers of the transformational power of the new forms of tech-enabled social interaction is Clay Shirky, {andHere} Comes Everybodyis his marvelous reckoning with the ramifications of all this on what we do and who we are. Like Lawrence Lessig on the effect of new technology on regimes of cultural creation, Shirky's assessment of the impact of new technology on the nature and use of groups is marvelously broad minded, lucid, and penetrating; it integrates the views of a number of other thinkers across a broad range of disciplines with his own pioneering work to provide a holistic framework for understanding the opportunities and the threats to the existing order that these new, spontaneous networks of social interaction represent. Wikinomics, yes, but also wikigovernment, wikiculture, wikievery imaginable interest group, including the far from savory. A revolution in social organization has commenced, and Clay Shirky is its brilliant chronicler.},
publisher = {Penguin Books},
author = {Shirky, Clay},
year = {2008},
keywords = {Francesco {PhD}}
},
编辑:在使用 Zotero 导出参考书目时删除注释(参见上面的“注释”字段)后,我部分解决了问题:现在 BibLatex 完成了这项工作(我能够运行 Latex 导入参考文献)。但我仍然收到每个条目第一行的警告(即使将文本编码更改为 UTF-8 后也是如此)。
这是运行 BibLatex(在 UTF-8 编码的 .bib 文件上)后的输出:
Running `Biber' on `myfile' with ``myfile''
INFO - This is Biber 1.7
INFO - Logfile is 'myfile.blg'
INFO - Reading 'myfile.bcf'
INFO - Found 1 citekeys in bib section 0
INFO - Found 9 citekeys in bib section 1
INFO - Found 1 citekeys in bib section 0
INFO - Found 7 citekeys in bib section 2
INFO - Found 1 citekeys in bib section 0
INFO - Found 15 citekeys in bib section 3
INFO - Found 1 citekeys in bib section 0
INFO - Processing section 0
INFO - Looking for bibtex format file '/my/path/ZoteroOutput.bib' for section 0
INFO - Found BibTeX data source '/my/path/ZoteroOutput.bib'
WARN - BibTeX subsystem: /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/H0EsS1omok/ZoteroOutput.bib_5763.utf8, line 13, warning: 1 characters of junk seen at toplevel
WARN - BibTeX subsystem: /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/H0EsS1omok/ZoteroOutput.bib_5763.utf8, line 28, warning: 1 characters of junk seen at toplevel
WARN - BibTeX subsystem: /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/H0EsS1omok
...缺失文字...
/ZoteroOutput.bib_5763.utf8, line 3954, warning: 1 characters of junk seen at toplevel
WARN - BibTeX subsystem: /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/H0EsS1omok/ZoteroOutput.bib_5763.utf8, line 3970, warning: 1 characters of junk seen at toplevel
WARN - BibTeX subsystem: /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/H0EsS1omok/ZoteroOutput.bib_5763.utf8, line 3985, warning: 1 characters of junk seen at toplevel
WARN - BibTeX subsystem: /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/H0EsS1omok/ZoteroOutput.bib_5763.utf8, line 3997, warning: 1 characters of junk seen at toplevel
WARN - BibTeX subsystem: /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/H0EsS1omok/ZoteroOutput.bib_5763.utf8, line 4009, warning: 1 characters of junk seen at toplevel
INFO - Overriding locale 'en_US.UTF-8' default tailoring 'variable = shifted' with 'variable = non-ignorable'
INFO - Sorting 'entry' list 'nty' keys
INFO - No sort tailoring available for locale 'en_US.UTF-8'
INFO - Processing section 1
INFO - Looking for bibtex format file '/Users/francesco/Dropbox/Papers/BibTex/ZoteroOutput.bib' for section 1
INFO - Overriding locale 'en_US.UTF-8' default tailoring 'variable = shifted' with 'variable = non-ignorable'
INFO - Sorting 'entry' list 'nty' keys
INFO - No sort tailoring available for locale 'en_US.UTF-8'
INFO - Processing section 2
INFO - Looking for bibtex format file '/my/path/ZoteroOutput.bib' for section 2
INFO - Overriding locale 'en_US.UTF-8' default tailoring 'variable = shifted' with 'variable = non-ignorable'
INFO - Sorting 'entry' list 'nty' keys
INFO - No sort tailoring available for locale 'en_US.UTF-8'
INFO - Processing section 3
INFO - Looking for bibtex format file '/my/path/ZoteroOutput.bib' for section 3
INFO - Overriding locale 'en_US.UTF-8' default tailoring 'variable = shifted' with 'variable = non-ignorable'
INFO - Sorting 'entry' list 'nty' keys
INFO - No sort tailoring available for locale 'en_US.UTF-8'
INFO - Writing 'annotated_bibliography.bbl' with encoding 'ascii'
"\x{fffd}" does not map to ascii at /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/par-6672616e636573636f/cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/Utils.pm line 949.
"\x{fffd}" does not map to ascii at /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/par-6672616e636573636f/cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/Utils.pm line 949.
"\x{fffd}" does not map to ascii at /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/par-6672616e636573636f/cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/Utils.pm line 949.
"\x{fffd}" does not map to ascii at /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/par-6672616e636573636f/cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/Utils.pm line 949.
"\x{fffd}" does not map to ascii at /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/par-6672616e636573636f/cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/Utils.pm line 949.
"\x{fffd}" does not map to ascii at /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/par-6672616e636573636f/cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/Utils.pm line 949.
"\x{fffd}" does not map to ascii at /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/par-6672616e636573636f/cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/Utils.pm line 949.
"\x{fffd}" does not map to ascii at /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/par-6672616e636573636f/cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/Utils.pm line 949.
"\x{fffd}" does not map to ascii at /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/par-6672616e636573636f/cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/Utils.pm line 949.
"\x{fffd}" does not map to ascii at /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/par-6672616e636573636f/cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/Utils.pm line 949.
"\x{fffd}" does not map to ascii at /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/par-6672616e636573636f/cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/Utils.pm line 949.
"\x{fffd}" does not map to ascii at /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/par-6672616e636573636f/cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/Utils.pm line 949.
"\x{fffd}" does not map to ascii at /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/par-6672616e636573636f/cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/Utils.pm line 949.
"\x{fffd}" does not map to ascii at /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/par-6672616e636573636f/cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/Utils.pm line 949.
"\x{fffd}" does not map to ascii at /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/par-6672616e636573636f/cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/Utils.pm line 949.
"\x{fffd}" does not map to ascii at /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/par-6672616e636573636f/cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/Utils.pm line 949.
"\x{fffd}" does not map to ascii at /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/par-6672616e636573636f/cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/Utils.pm line 949.
"\x{fffd}" does not map to ascii at /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/par-6672616e636573636f/cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/Utils.pm line 949.
"\x{fffd}" does not map to ascii at /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/par-6672616e636573636f/cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/Utils.pm line 949.
"\x{fffd}" does not map to ascii at /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/par-6672616e636573636f/cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/Utils.pm line 949.
"\x{fffd}" does not map to ascii at /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/par-6672616e636573636f/cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/Utils.pm line 949.
"\x{fffd}" does not map to ascii at /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/par-6672616e636573636f/cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/Utils.pm line 949.
"\x{fffd}" does not map to ascii at /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/par-6672616e636573636f/cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/Utils.pm line 949.
"\x{fffd}" does not map to ascii at /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/par-6672616e636573636f/cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/Utils.pm line 949.
"\x{fffd}" does not map to ascii at /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/par-6672616e636573636f/cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/Utils.pm line 949.
"\x{fffd}" does not map to ascii at /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/par-6672616e636573636f/cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/Utils.pm line 949.
"\x{fffd}" does not map to ascii at /var/folders/4b/v7yn1_5h8xq1p3006s6jvcg00000gn/T/par-6672616e636573636f/cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/Utils.pm line 949.
INFO - Output to annotated_bibliography.bbl
INFO - WARNINGS: 316
Biber finished at Wed Aug 21 18:46:40
答案1
我解决了从 Zotero 导出的 BibTex 文件与 BibLatex 之间的兼容性问题。我在此重述解决方案。显然,在读取 BibTex 文件时,BibLatex 比 BibTex 更明智……
为了正确地从 Zotero 导出参考书目,然后通过 BibLatex 导出到 Tex 文档中,我使用了这BibTeX 导出翻译器(由 Robin Wilson 修改)进行了两项重要调整:
1) 您需要在翻译器脚本的第 11 行进行设置"exportNotes": true,
("exportNotes": false,
当然,如果您在 Zotero 项目中添加了注释,例如从 PDF 中提取注释)。这将避免 BibLatex 在太长的字段上崩溃。
2)在第 2256 行,您需要告诉翻译人员避免在每个参考书目项目后添加逗号(逗号将导致 BibLatex 在每个条目的第一行(第一个除外)发出警告......)将此行:更改为此行Zotero.write((first ? "" : ",\n\n") + "@"+type+"{"+citekey);
:Zotero.write((first ? "" : "\n\n") + "@"+type+"{"+citekey);
BibTeX 导出翻译器的另一个可能问题来源可能是字符编码。在我的翻译器中,我将源文件的"exportCharset": "ISO-8859-1",
第 10 行保留为。我尝试将其更改为 UTF-8,但它引发了另一类问题,不是 BibLatex(它运行时没有错误),而是 Latex,
[1{/usr/local/texlive/2013/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./bib/price2012.tex [2]
! Undefined control sequence.
<to be read again> \edef \blx@tempa {193\x
{FFFD}\x {FFFD}\x {FFFD}219}
l.8 \printbibliography[heading=subbibliography]
对于每个引用部分。它还会弄乱某些项目的“页面”字段,输出:
Andrea B. Hollingshead。“群体决策中的信息抑制和地位持久性:传播媒介的影响”。《人类传播研究》23.2(1996 年),193fffdfffdfffd219。
然后我切换回"exportCharset": "ISO-8859-1",
,BibLatex 和 Latex 均运行正常,没有任何警告或错误。PDF 输出正确:
Andrea B. Hollingshead。“群体决策中的信息抑制和地位持久性:传播媒介的影响”。《人类传播研究》23.2(1996 年),193-219。
并且我还得到了带有哈贝马斯变音符号的正确输出:
编辑:页面字段的问题可能是由一个奇怪的“-”字符引起的,当您从互联网上下载引文时,有时会用这个字符来分隔两个页码。
答案2
所显示条目中包含的字段annote
和太长(请参阅引用的错误消息:)。我猜您不想在参考书目中打印它们,因此您可以删除它们。abstract
bib
Your field is more than 20000 characters
经过一些漂亮的打印和微小的修正,我得到了以下与 MiKTeX 2.9 和 Biber 一起运行的 MWE,没有错误(包中filecontents
只有一个 MWE,包括.tex
和.bib
文件):
\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{test1,
author = {Rainie, Lee and Wellman, Barry},
publisher = {{MIT} Press},
title = {Networked: The New Social Operating System},
shorttitle = {short},
address = {Cambridge, {MA}},
isbn = {0262017199},
year = {2012},
}
@book{test2,
address = {New York, {NY}},
title = {Here Comes Everybody: The Power of Organizing Without Organizations},
isbn = {9780713999891},
shorttitle = {Here Comes Everybody},
publisher = {Penguin Books},
author = {Shirky, Clay},
year = {2008},
keywords = {Francesco {PhD}},
}
\end{filecontents*}
\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
%\usepackage[Latin9]{inputenc}
% Set the values for the bibliography
\usepackage[
backend=biber
% backend=bibtex8
,isbn=false
,url=false
,doi=false
,eprint=false
]{biblatex}
%Point to the bibliography db
\addbibresource{\jobname.bib}
\begin{document}
\cite{test1} \cite{test2} \fullcite{test1}
\printbibliography
\end{document}
看来您的文件存在编码问题,因为您在评论中说您仍然收到有关垃圾字符的消息。请检查您在 Zotero 中使用的编码,您可能需要更改它... 这就是为什么我使用编辑@book{test1,
器中编写的新的 bib 条目第一行()以确保那里没有垃圾字符...
另一个问题似乎是 Zotero,
在 bib 条目的右括号后添加了一个逗号 ( )。我为我的 MWE 删除了这个逗号。不应该这样!正确的是:
@book{key,
name = {value},
name1 = {value1},
} <===== here no comma!
正如你所读到的在这篇博客中逗号是 Zotero 的一部分,它们似乎是滑稽的字符。
我刚刚发现一个老问题biblatex 或 biber 错误在我看来,这意味着 Zotero 无法bib
为 创建文件biblatex/biber
。因此,您应该使用 BibTeX 或更改参考书目程序,例如 jabref 或其他程序。
答案3
确认
},
在记录的结尾.bib 文件中的 .bib 会导致此错误消息。解决此问题的一种方法是删除 .bib 文件中的这些出现。不过要小心,因为您可能有该序列的实例内部记录。BibTeX(我想 LaBibTex 也是)习惯将标题等中的大写字母转换为小写字母,因为假设标题的第一个内容词之后的任何内容都不应大写。(我想是一些图书管理员决定这样做的。)但事实上,我们经常在标题中使用专有名词,它们需要保留大写字母;因此我们经常将标题(和一些其他字段)嵌入 {} 中,例如
title={Evidentiality in South Asian languages},
并且您肯定不想删除结束 } 后的逗号。
答案4
我收到了同样的错误信息
Your field is more than 20000 characters
但发现这里提出的解决方案对于我的情况来说太复杂了(尽管我承认它们在这种特定情况下可能是必要的)。
我发现对我有用的方法是将我的文本粘贴到文字处理器(例如 Word、eek)中,并从 bibtex 指出发生错误的位置往回数 20,000 个字符。注意在字符数中包含空格!我发现最近的条目中有一个未关闭的“}”。