None of the solutions that I've found on internet have worked with me. I am trying to cite this paper: http://ijarece.org/wp-content/uploads/2013/08/IJARECE-VOL-1-ISSUE-4-52-56.pdf and many other documents as articles and books. I need to use IEEE style.
This is my document style:
\documentclass[a4paper]{book}
\usepackage[numbers]{natbib}
\begin{document}
....
\bibliographystyle{ieeetr} %I also tried IEEEtran, and IEEEtranN
\bibliography{literature/library}
\end document
This is what I have in my library.bib document:
@article{r1,
author = "A. N. Shinde, A. C. Joshi, S.S. Patil, Dr. A.P. Vaidya",
journal = "International Journal of Advanced Research in Electronics and Communication Engineering (IJARECE)",
month = oct,
number = "4",
pages = "1-5",
title = "DC Drive using PWM Techniques For Treadmill",
volume = "1",
year = "2012"
}
I'm using \cite{r1} to refer it. But when compiling, I get this error:
! Package natbib Error: Bibliography not compatible with author-year citations
SOLVED: I went back to use:
\usepackage[numbers]{natbib}
\bibliographystyle{IEEEtranN}
Now it's working. My problem was I was editing a template which contained some packages that somehow affected my whole code. I just started a new template myself with the stuff I need. I'm starting to learn Latex, and I confess it was a mistake editing an already-made template.
.bib
files need to be separated byand
rather than commas, does changing that help?ieeetr
bibliography style is not compatible withnatbib
. So, removing the\usepackage[number]{natbib}
should solve the problem.