Something’s wrong–perhaps a missing \item. \end{thebibliography}

Something’s wrong–perhaps a missing \item. \end{thebibliography}

亲测有效。

https://tex.stackexchange.com/questions/350907/error-latex-error-somethings-wrong-perhaps-a-missing-item

You have generated the .bbl file at a time when your document contained no \cite or \nocite command. The error derives from a bad redefinition made by IEEEtran.cls of the \endthebibliography macro.

The standard classes have something like

\newenvironment{thebibliography}[1] {[irrelevant code omitted]} {\def\@noitemerr {\@latex@warning{Empty `thebibliography' environment}}% \endlist}

which implies

\def\endthebibliography{% \def\@noitemerr{\@latex@warning{Empty `thebibliography' environment}}% \endlist }

but IEEEtran.cls has

\let\endthebibliography\endlist

which is plainly wrong.

If you fix it

\documentclass[conference]{IEEEtran} \makeatletter \def\endthebibliography{% \def\@noitemerr{\@latex@warning{Empty `thebibliography' environment}}% \endlist } \makeatother \begin{document} \section{Test Citation} \cite{logjam2015} % ---- Bibliography ---- \bibliographystyle{IEEEtran} \bibliography{references} \end{document}

then also an empty .bbl file (that is, with no \bibitem command) will just produce a warning and not an error.

发表评论

电子邮件地址不会被公开。 必填项已用*标注