我知道这不是一个特定的 LaTeX 问题而是一个biblatex
/Biber 问题,但我不知道在哪里可以问。
我将操作系统从 Win 7(我的笔记本电脑)更改为 PC(Win 10)。在我的笔记本电脑上一切都很好。Biber 编译一切顺利,没有问题。但现在我在编译时收到以下错误:
ERROR - BibTeX subsystem: C:\Users\SomeUser\AppData\Local\Temp\B8fkc98Xa4\HumanCapitalIndustrialRevolution.bib_10848.utf8,
line 383,
syntax error: found ",",
expected one of: number, name (entry type, key, field, or macro name),
end of entry ("}" or ")") or quoted string ({...} or "...")
我搜索了好久,查看了好几个帖子和问题。唯一找到的类似内容是这个问题:biber 生成空的 bbl 文件
我认为可以通过执行相同的操作(更改用户环境变量/TeXStudio biber 路径)来解决问题,但我不知道该怎么做。即使在高级设置中也找不到 TeXStudio 中类似的东西。
希望有人能帮助我。该文件是在 Win 10 上使用 TeXStudio 编译的。我知道在这个论坛上添加 MWE 是未写明的必须做的,但我看不出这会对答案有什么帮助,因为 pdf 的创建没有问题,TeXStudio 只是无法编译参考书目,从而无法编译参考文献。
编辑 1 更多信息 +.bgl
文件
值得一提的是,Biber 生成一个空的 bbl 文件。
该.bgl
文件包含以下内容:
[0] Config.pm:304> INFO - This is Biber 2.12
[0] Config.pm:307> INFO - Logfile is 'Bachelorarbeit_Human_Capital_in_the_Ind_Revolution_rework_2.blg'
[28] biber-MSWIN64:315> INFO - ===
[60] Biber.pm:371> INFO - Reading 'Bachelorarbeit_Human_Capital_in_the_Ind_Revolution_rework_2.bcf'
[156] Biber.pm:889> INFO - Found 22 citekeys in bib section 0
[170] Biber.pm:4093> INFO - Processing section 0
[184] Biber.pm:4254> INFO - Looking for bibtex format file 'HumanCapitalIndustrialRevolution.bib' for section 0
[193] bibtex.pm:1523> INFO - LaTeX decoding ...
[254] bibtex.pm:1340> INFO - Found BibTeX data source 'HumanCapitalIndustrialRevolution.bib'
[257] Utils.pm:193> WARN - Invalid or undefined BibTeX entry key in file 'C:\Users\SomeUser\AppData\Local\Temp\B8fkc98Xa4\HumanCapitalIndustrialRevolution.bib_10848.utf8', skipping ...
[329] Utils.pm:193> WARN - year field '2009b' in entry 'Allen2009' is not an integer - this will probably not sort properly.
[351] Utils.pm:209> ERROR - BibTeX subsystem: C:\Users\SomeUser\AppData\Local\Temp\B8fkc98Xa4\HumanCapitalIndustrialRevolution.bib_10848.utf8, line 383, syntax error: found ",", expected one of: number, name (entry type, key, field, or macro name), end of entry ("}" or ")") or quoted string ({...} or "...")
[351] Biber.pm:110> INFO - WARNINGS: 2
[351] Biber.pm:114> INFO - ERRORS: 1
答案1
高层警告信息
[257] Utils.pm:193> WARN - Invalid or undefined BibTeX entry key in file 'C:\Users\Nils\AppData
\Local\Temp\B8fkc98Xa4\HumanCapitalIndustrialRevolution.bib_10848.utf8',
skipping ...
以及低级错误
[351] Utils.pm:209> ERROR - BibTeX subsystem: C:\Users\Nils\AppData\Local
\Temp\B8fkc98Xa4\HumanCapitalIndustrialRevolution.bib_10848.utf8, line 383,
syntax error: found ",",
expected one of: number, name (entry type, key, field, or macro name),
end of entry ("}" or ")") or quoted string ({...} or "...")
强烈建议您的文件中有一个条目的键为空.bib
。虽然 BibTeX 只接受一个键为空的条目,但 Biber 不会接受任何没有键的条目。即使在 BibTeX 中,没有键的条目也无法引用。
条目的方案.bib
是
@<type>{<entry key>,
<field_1> = {<value_1>},
<field_2> = {<value_2>},
...
<field_n> = {<value_n>},
}
其中<entry key>
不应为空。
你只需要找到看起来像这样的条目
@article{,
author = {Sigfridsson, Emma and Ryde, Ulf},
title = {Comparison of methods for deriving atomic charges from the
electrostatic potential and moments},
journaltitle = {Journal of Computational Chemistry},
date = 1998,
volume = 19,
number = 4,
pages = {377-395},
doi = {10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P},
}
代替
@article{sigfridsson,
author = {Sigfridsson, Emma and Ryde, Ulf},
title = {Comparison of methods for deriving atomic charges from the
electrostatic potential and moments},
journaltitle = {Journal of Computational Chemistry},
date = 1998,
volume = 19,
number = 4,
pages = {377-395},
doi = {10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P},
}
错误中的行号应该相当准确,只需检查上下几行即可。您也可以{,
在.bib
文件中搜索。