Error: Error de LaTeX: Algo anda mal, tal vez falta un \elemento

Error: Error de LaTeX: Algo anda mal, tal vez falta un \elemento

Encontré muchas publicaciones sobre el mismo problema pero ninguna pudo ayudar. ¿Pueden ayudarme a descubrir por qué recibo este error? Estoy usando: IEEEtran.bsty IEEEtran.cls. Ambos archivos y el archivo .tex principal references.bibestán en una carpeta. Cuando intento compilar mi script, aparece este error:

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

Aquí 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}

Y mi prueba.tex:

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

\section{Test Citation}
\cite{logjam2015}

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

\end{document}

Y las referencias.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},
 }

Respuesta1

Ha generado el .bblarchivo en un momento en el que su documento no contenía \citeningún \nocitecomando. El error deriva de una mala redefinición realizada por parte IEEEtran.clsde la \endthebibliographymacro.

Las clases estándar tienen algo como

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

lo que implica

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

pero IEEEtran.clstiene

\let\endthebibliography\endlist

lo cual es claramente incorrecto.

si lo arreglas

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

entonces también un archivo vacío .bbl(es decir, sin \bibitemcomando) simplemente producirá una advertencia y no un error.

Respuesta2

En caso de que el error siga presentándose incluso si ya agregó un archivo \cite{something}en su documento, deberá borrar los archivos auxiliares.

En detalles,eliminar cualquier archivo terminado con.log .aux .bbl .blg. Luego compila el documento nuevamente y listo.

Respuesta3

Recibí exactamente el mismo mensaje de error, con un .bblarchivo vacío. Si estás usando MiKTeX como yo, puedes intentar cambiar \bibliographystyle{IEEEtran}todo \bibliographystyle{ieeetran}en minúsculas. Luego ejecute BibTeX. Finalmente genere su documento ejecutando lo que está acostumbrado. Resolvió mi problema.

Encontré esta solución leyendohttps://ctan.org/pkg/ieeetran, donde proporcionan la última versión del estilo IEEEtran BibTeX (que por cierto no necesitaba descargar), y especificaron que está contenido en TeX Live como IEEEtran y enMiKTeX como ieeetran.

Respuesta4

En mi caso, esto fue en el contexto de un archivo BibTex BBL que, tras la inspección, estaba vacío.

Aparentemente, Overleaf informó el nombre del archivo .bib como Mendeley.biby lo incluí \bibliography{Mendeley}, pero el archivo no se encontró en silencio.

Solución:Cambié el nombre del archivo .bib a minúsculas y actualicé la \bibliographyentrada para que coincidiera y todo funcionó como se esperaba.

información relacionada