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.

Today I started to try biblatex for the first time in my apa6.cls document:

\documentclass[ngerman,man,12pt,a4paper,noextraspace,donotrepeattitle]{apa6}
\usepackage[latin1]{inputenc} 
\usepackage[english,ngerman]{babel}
\usepackage[T1]{fontenc}    
\usepackage{lmodern}        
\usepackage{etoolbox}

\usepackage{csquotes}
\usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}
\DeclareLanguageMapping{ngerman}{ngerman-apa}
\addbibresource{Literatur.bib}

\begin{document}

\cite{vonDavier2011}

\printbibliography

\end{document}

I just copied the content of the .bib file from the bibliography.bib of the apa6.cls example file for some testing so the .bib content is alright.

This works as long as I load biblatex only with \usepackage[backend=biber]{biblatex}. But when I additionally specify apa citation style like in the example above, I get the Error

Undefined Control Sequence

right after the \printbibliography line.

I have to mention that I am not an advanced latex or even biblatex user. F. e. I just changed the output profile from bibtex to biber and don't know what is meant with "biber %" I read about in other topics. Should I include that anywhere?

Thanks for answers!

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

The error lies in declaring the ngerman option in the \documentclass line.

Here's what happens. When babel is loaded, it is passed all the global options, so ngerman; then it examines the local options, english and ngerman; since the latter has already been loaded, it has no effect and the main language becomes English.

You can check this by adding \languagename after \begin{document}, which will print “english”.

Solution: don't use ngerman in \documentclass or use both. If you have babel version 3.9, you can solve also by issuing

\usepackage[english, main=ngerman]{babel}

and, in this case, the ngerman option in \documentclass will do no damage.

share|improve this answer
    
Ok, I removed it in the document options and that worked. The language command still says "ngerman" is the document language, which is good. Nevertheless I still get a "package biblatex warning macro 'name:apa:first-last' undefined" Warning... do you might have any idea on that also? –  entne Sep 3 '13 at 18:42
    
@entne I get no warning, sorry. –  egreg Sep 3 '13 at 19:55
add comment

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.