4

I have a pst2.bib database with only one entry:

@book{jackson91,
    author    = "Jackson, John David",
    title     = "Classical Electrodynamics",
    publisher = "John Wiley \& Sons, Inc.",
    address  = "New Jersey, USA",
    edition  = "3",
    year      = "1991"
}

At the end of my .tex file I have the following code:

According to \citet{jackson91}, blah blah...

\bibliographystyle{plain}
\bibliography{pst2}

and at the beginning I'm importing the natbib package.

The output of this is

According to (author?) [1], blah blah...

If I change \citet{jackson91} to \cite{jackson91} it just goes

According to [1], blah blah...

but I want to use the \citetcommand from natbib.

It seems that the referencing engine manages to identify my BiBTeX entry from the database, but doesn't manage to identify the various fields in the entry. Why not? How do I fix this?

1 Answer 1

12

Use plainnat instead of plain.

\documentclass{article}

\usepackage{natbib}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@book{jackson91,
    author    = "Jackson, John David",
    title     = "Classical Electrodynamics",
    publisher = "John Wiley \& Sons, Inc.",
    address  = "New Jersey, USA",
    edition  = "3",
    year      = "1991"
}
\end{filecontents}

\begin{document}

According to \citet{jackson91}, blah blah...

\bibliographystyle{plainnat}
\bibliography{\jobname}

\end{document}

enter image description here

2
  • 1
    When I do, I get an error message saying ! Package natbib Error: Bibliography not compatible with author-year citations. This message seems to be rather famous, but most threads I find on the internet seem to end at the conclusion "this is something that natbib has always had problems with, but in recent versions it has started complaining instead of silently doing something the user didn't ask for (i.e. switch to number style instead of author-year)". Some sites recommend using plainnat to fix this, but I am and I'm still experiencing the problem. What to do? Commented Nov 12, 2011 at 23:04
  • 2
    Delete all auxiliary files and try again.
    – lockstep
    Commented Nov 12, 2011 at 23:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .