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.

I got biblatex working with the authoryear style in Texlipse:

\documentclass{article} 
\usepackage[canadian]{babel}
\usepackage{csquotes}
\usepackage[style=authoryear,backend=biber]{biblatex} 
\addbibresource{references.bib}
\begin{document} 
This statement is true \parencite[5-8]{Ref}.
\printbibliography 
\end{document}

references.bib:

@BOOK
{Ref,
AUTHOR = "Doe, Jane and Smith, John",
TITLE = "A Book",
PUBLISHER = "Books, Inc.",
YEAR = 1999
}

However, when I try to change the style to apa (\usepackage[style=apa,backend=biber]{biblatex}), an empty bibliography is produced. I have texlive 2012, which has biblatex-apa. Why doesn't it work?

share|improve this question
1  
Welcome to TeX.sx! Your example compiles fine. –  hpesoj626 Nov 4 '12 at 23:44
1  
Are you sure that TeXlipse is set for using Biber rather than BibTeX? –  egreg Nov 4 '12 at 23:57
    
I think that biber is set. I've read that pdflatex has to be run twice to work correctly; however, so far I've been hitting ctrl-s to save and "build". How am I to pdflatex twice in TeXlipse? –  user21760 Nov 5 '12 at 0:13
    
Hmmm... Strange. What operating system are you using? I tried this again on an Ubuntu 12.04 platform in the office and I can verify that the bibliography disappears when the style was changed from authoryear to apa. But I can't be of further help. I don't use TeXlipse myself. Sorry. –  hpesoj626 Nov 5 '12 at 7:54
2  
Have you tried to rerun biber after you changed from authoryear to apa? Not sure about TeXlipse, but you can remove the .bbl file to force rebuild (run again biber). –  Guido Nov 5 '12 at 8:46
show 1 more comment

1 Answer

On Miktex your example with apa doesn't work due to two reasons:

  1. There is the language mapping commands missing which loads an xxx-apa.lbx which contains some apa specific settings.
  2. You are using canadian as language and the necessary canadian-apa.lbx doesn't exist here.

To solve 1. I used the following example (test.bib is the name of my bib-files for tests):

\documentclass{article}
\usepackage[canadian]{babel}
\usepackage{csquotes}
\usepackage[style=apa,backend=biber]{biblatex}
\DeclareLanguageMapping{canadian}{canadian-apa}
\addbibresource{test.bib}
\begin{document}
This statement is true \parencite[5-8]{Ref}.
\printbibliography
\end{document}

To solve 2. I used one existing xxx-apa.lbx (e.g. british-apa.lbx or american-apa.lbx I have no idea which is better suited as starting point) and made a copy called canadian-apa.lbx. Then I changed in the file in two places the language to "canadian":

  1. In the first line: \ProvidesFile{canadian-apa.lbx}
  2. In \DefineBibliographyExtras{canadian}...

and stored the file in a place where latex can find it.

An alternative way is to use e.g. the language american for the bibliography:

\documentclass{article}
\usepackage[canadian]{babel}
\usepackage{csquotes}
\usepackage[style=apa,backend=biber,language=american]{biblatex}
\DeclareLanguageMapping{american}{american-apa}
\addbibresource{test.bib}
\begin{document}
This statement is true \parencite[5-8]{Ref}.
\printbibliography
\end{document}
share|improve this answer
    
It seems that Miktex is more picky than TeXLive. Perhaps these are still good habits to pick up? –  user21760 Nov 5 '12 at 23:53
    
@user21760 I get the same error (undefined \mkbibdateapalongextra when the language is not set up correctly) with texlive 2012. And if the systems were really different it would be due to different biblatex-apa versions. –  Ulrike Fischer Nov 6 '12 at 9:07
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.