Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This question already has an answer here:

I have recently asked this question and comments there helped, but I still can't get the result that I am looking for. I reduced my problem to a simple case:

Here is my test_bib.bib:

@article{Franklin1999,

author = {Franklin Allen and Risto Karjalainen},
title = {Using genetic algorithms to find technical trading rules},
year = {1999},
volume = {51},
pages = {245-271},
journal = {Journal of Financial Economics}

}

When I try to run this code:

\documentclass[12pt]{article}
%\usepackage{cite}
\usepackage{natbib}

\begin {document}

\title{My Title}
\author{MyName}

My test \citet{Franklin1999}
%\bibliographystyle{plain}
\bibliographystyle{plainnat}
\bibliography{test_bib}

\end {document}

I get this error:

! Package natbib Error: Bibliography not compatible with author-year citations.

What am I doing wrong? I think that format of my .bib file is wrong, but I don't see where.

When I run the code with commented out parts for cite and use \cite instead of \citet everything works fine.

share|improve this question

marked as duplicate by Guido, Mico, Benedikt Bauer, Kurt, mafp Sep 29 '13 at 21:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
I don't see anything wrong with the test files. The only problem could be that you still have the old auxiliary files (compiled with plain and cite). Remove the auxiliary files .aux and .log and .bbl and compile again latex bibtex latex latex –  Guido Sep 29 '13 at 20:19

1 Answer 1

up vote 1 down vote accepted

check whither natbib is being able to interpret the bibliography style correctly. Check that all the entries e.g, years placed correctly.

After changing the argument to \bibliographystyle a run of LaTeX and one of BibTeX are necessary to get back in sync. Removing the .bbl and .aux files before those run is necessary.

share|improve this answer
    
That's exactly what I needed to do. –  Akavall Sep 29 '13 at 20:23

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