1

I am using an IEEE Conference template for writing a paper and getting error again and again while adding BibTeX file into my LaTeX file. Here is the error:

bare_conf.tex 544 LaTeX Error: Something's wrong--perhaps a missing \item.

See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ...

l.544 \end{thebibliography}

Moreover, I have not cited any paper from the bibliography yet. (Just added bibliography file here). Here it is:

\begin{thebibliography}{}
\bibliography{library}
\bibliographystyle{ieeetr}
\end{thebibliography}
  • 5
    Hi, welcome. The thebibliography environment is for when you want to write out the bibliography by hand, while \bibliography/\bibliographystyle is for when you use BibTeX. Try removing \begin{thebibliography}{} and \end{bibliography}. – Torbjørn T. Oct 24 '17 at 11:46
  • @TorbjørnT. Thanks but it's still not working – Ammarah Oct 24 '17 at 17:12
  • Is it must to have in-text citations for the bibliography? I'm still not able to show bibtex file's references in references section of the paper. @TorbjørnT. Does it require any sort of package? – Ammarah Oct 24 '17 at 17:15
  • Basically, see Kurt's answer. If you want to add things to the reference list without explicitly citing them, you can use \nocite{<citation key>}, or \nocite{*} to add all entries in the .bib file to the reference list. – Torbjørn T. Oct 24 '17 at 20:40
2

You did not give us a minimal working example so let us try the following one:

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@Book{Goossens,
  author    = {Goossens, Michel and Mittelbach, Frank and
               Samarin, Alexander},
  title     = {The LaTeX Companion},
  edition   = {1},
  publisher = {Addison-Wesley},
  location  = {Reading, Mass.},
  year      = {1994},
}
@Book{adams,
  title     = {The Restaurant at the End of the Universe},
  author    = {Douglas Adams},
  series    = {The Hitchhiker's Guide to the Galaxy},
  publisher = {Pan Macmillan},
  year      = {1980},
}
@article{einstein,
  author  = {Albert Einstein},
  title   = {{Zur Elektrodynamik bewegter K{\"o}rper}. ({German})
               [{On} the electrodynamics of moving bodies]},
  journal = {Annalen der Physik},
  volume  = {322},
  number  = {10},
  pages   = {891--921},
  year    = {1905},
  DOI     = {http://dx.doi.org/10.1002/andp.19053221004},
}
\end{filecontents*}


\documentclass[conference]{IEEEtran}

\usepackage[hyphens]{url} % <=================== better urls in document
\usepackage{lipsum}

\title{This document}
\author{This author}

\begin{document}

\maketitle

\begin{abstract}
\lipsum[1]
\end{abstract}

\lipsum[2-6]
I have cited this document \cite{einstein} % <==========================
\nocite{*} % <============== to add not cited entrys to the bibliography

\bibliographystyle{ieeetran}
\bibliography{\jobname} % to use the bib file created with filecontents
\end{document}

Package filecontents is used to have bib file and tex code together in one compilable mwe. You do not need it for your work.

The following part creates the bibliography:

I have cited this document \cite{einstein} % <==========================
\nocite{*} % <============== to add not cited entrys to the bibliography

\bibliographystyle{ieeetran}
\bibliography{\jobname} % to use the bib file created with filecontents

As you can see you have to cite one or more bibentrys (\cite{einstein}) or you can use \nocite{*} to add all uncited bib entrys to the bibliography too. ieeetran names the used style to layout the bibliography.

Please copy my MWE to your computer, for example with mwe.tex, compile it with the chain

pdflatex mwe.tex
bibtex mwe
pdflatex mwe.tex
pdflatex mwe.tex

Then you get the following result:

resulting bibliography

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.