!Extra },或者忘记了 \endgroup. 在我的 bbl 文件中

!Extra },或者忘记了 \endgroup. 在我的 bbl 文件中

这是我的.tex文件:

\documentclass[a4paper, oneside, 12pt]{article}

\usepackage[style=nature, url=true]{biblatex}
\usepackage{hyperref}
\addbibresource{C:/library.bib}

\begin{document}
\cite{Kaplan2005}

\printbibliography

\end{document}

这是我的.bbl文件:

% $ biblatex auxiliary file $
% $ biblatex bbl format version 3.0 $
% Do not modify the above lines!
%
% This is an auxiliary file used by the 'biblatex' package.
% This file may safely be deleted. It will be recreated by
% biber as required.
%
\begingroup
\makeatletter
\@ifundefined{[email protected]}
  {\@latex@error
     {Missing 'biblatex' package}
     {The bibliography requires the 'biblatex' package.}
      \aftergroup\endinput}
  {}
\endgroup


\refsection{0}
  \datalist[entry]{none/global//global/global}
    \entry{Kaplan2005}{incollection}{}
      \name{author}{2}{}{%
        {{hash=d7aa6cd4dd81f6a39f9e4ed67f086e5b}{%
           family={Kaplan},
           familyi={K\bibinitperiod},
           given={H.},
           giveni={H\bibinitperiod}}}%
        {{hash=5b840a8b71b2be7ce05d995becdf0667}{%
           family={Gurven},
           familyi={G\bibinitperiod},
           given={M.},
           giveni={M\bibinitperiod}}}%
      }
      \name{editor}{1}{}{%
        {{hash=7a12290827e9d3657d5103137b676795}{%
           family={{H. Gintis, S. Bowles}},
           familyi={H\bibinitperiod},
           given={R.\bibnamedelimi Boyd\bibnamedelimb {\&}\bibnamedelimb E.\bibnamedelimi Fehrs},
           giveni={R\bibinitperiod\bibinitdelim B\bibinitperiod\bibinitdelim \&}\bibinitperiod\bibinitdelim E\bibinitperiod\bibinitdelim F\bibinitperiod}}}%
      }
      \list{publisher}{1}{%
        {MIT Press}%
      }
      \strng{namehash}{481ebb51e63e034bd84329e6d6525632}
      \strng{fullhash}{481ebb51e63e034bd84329e6d6525632}
      \strng{bibnamehash}{481ebb51e63e034bd84329e6d6525632}
      \strng{authorbibnamehash}{481ebb51e63e034bd84329e6d6525632}
      \strng{authornamehash}{481ebb51e63e034bd84329e6d6525632}
      \strng{authorfullhash}{481ebb51e63e034bd84329e6d6525632}
      \strng{editorbibnamehash}{7a12290827e9d3657d5103137b676795}
      \strng{editornamehash}{7a12290827e9d3657d5103137b676795}
      \strng{editorfullhash}{7a12290827e9d3657d5103137b676795}
      \field{sortinit}{1}
      \field{sortinithash}{2174f786c6195e7fe2ee1c229b416e29}
      \field{labelnamesource}{author}
      \field{labeltitlesource}{shorttitle}
      \field{annotation}{From Duplicate 2 ( The natural history of human food sharing and cooperation: a review and a new multi-individual approach to the negotiation of norms - Kaplan, H.; Gurven, M. )}
      \field{booktitle}{Moral sentiments and material interests: The foundations of cooperation in economic life}
      \field{shorttitle}{The natural history of human food sharing and coop}
      \field{title}{{The Natural History of Human Food Sharing and Cooperation : A Review and a New Multi-Individual Approach to the Negotiation of Norms}}
      \field{year}{2005}
      \field{pages}{75\bibrangedash 113}
      \range{pages}{39}
      \verb{file}
      \verb :C$\backslash$:/Users/Kaplan, Gurven - 2005 - The Natural History of Human Food Sharing and Cooperation A Review and a New Multi-Individual Approach to the N.pdf:pdf
      \endverb
      \verb{urlraw}
      \verb http://www.anth.ucsb.edu/faculty/gurven/papers/kaplangurven.pdf
      \endverb
      \verb{url}
      \verb http://www.anth.ucsb.edu/faculty/gurven/papers/kaplangurven.pdf
      \endverb
    \endentry
  \enddatalist
\endrefsection
\endinput

当我尝试编译时,它给出了错误

! Extra }, or forgotten \endgroup.` on line 41.

我认为它谈论的是文件的第 41 行,也就是上面代码中的.bbl那一行。\list{publisher}{1}{%

那么为什么那里会有多余的内容}?我的.bib文件是由 Mendeley 应用程序自动生成的,我}在 Mendeley 的参考文献详细信息中没有看到多余的内容。然后.bbl文件由 TeXmaker 使用命令生成biber %

答案1

LaTeX 在第 41 行报告了错误,但这只是错误明显的地方。真正的问题在于那之前的一行。第 40 行.bbl包含

giveni={R\bibinitperiod\bibinitdelim B\bibinitperiod\bibinitdelim \&}\bibinitperiod\bibinitdelim E\bibinitperiod\bibinitdelim F\bibinitperiod}}}%

如果算上花括号,你会发现后面的括号\&关闭了 中的左括号giveni={。该行中的后续右括号比预期提前关闭了一组,这意味着第 41 行中的右括号没有剩余的组可以关闭。

文件的内容.bbl表明您的.bib输入Kaplan2005包含editor类似于

editor = {{H. Gintis, S. Bowles}, R. Boyd {\&} E. Fehrs},

在姓名字段中输入多个姓名的格式是错误的。姓名必须用 分隔and,因此正确的输入应该是

editor = {H. Gintis and S. Bowles and R. Boyd and E. Fehrs},

例如如何在bibtex文件中正确写入多位作者?


我还注意到,title条目的字段.bib大致如下

title = {{The Natural History of Human Food Sharing and Cooperation :
          A Review and a New Multi-Individual Approach to the Negotiation of Norms}}

假设双花括号是为了对标题应用所见即所得的保护。我认为这是不好的做法。如果您不想将标题转换为句子大小写,请使用不应用句子大小写的样式,或告诉您的样式停止使用

\DeclareFieldFormat{titlecase}{#1}

只有那些即使在句子中也绝不能小写的单词(专有名词等)才应受到保护。另请参阅BibTeX 在创建 .bbl 文件时丢失大写字母在参考书目数据库中存储标题时,应使用什么大小写?

冒号前的空格在英语印刷术中也是不常见的(但在法语中并非如此,但即使在那里也应该确​​保换行不会出现奇怪的情况,目前你会允许在冒号前换行)。

相关内容