[Tex/LaTex] bibtex file does not recognize the citations

bibtex

I am trying to compile "bibtex filename.aux" in latex. It does not compile and the errors are:

  1. Package natbib Error: Bibliography not compatible with author-year citations …mand\NAT@force@numbers{}\NAT@force@numbers

  2. File ended while scanning use of \@@BOOKMARK \begin{document}

  3. File ended while scanning use of \@@BOOKMARK \begin{document}

The main problem is the first error.
The command line with the problem in the filename.aux says:
\providecommand\NAT@force@numbers{}\NAT@force@numbers (So apparently this is the line with a problem)

Here are the lines in the .tex file

\usepackage{natbib}

text… \citep{author2002}…etc

I have no idea how to make it run. PLEASE HELP!!!

Best Answer

You haven't told us which bibliography style you use, but it would appear to be one that generates a numeric citation style by default.

If the bibliography style is not completely incompatible with authoryear-style citations (a big if, given the first error message you report...), you could try issuing the command

\setcitestyle{authoryear}

after loading natbib so that \citet and \citep can create citations in the desired authoryear style. After adding the command given above, be sure to wipe out the .aux file and rerun LaTeX, BibTeX, and LaTeX (twice more) .

If your bibliography style does turn out to be incompatible with authoryear-style citations, you either need to find another, compatible style file or create your own custom .bst style file from scratch. Fortunately, the latter method isn't as difficult as it might seem, thanks to the existence of the custom-bib package (which was created, incidentally, by the author of the natbib package).

Related Question