StackOverflow 上的回复在这里更好地建议了这个查询。
我花了一个小时左右的时间搜索这个主题,又花了几个小时试图找到我参考书目中的“错误”。以下 Tex 文件和参考书目几乎是最小的例子。有人能指出这两个文件有什么问题吗?谢谢。JN
垃圾.tex:
\documentclass[11pt,english]{cv}
\usepackage{verbatim}
\usepackage{url}
\usepackage[
backend=biber,
style=numeric,
natbib=true,
sorting=none,
url=true,
doi=true,
eprint=false
]{biblatex}
\bibliography{test}
\begin{document}
\title{All publications and works}
\maketitle
\nocite{*}
\printbibliography
\end{document}
test.bib:
@Misc{ quietpenguin,
author = {Nash, John C.},
title = {{Quiet Penguin: an open design concept for discussion}},
year = {2013},
month = {June},
note = {JNfile: 130630quietpenguin.pdf}
}
@article{bolkernonlin13,
author = {Bolker, Benjamin M. and Gardner, Beth and Maunder, Mark
and Berg, Casper W. and Brooks, Mollie and Comita, Liza
and Crone, Elizabeth and Cubaynes, Sarah and Davies, Trevor
and de Valpine, Perry and Ford, Jessica and Gimenez, Olivier
and K\'ery, Marc and Kim, Eun Jung and Lennert-Cody, Cleridy
and Magnusson, Arni and Martell, Steve and Nash, John
and Nielsen, Anders and Regetz, Jim and Skaug, Hans
and Zipkin, Elise},
title = {Strategies for fitting nonlinear ecological models in R, AD Model Builder, and BUGS},
journal = {Methods in Ecology and Evolution},
volume = {4},
number = {6},
issn = {2041-210X},
pages = {501--512},
year = {2013},
note = {Report on special 2-session workshop at National Center for
Ecological Analysis and Synthesis, Santa Barbara, CA in 2012.
JNfile: 13-bolker-strategies.pdf}
}
答案1
只需
@Misc{ quietpenguin,
author = {Nash, John C.},
title = {{Quiet Penguin: an open design concept for discussion}},
year = {2013},
month = {June},
note = {JNfile: 130630quietpenguin.pdf}
}
@article{bolkernonlin13,
author = {Bolker, Benjamin M. and Gardner, Beth and Maunder, Mark
and Berg, Casper W. and Brooks, Mollie and Comita, Liza
and Crone, Elizabeth and Cubaynes, Sarah and Davies, Trevor
and de Valpine, Perry and Ford, Jessica and Gimenez, Olivier
and K\'ery, Marc and Kim, Eun Jung and Lennert-Cody, Cleridy
and Magnusson, Arni and Martell, Steve and Nash, John
and Nielsen, Anders and Regetz, Jim and Skaug, Hans
and Zipkin, Elise},
title = {Strategies for fitting nonlinear ecological models in R, AD Model Builder, and BUGS},
journal = {Methods in Ecology and Evolution},
volume = {4},
number = {6},
issn = {2041-210X},
pages = {501--512},
year = {2013},
note = {Report on special 2-session workshop at National Center for
Ecological Analysis and Synthesis, Santa Barbara, CA in 2012.
JNfile: 13-bolker-strategies.pdf}
}
在.bib
文件中,我收到两个有关 MWE 的警告(在biblatex
3.7/Biber 2.7 下运行)
WARN - month field 'June' in entry 'quietpenguin' is not an integer - this will probably not sort properly.
WARN - The entry 'bolkernonlin13' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
根据您的编码设置方式,您可能不会收到第二次警告。
第一个警告你应该做些什么,而不是
year = {2013},
month = {June},
使用
date = {2013-06},
或者month = {6},
如果您必须坚持month
和year
(请注意,没有day
字段这样的东西!)。
特别是没有关于垃圾字符的警告。有时它们可以被忽略,但有时它们会警告你文件中存在问题。
警告看起来像(不是来自您的示例!)
WARN - BibTeX subsystem: C:\Users\<User>\AppData\Local\Temp\vdumzDAIKo\junchhars.bib_7000.utf8, line 2, warning: 22 characters of junk seen at toplevel
只需检查指示线(在本例中为第 2 线)及其周围是否有任何异常。
答案2
根据我的经验,biblatex 对某些字符非常挑剔。但这可能取决于您的字符编码。对我来说(Linux,UTF-8),您的示例仅在我删除转义的重音符号并直接添加时才有效:
@Misc{ quietpenguin,
author = {Nash, John C.},
title = {{Quiet Penguin: an open design concept for discussion}},
year = {2013},
month = {June},
note = {JNfile: 130630quietpenguin.pdf}
}
@article{bolkernonlin13,
author = {Bolker, Benjamin M. and Gardner, Beth and Maunder, Mark
and Berg, Casper W. and Brooks, Mollie and Comita, Liza
and Crone, Elizabeth and Cubaynes, Sarah and Davies, Trevor
and de Valpine, Perry and Ford, Jessica and Gimenez, Olivier
and Kéry, Marc and Kim, Eun Jung and Lennert-Cody, Cleridy
and Magnusson, Arni and Martell, Steve and Nash, John
and Nielsen, Anders and Regetz, Jim and Skaug, Hans
and Zipkin, Elise},
title = {Strategies for fitting nonlinear ecological models in R, AD Model Builder, and BUGS},
journal = {Methods in Ecology and Evolution},
volume = {4},
number = {6},
issn = {2041-210X},
pages = {501--512},
year = {2013},
note = {Report on special 2-session workshop at National Center for
Ecological Analysis and Synthesis, Santa Barbara, CA in 2012.
JNfile: 13-bolker-strategies.pdf}
}
答案3
我在空白处发现了我的“垃圾字符”!
TLDR;删除或注释掉条目之间的空格。
“垃圾字符”警告是为了提醒用户,条目之间有注释文本,这些文本未标有“%”。条目外的所有文本都将被忽略为注释,条目内的无关文本会产生语法错误。但 biber 会让您知道某些内容可能不在您想要的位置,这是件好事。(当然,“垃圾字符”并不是最明显的错误消息。)
它位于 .bib 文件中,我使用 JabRef 维护,通过从互联网上导入参考文献。在 BibLaTeX 模式下使用 JabRef,我相信一切都会以良好的 UTF-8 编码进行。我可以通过检查 Notepad++ 中的 .bib 文件轻松识别出一些编码问题,但一个“在顶层看到 3 个垃圾字符”警告仍然存在。通过注释掉所有可能有问题的条目,我被迫得出结论,“垃圾字符”实际上位于 BibLaTeX 条目之间的空白处。我只能删除触发警告的行附近的所有空行,确保我选择了整行。我的细心得到了回报,我注意到一个空格字符需要两次退格才能被删除。
我能够将有问题的台词复制并粘贴到天才Unicode 字符检查器应用程序Tim Whitlock 的警告,告诉我我复制的空白包含“零宽度无间断空格”。删除此字符后,biber 发出的最后一个“垃圾字符”警告就消失了。
通过将有问题的空格复制到示例 .bib 文件中,我能够将此错误引入到您的 .bin 文件中。这是 biber 输出的内容:
PS C:\Users\fskdm\workspace\characters-of-junk> biber .\document.bcf
INFO - This is Biber 2.12
INFO - Logfile is '.\document.blg'
INFO - Reading '.\document.bcf'
INFO - Using all citekeys in bib section 0
INFO - Processing section 0
INFO - Looking for bibtex format file 'test.bib' for section 0
INFO - LaTeX decoding ...
INFO - Found BibTeX data source 'test.bib'
WARN - month field 'June' in entry 'quietpenguin' is not an integer - this will probably not sort properly.
WARN - BibTeX subsystem: C:\Users\fskdm\AppData\Local\Temp\qA4TaotRo1\test.bib_12364.utf8, line 12, warning: 6 characters of junk seen at toplevel
INFO - Overriding locale 'en-US' defaults 'variable = shifted' with 'variable = non-ignorable'
INFO - Overriding locale 'en-US' defaults 'normalization = NFD' with 'normalization = prenormalized'
INFO - Sorting list 'none/global//global/global' of type 'entry' with template 'none' and locale 'en-US'
INFO - No sort tailoring available for locale 'en-US'
INFO - Writing '.\document.bbl' with encoding 'UTF-8'
INFO - Output to .\document.bbl
INFO - WARNINGS: 2
PS C:\Users\fskdm\workspace\characters-of-junk>
我试图将此“零宽度不间断空格”字符的示例复制并粘贴到此答案中,但没有成功。
这是应用程序的输出:“x”字符之间确实有一个字符。