2

I am writing my thesis and need to do this with apa citation style.

I used the following code in my main document:

\usepackage[backend=biber,style=apa,sorting=none,natbib=true]{biblatex}
\addbibresource{library.bib} 
\usepackage[autostyle=true]{csquotes} 

and in the end of my main document..

\printbibliography[heading=bibintoc,[title={References}]

However I always get this error:

"Undefined control sequence. \printbibliography[heading=bibintoc,[title={References}]"

Furthermore in my references table, I get (yearmonthday) instead of (2015)e.g. and the references are not alphabetically sorted.

moewe
  • 175,683
Johanna
  • 31
  • 2
    You need a \DeclareLanguageMapping for your language (i.e. the language set as main language in babel: \DeclareLangugaMapping{american}{american-apa}), see problems using apa6e with biblatex-apa. – moewe Jan 29 '17 at 18:14
  • 2
    Also, you have an additional opening square bracket in the argument of \printbibliography. Presumably, you want \printbibliography[heading=bibintoc,title=References] The curly brackets around References are fine, but the opening square bracket before title is not. @moewe Should csquotes be loaded before biblatex? I always load it first, but I don't know if that's required. – cfr Jan 29 '17 at 19:24
  • Thanks a lot. However, both explanations are not the reason :( – Johanna Jan 29 '17 at 19:38
  • While I use \printbibliography without an option, your heading seems to be not support. Biblatex supports Bibliopgraphy and shorthands See sec 3.7.2 in the biblatex manual (on ctan) @cfr I load csquotes after biblatex, but supply the babel package as input – Christoph S Jan 29 '17 at 19:43
  • @ChristophS It is defined. Those are just the defaults if you don't specify one. See sec 3.7.7 for the list of predefined options. – cfr Jan 29 '17 at 19:52
  • @cfr Just noticed that. I am just providing a functioning example in an answer – Christoph S Jan 29 '17 at 19:52
  • 2
    Loading order doesn't matter, I see. – cfr Jan 29 '17 at 19:54
  • Did you manage to solve your problem? If not, please provide an MWEB that also addresses the comments you have already gotten (\DeclareLanguageMapping etc.). Please show us the error/waning messages you receive, the .blg file and describe what is wrong with the output. – moewe Feb 03 '17 at 12:52

2 Answers2

1

There are several things you have to check for when using biblatex. Some of them were already outlined in the comments.
The \printbibliography should look like \printbibliography[heading=bibintoc,title=References]
To start, here Is a functioning example from my template I use:

\usepackage[american]{babel}
\usepackage[style=apa,backend=biber]{biblatex}
\DeclareLanguageMapping{american}{american-apa} %Literaturverzeichnis american-apa style
\addbibresource{library.bib} 
\usepackage[babel,threshold=2]{csquotes}
1

It appears to me that you have a bracket closed too much.

Try using this instead:

\printbibliography[heading=bibintoc,title={References}]
  • Note that Christoph S mentions the same thing in his answer - though not as explicit. Plus when the problematic bracing was mentioned in the comments the OP responded that that was not the only error. – moewe Aug 26 '17 at 16:25