0

I am very new to Latex and I try to use Biblatex with APA style. Here is an example_

\documentclass[a4paper, 12pt]{article}
\usepackage[backend=biber,style=apa]{biblatex}
\addbibresource{test.bib}

\title{APA Test}
\begin{document}
\maketitle
This is an APA test. Here should be an APA quote in parentheses  \parencite{groves_understanding_1992} 
\printbibliography
\end{document}

With .bib file

@article{groves_understanding_1992,
    title = {Understanding the {Decision} to {Participate} in a {Survey}},
    volume = {56},
    issn = {0033-362X, 1537-5331},
    url = {http://poq.oxfordjournals.org/content/56/4/475},
    doi = {10.1086/269338},
    language = {en},
    number = {4},
    urldate = {2013-02-04},
    journal = {Public Opinion Quarterly},
    author = {Groves, Robert M. and Cialdini, Robert B. and Couper, Mick P.},
    month = dec,
    year = {1992},
    pages = {475--495}
}

I get error

I found no \citation commands---while reading file apatestv4.aux
I found no \bibdata command---while reading file apatestv4.aux
I found no \bibstyle command---while reading file apatestv4.aux

And and no references/bibliography.

If I change biber to bibtex \usepackage[backend=bibtex,style=apa]{biblatex} I get a whole series of errors, amongst which Package biblatex Error: Option 'sorting=apa' invalid \begin{document}.

I have limitted understanding so far on what biber and bibtex do. My references work when I \usepackage{bibtex} instead of biblatex.

Edit: Here is an image of the result after following the comment by @moewe Faulty in-text reference

tomka
  • 305
  • 1
    You need to run Biber on your document and not BibTeX. (Indeed, it seems biblatex-apa cannot be used with BibTeX, you will need Biber) See Biblatex with Biber: Configuring my editor to avoid undefined citations on how to configure your editor and Question mark instead of citation number for a little background. See also How to (re)run Biber on the file – moewe Sep 29 '15 at 15:34
  • You will however still need a \DeclareLanguageMapping{english}{english-apa} (appropriately changed for your actual document language) to avoid errors. – moewe Sep 29 '15 at 15:43
  • @moewe My editor Is TexStudio. I followed the steps and changed to biber. Then run Latex-Bibliography-Latex. The result is that there is no error message but still no bibliography. Moreover the in-text citation is not displayed properly. – tomka Sep 29 '15 at 15:44
  • I added a picture of the result. – tomka Sep 29 '15 at 15:47
  • Please delete all the auxiliary files and try again. Also add the \DeclareLanguageMapping line I mentioned above. If you still have trouble then, please post the .blg file as well as relevant parts of the .log file, so we can examine the problem in more detail. If you wish you could also be a bit more specififc than "the in-text citation is not displayed properly", what does it look like? is it just the key in bold? – moewe Sep 29 '15 at 15:49
  • Ah, scrap the very last part of my question then. – moewe Sep 29 '15 at 15:50
  • Can you please explain what the relevant part of the log file is? A .blg file is not created (maybe part of the problem?). – tomka Sep 29 '15 at 15:55
  • Yes, the .blg not being created is very much the problem. It means that Biber is not run. Do you even have Biber installed? (Call biber --version from the command line, you might have to wait a bit). Are you sure everything looks like in the guide I linked to? – moewe Sep 29 '15 at 15:57
  • You mean running from cmd in Windows? This gives file not found. Maybe not installed. I took that it comes with TexStudio / MiKTeX. I could also select it there when I followed your link. – tomka Sep 29 '15 at 16:00
  • Yes, I meant cmd.exe. It seems indeed that Biber is not installed. Go to the MikTeX package manager and install Biber. Do an update in both Admin and User mode afterwards. Then try again. – moewe Sep 29 '15 at 16:10
  • It turns out that I had the 64bit version installed which comes without biber, at least in the version I had. See http://tex.stackexchange.com/questions/63039/install-biber-in-miktex-on-a-64-bit-version-of-windows I now installed the 32bit version which has biber 2.1. I checked. It still does not work. If I include \DelcareLanguageMapping I get error Undefined Control Sequence \DeclareLanguageMapping - is this again related to a non-installed package? – tomka Sep 29 '15 at 17:31
  • If I do not include \DeclareLanguageMapping I get error Undefinded Control Sequence \end. Seems to be related to this http://tex.stackexchange.com/questions/158731/undefined-control-sequence-at-enddocument but there is no solution – tomka Sep 29 '15 at 17:33
  • I solved the problem. 1. There was a , at the end of the .bib file. 2. I let \DeclareLanguageMapping follow \usepackage{biblatex}. 3. I excute Latex - Biber - Latex. – tomka Sep 29 '15 at 17:59
  • 1
    Indeed, the \DeclareLanguageMapping is a command defined by biblatex and must be issued after loading biblatex. But the 64 bit version of MikTeX now has a version of Biber in the repositories. You can install it via the package manager (Maybe after you synchronised the package database.) You should not try to install Biber manually. – moewe Sep 29 '15 at 18:16
  • 1
    And it is definitely no error at all to have the comma after the pages field. – moewe Sep 29 '15 at 18:19
  • Since the core of the problem was running the correct bibliography tool, I will vote to close as a duplicate of Question mark instead of citation number – moewe Oct 05 '15 at 06:03
  • @moewe Looking back at my post it rather feels like a dublicate of http://tex.stackexchange.com/questions/63039/install-biber-in-miktex-on-a-64-bit-version-of-windows because I assumed it comes with the 64bit package. Nevertheless this seems outdated because the current 64bit version includes biber. Still I would want to stress this here in case other people have the same trouble. – tomka Oct 05 '15 at 17:07
  • I'd much rather not stress the 64-bit issue, it has been resolved and Biber is now included in the repositories for all MikTeX versions. Mentioning the 64 bit issue will just confuse people, there are still many out there that think 64-bit MikTeX does not support Biber. Plus, from your question it is not at all clear that you use 64-bit MikTeX, and it contains multiple issues at once, so the not having Biber installed aspect becomes a bit muddled. – moewe Oct 06 '15 at 12:26

0 Answers0