“扫描 \@firstofone 的使用情况时文件结束”

“扫描 \@firstofone 的使用情况时文件结束”

对大型文件进行大量更改后,我在最后两行中收到错误,而我并没有更改这两行。这两行是:

\bibliography{../erelsegal-halevi}
\end{document}

错误如下:

File ended while scanning use of \@firstofone.

\begin{thebibliography} on input line 1 ended by \end{document}. 

没有其他错误。可能错误是由文档中较早的部分错误引起的。我该如何找到它?我可以尝试“二分查找”:删除文档的部分内容,直到错误消失。有没有更好的方法?

答案1

根据 egreg 的评论,我没有对整个文档进行二分搜索,而是专注于引用。最后,我将问题缩小到 bbl 文件中的单个条目:

\begin{thebibliography}{1}
\providecommand{\natexlab}[1]{#1}
\providecommand{\url}[1]{\texttt{#1}}
\providecommand{\urlprefix}{URL }
\expandafter\ifx\csname urlstyle\endcsname\relax
  \providecommand{\doi}[1]{doi:\discretionary{}{}{}#1}\else
  \providecommand{\doi}[1]{doi:\discretionary{}{}{}\begingroup
  \urlstyle{rm}\url{#1}\endgroup}\fi
\providecommand{\bibinfo}[2]{#2}

\bibitem[{Debreu(1960)}]{Debreu1960Topological}
\bibinfo{author}{G.~Debreu}, \bibinfo{title}{{Topological methods in cardinal
  utility theory}}, chap.~\bibinfo{chapter}{9}, \bibinfo{publisher}{Stanford
  University Press}, \bibinfo{address}{\}, ISBN \bibinfo{isbn}{9781139052092},
  \bibinfo{pages}{16--26}, \doi{\bibinfo{doi}{10.1017/ccol052123736x.010}},
  \urlprefix\url{http://dido.wss.yale.edu/P/cp/p01b/p0156.pdf},
  \bibinfo{year}{1960}.

\end{thebibliography}

对应的bibtex条目是:

@inbook{Debreu1960Topological,
    address = {\},
    author = {Debreu, Gerard},
    booktitle = {Mathematical Methods in Social Sciences},
    chapter = {9},
    citeulike-article-id = {13704178},
    citeulike-linkout-0 = {http://dido.wss.yale.edu/P/cp/p01b/p0156.pdf},
    citeulike-linkout-1 = {http://dx.doi.org/10.1017/ccol052123736x.010},
    doi = {10.1017/ccol052123736x.010},
    isbn = {9781139052092},
    keywords = {utility-theory},
    pages = {16--26},
    posted-at = {2015-08-17 07:40:14},
    priority = {2},
    publisher = {Stanford University Press},
    title = {{Topological methods in cardinal utility theory}},
    url = {http://dido.wss.yale.edu/P/cp/p01b/p0156.pdf},
    year = {1960}
}

删除第一行“address = {}, ”后问题解决。

相关内容