[Tex/LaTex] Citation error in using BibTeX “Paragraph ended before \@citex was complete”

bibtexcite-packagenatbib

I am getting an error when I use BibTeX bibliography.
I used \usepackage{natbib} and \usepackage{cite}
when I compile the file, I get the error

Paragraph ended before \@citex was complete

and part of the paragraph located after the citation disappears
also, I get the message

I suspect you've forgotten a '}', causing me to apply this control sequence to too much text

I am using IEEE tran style with the commands:

\bibliography{library}
\bibliographystyle{IEEEtran}

can you help me with this ?

I have just downloaded a new IEEE template, but the same problem appears.

Best Answer

The cite and natbib packages are both redefining the same things and are not compatible with each other: you need to choose one or the other. As you are using the IEEEtran (a natbib style) it seems likely you'll want something like

\usepackage[numbers,super]{natbib}

and simply remove \usepackage{cite}. (One can also load natbib with no options and set the style using \setcitestyle{numbers,super}.)

Related Question