0

I am trying to get an equivalent for \usepackage{apalike} with bibtex, but with the ability to use parencite etc.

Therefore, I tried to use \usepackage[style=apa]{biblatex}, but every citation now contains ampersand instead of and.

For authoryear, defining \finalnamedelim works (Use ampersand & in citations and bibliography in biblatex), like this:

\newcommand*{\finalnamedelim}{%
  \ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
  \addspace\bibstring{and}\space}

and also for for the bibliography (Replace 'and' with ampersand in bibliography and parenthetical citations using BibLaTeX) with

\AtBeginBibliography{%
  \renewcommand*{\finalnamedelim}{%
    \ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
    \addspace\&\space}%
}

Unfortunately, for apa style I cannot make this work.

The only thing that works for apa is using \DeclareDelimFormat (https://tex.stackexchange.com/a/590692/85628) like in this mwe:

\documentclass{article}

\usepackage[style=apa]{biblatex}

\DeclareDelimFormat[bib,parencite]{finalnamedelim}{%
  \ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
  \addspace\bibstring{and}\space}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A. and Buthor, B. and Cuthor, C.},
  year = {2001},
  title = {Alpha},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

Some text \autocite{A01}.

\printbibliography

\end{document}

Unfortunately, this also only works for the text itself, but not for the bibliography at the end. Additionally, this leads to more than 2 names being written completely (instead of being replaced by et al.).

Changing the declaration to

\DeclareDelimFormat[bibliography,parencite]{finalnamedelim}{%
  \ifnumgreater{\value{liststop}}{1}%
  \addspace\bibstring{and}\space}

solves the problem with the 3 authors, but still, ampersand is used in the bibliography instead of and.

Additionally, references do not have the same format (Alcocer, J. P. S. and Bergel, A. (2015). Tracking down performance variation against source code evolution. In Proceedings of the 11th Symposium on Dynamic Languages, DLS 2015, pages 129–139, New York, NY, USA. ACM. is apalike and Alcocer, J. P. S., & Bergel, A. (2015). Tracking down performance variation against source code evolution, In Proceedings of the 11th symposium on dynamic languages, Pittsburgh, PA, USA, ACM. is APA).

Is there any solution, to let biblatex and biber behave exactly like apalike?

2 Answers 2

2

It should be noted that apalike is only, well ... like APA. The style is very old (it is one of the BibTeX base styles) and was inspired by/modelled after a now outdated version of APA style. biblatex-apa's style=apa on the other hand implements the current version of APA style (7th edition) as closely as possible with biblatex. So the results may indeed be very different.

Generally I recommend to use biblatex-apa only if you need real APA style. In particular biblatex-apa was not built for easy customisability. It was built to come as close as possible to APA style.

If you want something that is broadly "like APA" (i.e. an author-year style), I suggest you go for the biblatex standard style authoryear and modify it so you like the output. Yes, the output will be different from apalike (there simply is no apalike style for biblatex), but you can change the things you categorically do not like (a start for biblatex customisations is Guidelines for customizing biblatex styles, but you will find many, many questions about tons of different modifications on this site - and if you get stuck, you can just ask a new question) and maybe accept some of the things you do not feel strongly about.

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}

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

\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem \autocite[380]{sigfridsson}
ipsum \autocite{nussbaum}
dolor \autocite{worman}
sit \autocite{companion}

\printbibliography
\end{document}

author-year citations and bibliography.

1

Try this code. I added some examples from biblatex-examples.bib to check th APA style.

Compile as pdflatex + biber + pdflatex + pdflatex.

a

This answer assumes you are using a current version of biblatex-apa (at least v9.0 from 2019-11-23) that implements 7th-edition APA style.

Check it adding \listfiles before \documentclass{article} and look the list of loaded files in the log file.

\documentclass{article}

\usepackage[
backend=biber,
sorting=nyt,
citestyle=authoryear,
bibstyle=apa,
maxbibnames=99, %<<<<<
apamaxprtauth=99,%<<<<<
]{biblatex}


%% From https://tex.stackexchange.com/a/534084/161015 <<<<<<<<<<<<<<<<<<<<<<<<<
\DeclareDelimFormat[bib]{finalnamedelim:apa:family-given}{% added <<<<<<<<<<<<<<<<<<<<<<
    \ifthenelse{\value{listcount}>\maxprtauth}
    {}
    {\ifthenelse{\ifcurrentname{groupauthor}\AND%
            \value{liststop}=2}
        {\addspace\bibstring{and}\space}
        {\finalandcomma\addspace\bibstring{and}\space}}}

%\usepackage{filecontents} % no needed <<<<<<<<<

\begin{filecontents}[overwrite]{\jobname.bib}
    @misc{A01,
        author = {Author, A. and Buthor, B. and Cuthor, C.},
        year = {2001},
        title = {Alpha},
    }
@book{vizedom,
    title        = {The Rites of Passage},
    year         = 1960,
    author    = {Vizedom, Monika B. and Caffee, Gabrielle L. and Coulton, Paul},
    language     = {english},
    publisher    = {University of Chicago Press},
}
@online{baez,
    author       = {Baez, John C. and Lauda, Aaron D.} ,
    title        = {Higher-Dimensional Algebra {V}: 2-Groups},
    date         = {2004-10-27},
    version      = 3,
    langid       = {english},
    langidopts   = {variant=american},
    eprinttype   = {arxiv},
    eprint       = {math/0307200v3},
}

@report{chiu,
    author       = {Chiu, Willy W. and Chow, We Min and Chu, Fuman},
    title        = {A Hybrid Hierarchical Model of a {Multiple Virtual Storage}
        ({MVS}) Operating System},
    type         = {resreport},
    institution  = {IBM},
    date         = 1978,
    number       = {RC-6947},
    langid       = {english},
}


\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
    
    Some text   \autocite{A01}
    
    \autocite{vizedom}
    
    \cite{chiu}
    
    \textcite{baez}
    
    \printbibliography

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .