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 get the following errors when I try to cite with apacite

Undefined control sequence \bibitem{GDP:2012}
You can't use `\relax' after \the \bibitem{GDP:2012}
Citation `GDP:2012' undefined
There were undefined references.

Here is the MWE:

\documentclass{article}
\usepackage{apacite}

\begin{document}

\bibliographystyle{plain}

Some text \cite{GDP:2012}

\bibliography{summative}

\end{document}

and here is the BibTeX file

@online{GDP:2012,
ALTauthor = {The World Bank},
ALTeditor = {},
title = {GDP Per Capita (Current \$US)},
date = {2012},
url = {http://data.worldbank.org/indicator/NY.GDP.PCAP.CD},
}

Updated:

@misc{GDP:2012,
author = "The World Bank",
editor = {},
title = "GDP Per Capita (Current \$US)",
year = "2012",
url = "http://data.worldbank.org/indicator/NY.GDP.PCAP.CD",
}

I have ran it twice and the file is in the same directory as my .tex file. What could be the issue?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

You are mixing things.

If you want to use the plain bibliography style, load the natbib package. E.g.:

\documentclass{article}
\usepackage{natbib}

\begin{document}

\bibliographystyle{plainnat}

Some text \cite{GDP:2012}

\bibliography{summative}

\end{document}

If you want to use the APA style, then you can do to things: either use \bibliographystyle{apalike} with the natbib package or go like this:

\documentclass{article}
\usepackage{apacite}

\begin{document}

\bibliographystyle{apacite}

Some text \cite{GDP:2012}

\bibliography{summative}

\end{document}

Your .bib file is fine, but please keep in mind that for the apacite package, the entry @online is not supported, nor the "date" characteristic. However you can use @misc and "year".

Using the second block of code, along with a refs.bib file looking like this:

@misc{GDP:2012,
ALTauthor = {The World Bank},
ALTeditor = {},
title = {GDP Per Capita (Current \$US)},
year = {2012},
url = {http://data.worldbank.org/indicator/NY.GDP.PCAP.CD},
}

creates the following output:

enter image description here

For more information, please visit both the apacite package documentation and the natbib package documentation.

share|improve this answer
    
When I run it, I get (n.d) in my bibliography which I am assume means "no date" but I do have date and it is citing the title instead of the author. –  gekkostate Apr 26 '13 at 18:31
    
Have you run it a couple of times? Which package are you using, natbib or apacite? –  Mario S. E. Apr 26 '13 at 20:03
    
I am using the apacite package. I get the bibliography with the name and title and everything except the date. –  gekkostate Apr 26 '13 at 20:07
    
please change your "data" entry to "year" in your .bib file and see what happens –  Mario S. E. Apr 26 '13 at 20:13
    
I did that but it's not working. It still says (n.d). Is it working on your end? –  gekkostate Apr 26 '13 at 20:19

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.