![扫描时文件结束使用 \emph 引用,我怀疑你忘记了 }](https://linux22.com/image/419361/%E6%89%AB%E6%8F%8F%E6%97%B6%E6%96%87%E4%BB%B6%E7%BB%93%E6%9D%9F%E4%BD%BF%E7%94%A8%20%5Cemph%20%E5%BC%95%E7%94%A8%EF%BC%8C%E6%88%91%E6%80%80%E7%96%91%E4%BD%A0%E5%BF%98%E8%AE%B0%E4%BA%86%20%7D.png)
我的 bibtex 文档中的引用有误。我收到错误
Runaway argument?
{, 1189--1232. \par \bibitem [Gradeci {\rm et~al.}, 2020]{gradeci2020\ETC.
! File ended while scanning use of \emph .
<inserted text>
\par
l.502 \bibliography{biblio}
I suspect you have forgotten a `}', causing me
to read past where you wanted me to stop.
I'll try to recover; but if the error is serious,
you'd better type `E' or `X' now and fix your file.
以下是引文:
@article{friedman2001greedy,
title={Greedy function approximation: a gradient boosting machine},
author={Friedman, Jerome H},
journal={Annals of statistics},
pages={1189--1232},
year={2001},
publisher={JSTOR},
}
我怀疑可能是字符不正确,所以我手动重写了引文,检查了缺失的 },但似乎没问题,我尝试删除“:”,但问题依然存在。我不明白问题出在哪里,即使这个引文在文档中是单独的,也会出现这种情况,你能帮助我吗?
我在用着
\bibliographystyle{cell}
\bibliography{biblio}
和\cite
以下是导致错误的最少代码:main.tex
\documentclass{article}
\usepackage[utf8]{inputenc}
\begin{document}
\cite{friedman2001greedy}
\bibliographystyle{cell}
\bibliography{biblio}
\end{document}
这biblio.bib
@article{friedman2001greedy,
title={Greedy function approximation a gradient boosting machine},
author={Friedman, Jerome H},
journal={Annals of statistics},
pages={1189--1232},
year={2001},
publisher={JSTOR},
}
我收到以下 .bbl
\begin{thebibliography}{}
\bibitem[Friedman, 2001]{friedman2001greedy}
Friedman, J.~H. (2001{\rm{}}).
\newblock Greedy function approximation a gradient boosting machine.
\newblock {\rm Annals of statistics } \emph{, 1189--1232.
\end{thebibliography}
并出现以下错误
Runaway argument?
{, 1189--1232. \par \end {thebibliography}
! File ended while scanning use of \emph .
<inserted text>
\par
l.8 \bibliography{biblio}
I suspect you have forgotten a `}', causing me
to read past where you wanted me to stop.
I'll try to recover; but if the error is serious,
you'd better type `E' or `X' now and fix your file.
main.tex, line 9
LaTeX Error: \begin{thebibliography} on input line 1 ended by \end{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.9 \end{document}
Your command was ignored.
Type I <command> <return> to replace it with another command,
or <return> to continue without it.
编辑:错误的原因是缺少卷字段,我通过添加它来更正它:
@article{friedman2001greedy,
title={Greedy function approximation a gradient boosting machine},
author={Friedman, Jerome H},
journal={Annals of statistics},
pages={1189--1232},
year={2001},
publisher={JSTOR},
volume={29},
number={5}
}
答案1
在您的示例上运行 bibtex 会出现错误
`volume' is a missing field, not a string, for entry friedman2001greedy
由于缺少字段,生成的bbl文件不完整
\newblock {\rm Annals of statistics } \emph{, 1189--1232.
并且 emph 命令永远不会关闭。
永远不要忽略 tex 或 bibtex 的错误,出现错误后输出很少可用。
添加卷,例如
@article{friedman2001greedy,
title={Greedy function approximation a gradient boosting machine},
author={Friedman, Jerome H},
journal={Annals of statistics},
pages={1189--1232},
year={2001},
publisher={JSTOR},
volume=2
}
(我这里只是编了 2 个)
然后重新运行 bibtex,生成的 bbl 如下所示
\newblock {\rm Annals of statistics } \emph{2}, 1189--1232.
LaTeX 将会准确无误地输入该内容。