[Tex/LaTex] Bibtex unresolved references in a simple example mac OS lion

bibtex

I have been trying to get BibTeX working but am really struggling. I have spent all morning doing google searches and trying to use other people's examples with no luck.

I am using the latest version of Mac OS X (Lion), Emacs, and AUCTeX.

The problem is that every time I try to pdflatex my TeX file I get unresolved references and all the citations are [?]. I have my TeX file and my bib file in the same folder.

\documentclass{article}
\begin{document}
\cite{who}
\bibliographystyle{plain}
\bibliography{test}
\end{document}

@ARTICLE{who,
  author = {who},
  year = {2008}
}

Best Answer

You need to run bibtex after a pdflatex run:

pdflatex file
bibtex file
pdflatex file
pdflatex file