0

I have a problem with the apa7 and biblatex packages and the bibliography section. I'm writing in Spanish, so I put the line \setcounter{smartand}{1} to avoid the "&" symbol in documents with 3+ authors. But while the cites looks fine in the text (with "e" or "y" depending the context), in the bibliography section the symbol "&" continues to appear. How can I avoid the use of that symbol in the reference section?

1
  • 3
    Welcome to TeX.se. Could you edit your question to include a minimal document that shows what you're doing. – Alan Munn May 14 '20 at 17:29
3

biblatex-apa has a special name delimiter macro (name:delim:apa:family-given) that needs to be redefined if you want to use smartand. Due to the way smartand is reset by biblatex-apa we also need two additional lines of code in \DefineBibliographyExtras{spanish}.

Together we get

\documentclass[spanish]{apa7}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

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

\makeatletter
\DefineBibliographyExtras{spanish}{%
  \setcounter{smartand}{1}%
  \let\lbx@finalnamedelim=\lbx@es@smartand
  \let\lbx@finallistdelim=\lbx@es@smartand
}

\renewbibmacro*{name:delim:apa:family-given}[1]{%
  \ifnumgreater{\value{listcount}}{\value{liststart}}
    {\ifboolexpr{
       test {\ifnumless{\value{listcount}}{\value{liststop}}}
       or
       test \ifmorenames
     }
       {\printdelim{multinamedelim}}
       {\lbx@finalnamedelim{#1}}}
    {}}
\makeatother

\begin{filecontents}[force]{\jobname.bib}
@book{appleby,
  author  = {Humphrey Appleby and Humphrey Appleby and Humphrey Ippleby},
  title   = {On the Importance of the Civil Service},
  date    = {1980},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}


\begin{document}
Lorem \autocite{sigfridsson,companion,appleby}
\printbibliography
\end{document}

Lorem (Appleby y col., 1980; Goossens y col., 1994; Sigfridsson y Ryde, 1998)//Appleby, H., Appleby, H. e Ippleby, H. (1980).//Goossens, M., Mittelbach, F. y Samarin, A. (1994).

2
  • It works! Thanks you, this thing made me mad yesterday. – Alcarendor May 15 '20 at 7:51
  • @Alcarendor Well, biblatex-apa implements all idiosyncrasies of APA style as closely as possible, so it can be harder to modify if you want something that is not APA style. – moewe May 15 '20 at 11:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.