当我尝试运行 pdflatex 时出现以下错误:
Runaway argument?
Latex Error: ./texfile.tex:22 File ended while scanning use of \emph .
Latex Error: ./texfile.tex:24 LaTeX Error: \begin{thebibliography} on input line 1 ended by \end{document}.
这是我的 tex 文件:
\documentclass[a4paper, abstracton]{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage{booktabs}
\usepackage{graphicx}
\usepackage[final]{pdfpages}
\usepackage{longtable}
\renewcommand{\baselinestretch}{1.5}
\usepackage{setspace}
\usepackage[top=2cm,bottom=3cm,right=2cm]{geometry}
\usepackage{fixltx2e}
\usepackage[square]{natbib}
\usepackage{hyperref}
\begin{document}
\citep{Nawroth:2002zr,Hou:2011vn,Rudini:2008kx,Lampugnani:2006uq,Ishiyama:2010fk,Hudry-Clergeon:2005ys,Angelini:2006vn,Andriopoulou:1999kx,Esser:1998uq,Sun:2012fk,Katsamba:2009kx,Vendome:2011uq,Bennett:1995fk,Ahrens:2003bh,Legrand:2001qf,Harrison:2010ve,Haussinger:2004ly,Parisini:2007zr,Shapiro:1995ys,Patel:2006vn,Boggon:2002kx,Pertz:1999uq,Tamura:1998fk,Cain:2010fk,Taddei:2008ys,Gory-Faure:1999vn,Gulino:1998kx,Gentil-dit-Maurin:2010uq,Corada:2001fk,Breviario:1995vn,Huber:1996uq,Lampugnani:1992fk,Suzuki:1991vn,Larson:2004kx,Breier:1996uq,Potter:2005fk,Tonks:2006fk,Allingham:2007uq,Turowski:2008fk,Vestweber:2012uq,Dejana:2012fk,Harris:2010vn,Huveneers:2012kx,Haidari:2011uq,Nelson:2008fk,Brasch:2011fk,huber:eplin,Abe:2008bh,Kobielak:2004qf,Kametani:2007ve,Drees:2005ly,Pokutta:2000zr,Koslov:1997ys,Rimm:1995vn,Kemler:1989kx,Vestweber:1984uq,Vestweber:1984fk,Lewis:1997fv,Cowin:1986bs,Lampugnani:1995ij,Nelson:2004hc,Orford:1997tg,Aberle:1997kl,Huber:2001oq,Fujita:2002nx,Xiao:2005cr,Huber:2001dq,Huber:1997bh,McCrea:1991ve,McCrea:1991ly,Thoreson:2000zr,Ferber:2002ys,Reynolds:1992vn,Reynolds:1989kx,Reynolds:2004uq,Yonemura:2011fk,Perez-Moreno:2006uq,Pokutta:2007fk,Owen:2008kx,Al-Amoudi:2007uq,He:2003fk,Tsukasaki:2007bh,Leckband:2006qf,Franke:2009ve,Pokutta:2002ly,Tachibana:2000zr,Takai:2008ys,Miyaguchi:2000vn,Hirokawa:1981kx,FARQUHAR:1963uq,Harris:2010fk,Nelson:2008dq,Ogita:2006bh,Ivanov:2001qf,Dejana:2008ve,Yonemura:2010ly,Oda:2011zr,Birukova:2011ys,Giampietro:2012kx,Telo:1998bs,Rampon:2005ij,Bardin:1996hc}
\addcontentsline{toc}{chapter}{Bibliography}
\bibliographystyle{cell}
\bibliography{bib.bib}
\end{document}
我的 bib 文件在这里:
据我所知,bib 文件中缺少一个右括号,但我找不到它。bib 文件是由 BibDesk 生成的。删除导致问题的引文也无济于事。错误在另一个引文中再次出现。
提前谢谢了!
答案1
通过运行bibtex
,我们可以发现一些正在发生的事情的线索:
$ bibtex mydoc
This is BibTeX, Version 0.99d (Web2C 2011)
The top-level auxiliary file: mydoc.aux
The style file: cell.bst
Database file #1: mybib.bib
`volume' is a missing field, not a string, for entry Birukova:2011ys
while executing---line 1461 of file cell.bst
`volume' is a missing field, not a string, for entry Dejana:2012fk
while executing---line 1461 of file cell.bst
`volume' is a missing field, not a string, for entry Giampietro:2012kx
while executing---line 1461 of file cell.bst
`volume' is a missing field, not a string, for entry Sun:2012fk
while executing---line 1461 of file cell.bst
`volume' is a missing field, not a string, for entry Vestweber:2012uq
while executing---line 1461 of file cell.bst
(There were 5 error messages)
该cell
样式抱怨volume
5 个条目中缺少字段,这导致\emph{
生成的条目未关闭myfile.bbl
,例如:
\bibitem[Dejana and Giampietro, 2012]{Dejana:2012fk}
Dejana, E. and Giampietro, C. (2012{\rm{}}).
\newblock Vascular endothelial-cadherin and vascular stability.
\newblock {\rm Curr Opin Hematol } \emph{.
这就是您所指出的错误。:)
标准article
数据条目具有volume
必填字段之一,因此我们需要声明它,即使我们没有正确的信息(有时会发生这种情况)。:)
正如 Mico 指出的那样,您的文件中有一些带有变音符号的单词,需要使用代替和代替来.bib
正确表示- 使用代替来正确按字母顺序排列(感谢 egreg)。并且密钥字段中似乎有一个未转义的符号,如果不修复,将引发错误(感谢 Mico)。\"a
\a
\"u
\u
J{\"{u}}rgen
J{\u}rgen
#
doi
Chretien:1998fk
最后但并非最不重要的一点是,不要β
在文件中直接使用 字符.bib
(幸运的是,它只出现在两三个条目的标题中)。由于我们使用pdflatex
,因此在编译文件时会引发错误。Mico 还提醒说β
会在字段中出现很多次abstract
,但由于cell
样式不使用此特定字段,因此您目前是安全的。:)
答案2
我收到了完全相同的错误消息。对我来说,此错误的原因是多个 bibtex ID 包含“_”。例如:
@Article{balahur2013_sentiment,
Title = {Sentiment analysis in the news},
...
}
我通过将 ID 中的 _ 替换为其他内容(我使用了 - 字符)来解决这个问题,例如:
@Article{balahur2013-sentiment,
Title = {Sentiment analysis in the news},
...
}