0

This question already has an answer here:

I've been searching this site over and over to find a solution to my problem, but I can't find it and what I've found does not seem to work.

My problem is as follows: I'm trying to cite APA style in my ShareLaTeX file, but whenever I type \cite{} and select one of the proposed writers from my .bib file, an error occurs. The citation appears in bold, and the error is:

Citation 'Slagter2012' on page 1 undefined on input line 24.:
You have cited something which is not included in your bibliography.
Make sure that the citation (\cite{...}) has a corresponding key
in your bibliography, and that both are spelled the same way.

Now I've checked this over and over and it seems all the same to me. Is here something wrong in my file?

\documentclass{article}    
\usepackage[utf8]{inputenc}    
\usepackage[affil-it]{authblk}    
\usepackage[american]{babel}    
\usepackage{csquotes}    
\usepackage[style=apa]{biblatex}    
\DeclareLanguageMapping{american}{american-apa}
\addbibresource{article.bib}    
\title{MyArticle}    
\author{MyName}    
\date{Dated: \today}    
\affil{University of Amsterdam}    
\begin{document}    
\maketitle    
\section{Introduction}    
This is the introduction.\cite{Slagter2012}    
\printbibliography
\end{document}

This is my .bib file

@article{Slagter2012,
author = {Slagter, Heleen A. and Tomer, Rachel and Christian, Bradley T. 
    and Fox, Andrew S. and Colzato, Lorenza S. and King, Carlye R. 
    and Murali, Dhanabalan and Davidson, Richard J.},
isbn = {1530-8898 (Electronic)$\backslash$n0898-929X (Linking)},
issn = {0898-929X},
journal = {Journal of Cognitive Neuroscience},
number = {9},
pages = {1932--1940},
pmid = {22663253},
title = {{PET Evidence for a Role for Striatal Dopamine in the 
    Attentional Blink: Functional Implications}},
volume = {24},
year = {2012}
}

And this is the output

And this is the output

What am I doing wrong?

NOTE I am completely new to this, be as clear as possible otherwise I will not understand ;)

marked as duplicate by moewe biblatex Feb 19 '18 at 13:25

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.

  • 1
    Welcome to TeX.SE. Does the error go away if you delete the instruction \bibliography{article.bib} and recompile? – Mico Feb 7 '18 at 14:15
  • 1
    You need to run Biber on your document. See Question mark or bold citation key instead of citation number for explanations and Biblatex with Biber: Configuring my editor to avoid undefined citations for help on how to make your editor run Biber for you. If you managed to run Biber and still get an error, check the .blg file and post its contents here. – moewe Feb 7 '18 at 14:18
  • Okay I've looked into those links, but the thing about how to run biber does not state anything for sharelatex? I'm now trying again in MikTex (because the link does say how to run in biber there) but there, my code wouldn't even run and the error is now: ! LaTeX Error: Missing \begin{document}. Even though I haven't changed anyhing compared to the code above. And \begin{document} is definitely there.. – Denise Feb 7 '18 at 15:30
  • 1
    I can't add a picture but it shows a frame with nothing? I says something about performance, is that right? Yes I've removed that part.. – Denise Feb 7 '18 at 15:40
  • 1
    Yeah it doesn't work.. Maybe this biber thing is still going wrong? Anyway, I can't finish this now. Maybe tomorrow or maybe I'll just give up. Thanks for the effort! – Denise Feb 7 '18 at 15:54

Browse other questions tagged or ask your own question.