Coma delante de & en la sección de referencia

Coma delante de & en la sección de referencia

Estoy lidiando con un problema relacionado con hacer referencias y citar fuentes en estilo APA.

Aquí está mi código de ejemplo:

  \documentclass[a4paper, 
   12pt, 
   bibtotoc, 
   liststotoc, 
   pointlessnumbers 
     ]{scrartcl} 
\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc} 
\usepackage{textcomp}           
\usepackage[american,ngerman]{babel} 

\usepackage[babel=true]{csquotes} 
\usepackage[style=apa,backend=biber, doi=false, url=false]{biblatex}   
\DeclareLanguageMapping{ngerman}{ngerman-apa} 
\DefineBibliographyStrings{ngerman}{andothers={et\ \addabbrvspace al\adddot}} 
\renewcommand\finalandcomma{\addcomma} 

\usepackage{filecontents} 
\begin{filecontents}{literatur.bib} 
@article{DroitVolet2007, 
 author = {Droit-Volet, S. and Meck, W. H.}, 
 year = {2007}, 
 title = {{H}ow emotions colour our perception of time}, 
 pages = {504--513}, 
 volume = {11}, 
 number = {12}, 
 issn = {13646613}, 
 journal = {Trends in Cognitive Sciences}, 
 doi = {10.1016/j.tics.2007.09.008  Titel anhand dieser DOI in Citavi-Projekt übernehmen 

} 
@article{Gibbon1984,
 author = {Gibbon, J. and Church, R. M. and Meck, W. H.},
 year = {1984},
 title = {{S}calar timing in memory},
 pages = {52--77},
 volume = {423},
 issn = {0077-8923},
 journal = {Annals of the New York Academy of Sciences}
}
    } 
    \end{filecontents} 
    \bibliography{literatur} 
    \begin{document} 

   There is no comma in this citation \parencite{DroitVolet2007}, but the comma is missing in the references. 
For more than two authors there has to be a comma in front of & \parencite{Gibbon1984}.



    \printbibliography 
    \end{document} 

A Latex le falta una coma delante de & en la sección de referencia, cuando solo hay dos autores. La cita dentro del texto está totalmente bien para dos autores, pero la entrada en las referencias debería verse así: Droit-Volet, S., & Meck, WH (2007). ....

Para más de dos autores, también debe haber una coma delante y dentro de las citas de texto.

Mientras buscaba una solución, intenté solucionarla usando

\renewcommand*{\finalnamedelim}{%
  \finalandcomma
  \addspace
  \bibstring{and}%
  \space
}

o

\renewcommand\finalandcomma{\addcomma} 

Pero desafortunadamente ninguna de estas soluciones funcionó en mi caso...

La ayuda o cualquier consejo sería muy apreciado.

Mis mejores deseos, Fernando.

Respuesta1

Por alguna razón biblatex-apase redefine \finalnamedelimen el \AtBeginBibliographygancho.

Entonces tendremos que hacer lo mismo para anular la configuración; Además, redefinimos el \finalandcommaen el \AtBeginDocumentgancho.

\AtBeginDocument{\renewcommand\finalandcomma{\addcomma}}
\AtBeginBibliography{%
  \renewcommand*{\finalnamedelim}{%
    \ifthenelse{\value{listcount}>\maxprtauth}
      {}
      {\finalandcomma\addspace\&\space}}}

Esto siempre imprime el \finalandcomma(normalmente solo se imprime si hay más de dos autores).

MWE

\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[american,ngerman]{babel}
\usepackage{csquotes}
\usepackage{xpatch}
\usepackage[style=apa,backend=biber, doi=false, url=false]{biblatex}
\DeclareLanguageMapping{ngerman}{ngerman-apa}
\DefineBibliographyStrings{ngerman}{andothers={et\addabbrvspace al\adddot}}

\AtBeginDocument{\renewcommand\finalandcomma{\addcomma}}
\AtBeginBibliography{%
  \renewcommand*{\finalnamedelim}{%
    \ifthenelse{\value{listcount}>\maxprtauth}
      {}
      {\finalandcomma\addspace\&\space}}}

\addbibresource{biblatex-examples.bib}
\begin{document}
  There is no comma in this citation \parencite{baez/article}, but the comma is missing in the reference.

  \printbibliography
\end{document}

ingrese la descripción de la imagen aquí

Respuesta2

Suprima \renewcommand{\finalandcomma}{\addcomma}(en el estilo apa, \finalendcomma imprime un signo y desea conservarlo). Reemplácelo con lo siguiente en su preámbulo:

\usepackage{xpatch} 
\xpatchnameformat{apaauthor}{%
{\ifmorenames{\andothersdelim\bibstring{andothers}}{}}{}}%
{%
{\ifmorenames{\andothersdelim\bibstring{andothers}}{}}{\addcomma\space}}%
{}{}%

ingrese la descripción de la imagen aquí

información relacionada