我正在尝试编译以下 bib 文件:
@article {Conway10612,
author = {Conway, J. H. and Torquato, S.},
title = {Packing, tiling, and covering with tetrahedra},
volume = {103},
number = {28},
pages = {10612--10617},
year = {2006},
doi = {10.1073/pnas.0601389103},
publisher = {National Academy of Sciences},
abstract = {It is well known that three-dimensional Euclidean space cannot be tiled by regular tetrahedra. But how well can we do? In this work, we give several constructions that may answer the various senses of this question. In so doing, we provide some solutions to packing, tiling, and covering problems of tetrahedra. Our results suggest that the regular tetrahedron may not be able to pack as densely as the sphere, which would contradict a conjecture of Ulam. The regular tetrahedron might even be the convex body having the smallest possible packing density.},
issn = {0027-8424},
URL = {https://www.pnas.org/content/103/28/10612},
eprint = {https://www.pnas.org/content/103/28/10612.full.pdf},
journal = {Proceedings of the National Academy of Sciences}
}
@book{cite-key,
Address = {New York},
Annote = {Bibliography: p. {$[$}335{$]$}-336.},
Author = {Rudin, Walter},
Date-Added = {2020-11-10 00:19:08 -0500},
Date-Modified = {2020-11-10 00:19:08 -0500},
Et = {3d ed..},
Id = {01HOLLINS{\_}ALMA2160070510003751},
Keywords = {Mathematical analysis},
Publisher = {New York : McGraw-Hill},
Title = {Principles of mathematical analysis},
Ty = {BOOK},
Year = {1976}
}
@misc{wolfram blog,
title={Tetrahedra Packing}, url={https://blog.wolfram.com/2010/08/30/tetrahedra-packing/},
journal={Wolfram Blog}
}
@misc{my geometry project,
title={Polyhedrons Lesson}, url={https://reginageomfinproj.weebly.com/polyhedrons-lesson.html},
journal={My geometry project}
}
@misc{american mathematical society,
title={AMS :: Feature Column :: Packing Tetrahedra},
url={http://www.ams.org/publicoutreach/feature-column/fc-2012-11},
journal={American Mathematical Society}
}
@misc{madeel_madeelmadeel15166 bronze badges_crococroco5_1966,
title={Drawing 3D lattice using TikZ},
url={https://tex.stackexchange.com/questions/380828/drawing-3d-lattice-using-tikz},
journal={TeX},
author={Madeel and madeelmadeel15166 bronze badges and CroCoCroCo5},
year={1966},
month={Oct}
}
@misc{how do you translate a function?,
title={How Do You Translate a Function?: Printable Summary: Virtual Nerd},
url={https://virtualnerd.com/worksheetHelper.php?tutID=Alg2_02_01_0006},
journal={How Do You Translate a Function? | Printable Summary | Virtual Nerd}
}
当我尝试编译该文件时,除前两个引文外,其余均出现以下错误:
I was expecting a ',' or a '}'
我找不到 bib 文件中的错误。有人能建议如何修复此错误吗?
答案1
如果您查看文件中的错误消息\jobname.blg
(其中\jobname
是您的主 tex 文件的名称),您会注意到所有错误都与条目键中的空格有关。例如,对于 bib 文件中的第三个条目,可以找到以下错误消息:
I was expecting a `,' or a `}'---line 36 of file mybib.bib
: @misc{wolfram
: blog,
I'm skipping whatever remains of this entry
(附言:在您的帖子中,您只显示了错误消息的连续四行中的第一行。)
BibTeX 确实不是允许在条目的键中使用空格。这就是为什么wolfram blog
会抛出错误。在 BibTeX 处理完wolfram
空格后,它期望遇到逗号(正常情况)或}
字符(这将完全终止条目);可能不常见,但从语法上讲仍然有效。相反,它遇到了“blog”,这让它别无选择,只能抛出错误消息。
解决办法是什么?不是在条目的键中使用空格。