1

I was using the APA format citation for my thesis, which I am writing in Overleaf, which uses an old version of biblatex-apa.

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

My .bib file is:

@article
{Anderson1998,
     title={Diffuse-Interface Methods In Fluid Mechanics}, volume={30}, DOI={10.1146/annurev.fluid.30.1.139}, number={1}, journal={Annual Review of Fluid Mechanics}, author={Anderson, D. M. and Mcfadden, G. B. and Wheeler, A. A.}, year={1998}, pages={139–165}}

@article
{Penrose1990,
    title={Thermodynamically consistent models of phase-field type for the kinetic of phase transitions}, volume={43}, DOI={10.1016/0167-2789(90)90015-h}, number={1}, journal={Physica D: Nonlinear Phenomena}, author={Penrose, Oliver and Fife, Paul C.}, year={1990}, pages={44–62}}

@article
{NovickC1984,
    title={Nonlinear aspects of the Cahn-Hilliard equation}, volume={10}, DOI={10.1016/0167-2789(84)90180-5}, number={3}, journal={Physica D: Nonlinear Phenomena}, author={Novick-Cohen, Amy and Segel, Lee A.}, year={1984}, pages={277–298}} 

@book
{VanBrunt2010,
    place={New York}, title={The calculus of variations}, publisher={Springer}, author={Van Brunt, B.}, year={2010}}

I have been getting the entries for the .bib file from BibMe. The problem I encountered is that the output in my bibliography looks like this:

Anderson, D. M., Mcfadden, G. B., & Wheeler, A. A. (yearmonthday). Diffuse-interface methods in fluid mechanics. Annual Review of Fluid Mechanics , 30 (1), 139–165. doi:10.1146/annurev.fluid.30.1.139

Novick-Cohen, A. & Segel, L. A. (yearmonthday). Nonlinear aspects of the cahn-hilliard equation. Physica D: Nonlinear Phenomena , 10 (3), 277–298. doi:10.1016/0167-2789(84)90180-5

Penrose, O. & Fife, P. C. (yearmonthday). Thermodynamically consistent models of phase-field type for the kinetic of phase transitions. Physica D: Nonlinear Phenomena , 43 (1), 44–62. doi:10.1016/0167- 2789(90)90015-h

Van Brunt, B. (yearmonthday). The calculus of variations . Springer.

I checked the APA format and you don't really need anything other than publication year for the citation.

Is there a way to modify the first command so that I only need the year instead of yearmonthday bibliography while keeping the APA format? (I can't get the months and days for some of the references here even if I tried, because they are not available online).

Coby Viner
  • 1,939
  • 5
    Overleaf are running a very old version of biblatex-apa. In that version you still need to manually declare a language mapping for each language you use. See https://tex.stackexchange.com/q/36331/35864. Assuming your document is in English you need \DeclareLanguageMapping{english}{english-apa} (or \DeclareLanguageMapping{american}{american-apa} for American and \DeclareLanguageMapping{british}{british-apa} for British, ...). In newer versions that happens automatically and is therefore not necessary any more. – moewe Feb 12 '19 at 19:28
  • 2
    biblatex-apa also supports a few other languages (you can find the current list of languages at https://github.com/plk/biblatex-apa/tree/master/tex/latex/biblatex-apa/lbx; not sure if Overleaf's old version already has all of these, but most should be available). But you will only need the mapping for those languages that you use in your document. – moewe Feb 12 '19 at 19:55
  • 1
    @moewe Care to convert that into an answer? I'll re-tag this as overleaf so they see this is an issue. You might want to contact them though—they'd likely consider at least documentation a built-in work-around. – Coby Viner Feb 12 '19 at 23:25
  • 1
    @CobyViner I would have just voted to close this as a duplicate, but since you asked I can see that it makes some sense to have an explicit answer that differentiates between the current situation and the outdated version on Overleaf. – moewe Feb 13 '19 at 06:32

1 Answers1

4

Overleaf updated their TeX system, new projects now use at least TeX live 2018.


The first part of this answer specifically applies to the outdated package versions used by older Overleaf projects. Overleaf recently updated to TeX live 2018 and new projects use that version. If your Overleaf project uses the new TeX live (because it is a new project or because you asked Overleaf staff to update) or you have a local installation and keep your packages up-to-date (which in general is not a bad idea), you don't have to go through these steps. See the end of the answer.

Old projects on Overleaf may run on an older TeX system with an outdated version of biblatex-apa. With that version you must declare a language mapping to biblatex-apa's localisation files for each language you use. The mapping has the following form

\DeclareLanguageMapping{<lang>}{<lang>-apa}

where <lang> is a babel language name.

If you load british with

\documentclass[british]{article}
\usepackage{babel}
...

you'll need

\DeclareLanguageMapping{british}{british-apa}

For

\usepackage[american,dutch]{babel}

you should load

\DeclareLanguageMapping{american}{american-apa}
\DeclareLanguageMapping{dutch}{dutch-apa}

A list of all language files can be found at https://github.com/plk/biblatex-apa/tree/master/tex/latex/biblatex-apa/lbx (though it could be that the older version on Overleaf does not support all of those yet). If you are using a language for which biblatex-apa does not have support, you will have to define certain things yourself on the fly (or by copying an existing <lang>-apa.lbx and modifying that, if you do so, please consider contributing your files to biblatex-apa at https://github.com/plk/biblatex-apa/issues if they are complete).

\documentclass[french,british,dutch]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

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

\DeclareLanguageMapping{french}{french-apa}
\DeclareLanguageMapping{british}{british-apa}
\DeclareLanguageMapping{dutch}{dutch-apa}

\addbibresource{biblatex-examples.bib}

\begin{document}
\cite{sigfridsson}
\printbibliography
\end{document}

With a current version of biblatex-apa (at least v7.5 from 2017-11-05, current is v7.7 from 2018-04-02) there should be no need for the \DeclareLanguageMapping, because the mapping will be applied automatically. (That's also the reason the passage is gone from the biblatex-apa documentation.) The example from above would look like

\documentclass[french,british,dutch]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

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

\addbibresource{biblatex-examples.bib}

\begin{document}
\cite{sigfridsson}
\printbibliography
\end{document}
moewe
  • 175,683