2

I'm using the newest Version of MikTeX and TeXmaker. I am trying to use biblatex-apa with BibTeX, but it simply does not work (and believe me, I read all comments and forums). In TeXmaker, the default option is BibTeX. Here is my code:

\documentclass{article}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=apa,backend=bibtex]{biblatex}
\DeclareLanguageMapping{american}{american-apa}
\addbibresource{MAIN}

\begin{document}
\printbibliography
\end{document}
moewe
  • 175,683
holger
  • 23
  • 1
    You get the error: Package biblatex Error: Biber backend is required by style. because biblatex-apa must be run with backend=biber. You simply can't use backend=bibtex. So you need to switch to backend=biber and tell TeXmaker to run Biber: https://tex.stackexchange.com/q/154751/35864 – moewe Sep 30 '18 at 16:14
  • 1
    I think the APA style has never worked with BibTeX ... – Joseph Wright Sep 30 '18 at 16:19

1 Answers1

1

The MWE produces the error message

! Package biblatex Error: Biber backend is required by style.

That message is quite clear: biblatex-apa requires Biber as its backend because it uses Biber-only features that are not available with backend=bibtex. This requirement was introduced six years ago in version 4.5 (commit 5e70972).

So you must switch to

\usepackage[style=apa, backend=biber]{biblatex}

and tell TeXmaker to run Biber instead of BibTeX for you, see Biblatex with Biber: Configuring my editor to avoid undefined citations.

Please note also that the file name in \addbibresource must contain the file extension, so it should be

\addbibresource{MAIN.bib}

instead of \addbibresource{MAIN}.

moewe
  • 175,683
  • Thank you! It still does not work... When running BibTex I now get – holger Sep 30 '18 at 16:23
  • Process started

    INFO - This is Biber 2.1 INFO - Logfile is '_MAlN.blg' INFO - Reading '_MAlN.bcf' INFO - Found 19 citekeys in bib section 0 INFO - Processing section 0 INFO - Looking for bibtex format file 'MAIN' for section 0

    ERROR - Cannot find 'MAIN'! INFO - ERRORS: 1

    Process exited with error(s)

    – holger Sep 30 '18 at 16:23
  • _Main is my bibliography... – holger Sep 30 '18 at 16:24
  • @peter When you use \addbibresource you must include the file extension, so it should be \addbibresource{MAIN.bib}. Note that Biber 2.1 is quite an ancient version by today's standards (the current version is 2.11) - it was released about three and a half years ago. – moewe Sep 30 '18 at 16:26
  • It still shows plenty of error messages (even more now). I think this problem is more complex... – holger Sep 30 '18 at 16:34
  • @peter What error messages? – moewe Sep 30 '18 at 16:34
  • INFO - This is Biber 2.1 INFO - Logfile is '_MAlN.blg' INFO - Reading '_MAlN.bcf' INFO - Found 19 citekeys in bib section 0 INFO - Processing section 0 INFO - Looking for bibtex format file 'MAIN.bib' for section 0 INFO - Decoding LaTeX character macros into UTF-8 INFO - ... – holger Sep 30 '18 at 16:39
  • Looking for bibtex format file 'MAIN.bib' for section 0 INFO - Decoding LaTeX character macros into UTF-8 INFO - Found BibTeX data source 'MAIN.bib' WARN - Invalid or undefined BibTeX entry key in file 'C:\Users\ga85hdh\AppData\Local\Temp\kEvOPfTtAq\MAIN.bib_9820.utf8', skipping ... – holger Sep 30 '18 at 16:40
  • @peter The Invalid or undefined BibTeX entry key in file message looks like you have a malformed .bib entry. You need to find out which entry. Usually a binary search (delete half of the .bib file and check if the error persists) is the most effective way to find the culprit. – moewe Sep 30 '18 at 16:43
  • Ok thanks but that’s strange because with authoryear it has worked out perfectly before. – peter Sep 30 '18 at 16:55
  • What's actually most surprising is that there is no such path on my computer: C:\Users\ga85dhd\AppData\Local\Temp\SgXUOMzqfm\MAIN.bib_6464.utf8 (my system is in German) – holger Sep 30 '18 at 17:13
  • @moewe: Sorry for overloading you with questions. The problem seems to be here: ERROR - BibTeX subsystem: C:\Users\ga85dhd\AppData\Local\Temp\apMHG6j9yr\MAIN.bib_17116.utf8, line 1551, syntax error: found ",", expected one of: number, name (entry type, key, field, or macro name), end of entry ("}" or ")") or quoted string ({...} or "...") INFO - WARNINGS: 4 INFO - ERRORS: 1. But this path doesn't exist on my computer! – holger Sep 30 '18 at 17:42
  • Any further ideas? Thx! – holger Sep 30 '18 at 17:55
  • @moewe for some reason it seems to be working now. However, it would be great to understand the dynamics behind it. I think I have to do some further readings on it. :D – holger Sep 30 '18 at 18:57
  • @peter The path is slightly different in the .log because Biber copies your file to process it, the message should refer to line 1551 (or thereabouts, sometimes error in earlier lines only manifest themselves later, so you need to check the lines above and below as well). There are four warnings and one error, all of them should be resolved before you can be sure the file is processed correctly. It is known that Biber can be stricter than BibTeX when it comes to syntax errors. So it is plausible that a malformed file ran with BibTeX but does not run with Biber. – moewe Oct 01 '18 at 05:55
  • ... Unfortunately I can't give any more specific advice without seeing the problematic .bib file. – moewe Oct 01 '18 at 05:55