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.

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?

share|improve this question
add comment

1 Answer

up vote 8 down vote accepted

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

share|improve this answer
    
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? –  Tomas Lycken Nov 12 '11 at 23:04
1  
Delete all auxiliary files and try again. –  lockstep Nov 12 '11 at 23:05
    
Worked like a charm. Thanks a lot! –  Tomas Lycken Nov 12 '11 at 23:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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