エラー: LaTeX エラー: 何かが間違っています - おそらく \item が欠落しています

エラー: LaTeX エラー: 何かが間違っています - おそらく \item が欠落しています

同じ問題についての投稿をたくさん見つけましたが、どれも役に立ちませんでした。このエラーが発生する理由を解明するのを手伝っていただけますか? および を使用しています。IEEEtran.bstこれらIEEEtran.clsのファイルとメインの .tex ファイルと はreferences.bib1 つのフォルダーにあります。スクリプトをコンパイルしようとすると、次のエラーが発生します。

test.bbl(24): Error: LaTeX Error: Something's wrong--perhaps a missing \item.

ここはtest.bbl

% Generated by IEEEtran.bst, version: 1.12 (2007/01/11)
\begin{thebibliography}{}
\providecommand{\url}[1]{#1}
\csname url@samestyle\endcsname
\providecommand{\newblock}{\relax}
\providecommand{\bibinfo}[2]{#2}
\providecommand{\BIBentrySTDinterwordspacing}{\spaceskip=0pt\relax}
\providecommand{\BIBentryALTinterwordstretchfactor}{4}
\providecommand{\BIBentryALTinterwordspacing}{\spaceskip=\fontdimen2\font plus
\BIBentryALTinterwordstretchfactor\fontdimen3\font minus
  \fontdimen4\font\relax}
\providecommand{\BIBforeignlanguage}[2]{{%
\expandafter\ifx\csname l@#1\endcsname\relax
\typeout{** WARNING: IEEEtran.bst: No hyphenation pattern has been}%
\typeout{** loaded for the language `#1'. Using the pattern for}%
\typeout{** the default language instead.}%
\else
\language=\csname l@#1\endcsname
\fi
#2}}
\providecommand{\BIBdecl}{\relax}
\BIBdecl

\end{thebibliography}

そして私の test.tex:

\documentclass[conference]{IEEEtran}
\begin{document}

\section{Test Citation}
\cite{logjam2015}

% ---- Bibliography ----
\bibliographystyle{IEEEtran}
\bibliography{references}

\end{document}

そして参考文献.bib

@inproceedings{logjam2015,
 author               = {Adrian, David and Bhargavan, Karthikeyan and Durumeric, Zakir and Gaudry, Pierrick and Green, Matthew and Halderman, J. Alex and Heninger, Nadia and Springall, Drew and Thom{\'e}, Emmanuel and Valenta, Luke and VanderSloot, Benjamin and Wustrow, Eric and Zanella-B{\'e}guelin, Santiago and Zimmermann, Paul},
 booktitle            = {Proceedings of the 22nd ACM SIGSAC Conference on Computer and Communications Security (CCS '15)},
 pages                = {5-17},
 title                = {{I}mperfect {F}orward {S}ecrecy: {H}ow {D}iffie-{H}ellman {F}ails in {P}ractice},
 url                  = {http://doi.acm.org/10.1145/2810103.2813707},
 year                 = {2015},
 }

答え1

ドキュメントにまたはコマンドが.bbl含まれていないときにファイルを生成しました。このエラーは、マクロによる不適切な再定義によって発生します。\cite\nociteIEEEtran.cls\endthebibliography

標準クラスには次のようなものがあります

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

これは

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

しかしIEEEtran.cls

\let\endthebibliography\endlist

それは明らかに間違っています。

修正すれば

\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}

また、空の.bblファイル (つまり、\bibitemコマンドのないファイル) では、エラーではなく警告のみが生成されます。

答え2

すでに論文に追加したにもかかわらずエラーが引き続き表示される場合は\cite{something}、補助ファイルを消去する必要があります。

詳細に、で終わるファイルを削除する.log .aux .bbl .blgその後、ドキュメントを再度コンパイルすれば完了です。

答え3

空のファイルで、まったく同じエラー メッセージが表示されました。私と同じように MiKTeX を使用している場合は、すべて小文字に.bbl変更してみてください。その後、BibTeX を実行します。最後に、慣れている方法でドキュメントを生成します。これで私の問題は解決しました。\bibliographystyle{IEEEtran}\bibliographystyle{ieeetran}

この解決策は私が読んだhttps://ctan.org/pkg/ieeetran、そこではIEEEtran BibTeXスタイルの最新バージョンが提供されており(ちなみにダウンロードする必要はありませんでした)、TeX LiveにはIEEEtranとして含まれており、MiKTeX を ieeetran として

答え4

私の場合、これは BibTex BBL ファイルのコンテキストにあり、検査すると空でした。

どうやら、Overleaf は .bib ファイルの名前を と報告しMendeley.bib、 を含めました\bibliography{Mendeley}が、ファイルは何も表示されずに見つかりませんでした。

解決:.bib ファイルの名前をすべて小文字に変更し、\bibliography一致するようにエントリを更新したところ、すべてが期待どおりに動作しました。

関連情報