0

My impression is that is an already answered question. However, I am really stuck with this:

This code:

\documentclass[french]{book}

\usepackage[utf8]{inputenc}
\usepackage{babel}

\usepackage{lipsum}
\usepackage[backend=biber,
uniquename=false,
uniquelist=false,
style=apa,
doi=false,
isbn=false,
url=false,
maxcitenames=3,
uniquelist=false,
natbib]{biblatex}

    %%Bibliography format
\addbibresource{allbiblio.bib}
\DeclareLanguageMapping{frenchb}{american-apa}

\AtEveryBibitem{\clearfield{labelmonth}}
\AtEveryBibitem{\clearfield{note}}

\DefineBibliographyStrings{frenchb}{bibliography = {Bibliographie}, references = {Références},}


\begin{document}

\lipsum

An example of citation \citet{Aslin1998}

\printbibliography

\end{document}

gives the following error:

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.515   \StartBabelCommands*{\BabelLanguages}{d
                                               ate}

I tried some other thing in place of "french" :

  • "francais" and "frenchb" give the same output
  • Other language as "english", "canadian"... are ok when I delete the .aux files

And when I try to just remove the babel package :

\documentclass{book}

\usepackage[utf8]{inputenc}


\usepackage{lipsum}
\usepackage[backend=biber,
uniquename=false,
uniquelist=false,
style=apa,
doi=false,
isbn=false,
url=false,
maxcitenames=3,
uniquelist=false,
natbib]{biblatex}

    %%Bibliography format
\addbibresource{allbiblio.bib}
\DeclareLanguageMapping{frenchb}{american-apa}

\AtEveryBibitem{\clearfield{labelmonth}}
\AtEveryBibitem{\clearfield{note}}

\DefineBibliographyStrings{frenchb}{bibliography = {Bibliographie}, references = {Références},}


\begin{document}

\lipsum

An example of citation \citet{Aslin1998}

\printbibliography

\end{document}

I can't get rid of this error:

! Undefined control sequence.
<argument> \mkbibdateapalongextra 
                                  {labelyear}{labelmonth}{labelday}\iffieldu...

Question:

Is there a way to create document in french (and keep the american APA formatting for the bibliography) ?

hadrienj
  • 243
  • I can't confirm the behaviour you described, but I do not have your bib file at hand, so perhaps there is something strange within your bib file? Otherwise the compilation works. –  Mar 28 '14 at 04:09
  • Works fine here (TeX Live 2013). However, I get the same kind of error as your first one sometimes, when the .aux file is corrupted. What happens if you remove the .aux file and then typeset again? – Franck Pastor Mar 27 '14 at 21:13
  • I tried to remove the .aux files without any success. Do you think the problem could be the distribution I use (TeXworks) ? – hadrienj Mar 27 '14 at 21:39
  • This should be a comment, not an answer. – jub0bs Mar 27 '14 at 23:00
  • This also works fine for me, I suspect the bib file has something wrong with it; try with an empty one and then add half the entries. – bombcar Mar 28 '14 at 06:37
  • Indeed I put the bibliography lines to illustrate the second problem. The first one remain even when the code contain only the \usepackage{babel}... – hadrienj Mar 28 '14 at 07:38

0 Answers0