Erro: Erro LaTeX: Algo está errado - talvez um \item faltando

Erro: Erro LaTeX: Algo está errado - talvez um \item faltando

Encontrei muitos posts sobre o mesmo problema, mas nenhum poderia ajudar. Você pode me ajudar a descobrir por que estou recebendo esse erro? Estou usando: IEEEtran.bste IEEEtran.cls. Ambos os arquivos e o arquivo .tex principal references.bibestão em uma pasta. Quando tento compilar meu script, recebo este erro:

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

Aqui está 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}

E meu test.tex:

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

\section{Test Citation}
\cite{logjam2015}

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

\end{document}

E as referências.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},
 }

Responder1

Você gerou o .bblarquivo em um momento em que seu documento não continha nenhum comando \citeou \nocite. O erro deriva de uma má redefinição feita pela IEEEtran.clsmacro \endthebibliography.

As classes padrão têm algo como

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

que implica

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

mas IEEEtran.clstem

\let\endthebibliography\endlist

o que é claramente errado.

Se você consertar

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

então também um arquivo vazio .bbl(ou seja, sem \bibitemcomando) produzirá apenas um aviso e não um erro.

Responder2

Caso o erro persista mesmo que você já tenha adicionado um \cite{something}em seu artigo, será necessário limpar os arquivos auxiliares.

Em detalhes,exclua todos os arquivos terminados com.log .aux .bbl .blg. Em seguida, compile o documento novamente e pronto.

Responder3

Recebi exatamente a mesma mensagem de erro, com um .bblarquivo vazio. Se você estiver usando MiKTeX como eu, você pode tentar mudar \bibliographystyle{IEEEtran}com \bibliographystyle{ieeetran}letras minúsculas. Em seguida, execute o BibTeX. Por fim, gere seu documento executando o que você está acostumado. Isso resolveu meu problema.

Encontrei esta solução lendohttps://ctan.org/pkg/ieeetran, onde eles fornecem a versão mais recente do estilo IEEEtran BibTeX (que eu não precisei baixar, a propósito), e especificaram que está contido no TeX Live como IEEEtran e emMiKTeX como ieeetran.

Responder4

No meu caso, isso ocorreu no contexto de um arquivo BibTex BBL, que, após inspeção, estava vazio.

Aparentemente, Overleaf relatou o nome do arquivo .bib como Mendeley.bibe eu incluí \bibliography{Mendeley}, mas o arquivo não foi encontrado silenciosamente.

Solução:Renomeei o arquivo .bib para letras minúsculas e atualizei a \bibliographyentrada para corresponder e tudo funcionou conforme o esperado.

informação relacionada