TransWikia.com

Biblatex APA several works of same author, wrong output

TeX - LaTeX Asked on July 18, 2021

I have a problem with my citations using biblatex/biber with apa-style. I have some works that share the same first author.The output i get is somewhat weird, even though i have no works from the same year with identical authors, in-text-citations contain the first letter of the authors name.
This looks like: (E. Diener et al., 2018, S. 3), this problem also appears for works with two authors: (E. Diener & Diener, 1995, S. 653).

The output i need would rather look like this: (Diener et al., 2018, S. 3); (Diener & Diener, 1995, S. 653).

I also tried to fix the issue by using uniquelist=false or uniquelist=minyear, but unfortunately it didn´t help.

Does anybody know a way to fix this, this would really help me.

Find attached a MWE and my .bib entries:

MWE:

documentclass[parsikip=full,oneside, 12pt]{scrartcl}

usepackage[left=2.8cm, right=2.8cm,top=2.1cm, bottom=19mm,includehead=false,footskip=10mm, bindingoffset=0mm]{geometry}

usepackage[T1]{fontenc} 
usepackage[utf8]{inputenc}     
usepackage[ngerman]{babel}     
usepackage[german=guillemets]{csquotes} 
usepackage{microtype}      
usepackage{color}          


usepackage[style=apa, datelabel=comp, uniquelist=false, backend=biber]{biblatex}
addbibresource{litSM.bib}


usepackage[colorlinks=true, linktoc = all, draft = false, linkcolor=black, citecolor=black, urlcolor=blue]{hyperref}


usepackage[acronym, nopostdot, nogroupskip, nonumberlist, nomain]{glossaries}
makeglossaries
newacronym{passiv}{PNSM}{passive Nutzung sozialer Medien}



setglossarystyle{listdotted}
setlength{glslistdottedwidth}{.6linewidth}


clubpenalty=10000                                          % Verhindert einzelne Absatzzeile am Ende oder am Anfang
widowpenalty=10000                                         % einer Seite.
displaywidowpenalty=10000                                  %
usepackage{setspace}
linespread{1.5}

newcommand{anf}[1]{glqq{}#1{}grqq{}}
AtBeginDocument{%
%   renewcommand{BCBL}{,}%
%   renewcommand{BCBT}{,}%
}


ExecuteBibliographyOptions{maxcitenames=2}

DeclareFieldFormat{citehyperref}{%
    DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links
    bibhyperref{#1}}

DeclareFieldFormat{textcitehyperref}{%
    DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links
    bibhyperref{%
        #1%
        ifbool{cbx:parens}
        {bibcloseparenglobalboolfalse{cbx:parens}}
        {}}}

savebibmacro{cite}
savebibmacro{textcite}

renewbibmacro*{cite}{%
    printtext[citehyperref]{%
        restorebibmacro{cite}%
        usebibmacro{cite}}}

renewbibmacro*{textcite}{%
    ifboolexpr{
        ( not test {iffieldundef{prenote}} and
        test {ifnumequal{value{citecount}}{1}} )
        or
        ( not test {iffieldundef{postnote}} and
        test {ifnumequal{value{citecount}}{value{citetotal}}} )
    }
    {DeclareFieldAlias{textcitehyperref}{noformat}}
    {}%
    printtext[textcitehyperref]{%
        restorebibmacro{textcite}%
        usebibmacro{textcite}}}

renewcommand{baselinestretch}{1.2}
setlength{parskip}{smallskipamount}
setlength{parindent}{0pt}

%%%%% Oxford-Komma vor & %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

DeclareDelimFormat[bib,biblist]{finalnamedelim:apa:family-given}{%
    ifthenelse{value{listcount}>maxprtauth}
    {}
    {addcommaspace&space}}

newcommand{zittext}[2]{parencite[S. #2]{#1}}
newcommand{hervor}[2]{parencite[S. #2, Hervorheb. i.O.]{#1}}

begin{document}

pagenumbering{roman}

tableofcontents
clearpage                      
printglossary[title=Abkürzungsverzeichnis, type=acronymtype]

newacronym{pim}{PIM}{politische Internet-Memes}
newacronym{mk}{MK}{Meme-Kommunikatoren_innen}
clearpage
setcounter{page}{1}pagenumbering{arabic}

input{Einleitung}

printbibliography[heading=bibintoc]
end{document}

These are all bib entries of this author:

article{dienerdiener95,
    title={Cross-Cultural Correlates of Life Satisfaction and Self-Esteem},
    author={Diener, Ed and Diener, Marissa},
    journal={Journal of Personality and Social Psychology},
    volume={68},
    number={4},
    pages={653--663},
    year={1995},
}

@incollection{sciencewb,
    title={Subjective Well-Being},
    author={Diener, Eduard},
    editor={Diener, Eduward},
    booktitle={The Science of Well-Being. The Collected Works of Ed Diener},
    year={2009},
    pages={11--58},
    publisher={Springer},   
    doi={10.1007/978-90-481-2350-6_2}
}

@incollection{happiness,
    title={THE OBJECTIVE BENEFITS OF SUBJECTIVE WELL-BEING},
    author={De Neve, Jan-Emmanuel and Diener, Ed and Tay, Louis and Xuereb, Cody},
    editor={Helliwell, John and Layard, Richard and Sachs, Jeffrey},
    booktitle={WORLD HAPPINESS REPORT 2013},
    pages={54--79},
    year={2013},
    publisher={UN Sustainable Development Solutions Network}
}

@article{diener18,
    title={Advances in subjective well-being research},
    author={Diener, Ed and Oishi, Shigehiro and Tay, Louis},
    journal={Nature Human Behaviour},
    volume={2},
    number={4},
    pages={253--260},
    year={2018},
    doi={10.1038/s41562-018-0307-6}
}
 
@article{dieneradvopen,
    title={Advances and Open Questions in the Science of Subjective Well-Being},
    author={Diener, Ed and Lucas, Richard E and Oishi, Shigehiro},
    journal={Collabra: Psychology},
    volume={4},
    number={1},
    year={2018},
    pages={1--49},
    doi={10.1525/collabra.115}
}

Thank you in advance!

One Answer

The problem occurs when trying to quote dienerdiener95 with two authors sharing the same last name and also the second entry that has the same last name.

It seems that the database gets confused with the double last name in the first@article and repeated in another entry. After that, everything goes downhill.

I found a temporary "cure" by enclosing within {} the first letter of the second author of the first entry, thus "modifying" it but without printing anything different. It seems a bug to me. Perhaps with the latest version ...

Original result

original

After the "cure"

after

documentclass[parsikip=full,oneside, 12pt]{scrartcl}

usepackage[left=2.8cm, right=2.8cm,top=2.1cm, bottom=19mm,includehead=false,footskip=10mm, bindingoffset=0mm]{geometry}

usepackage[T1]{fontenc} 
usepackage[utf8]{inputenc}     
usepackage[ngerman]{babel}     
usepackage[german=guillemets]{csquotes} 
usepackage{microtype}      
usepackage{color}     

usepackage[style=apa, 
datelabel=comp,
% uniquelist=false,
 backend=biber]{biblatex}
 
begin{filecontents*}[overwrite]{jobname45.bib}    
@article{dienerdiener95,
    title={Cross-Cultural Correlates of Life Satisfaction and Self-Esteem},
    author={Diener, Ed and {D}iener, Marissa}, % added {} <<<<<
    journal={Journal of Personality and Social Psychology},
    volume={68},
    number={4},
    pages={653--663},
    year={1995},
}

@incollection{sciencewb,
    title={Subjective Well-Being},
    author={Diener, Eduard},
    editor={Diener, Eduard},
    booktitle={The Science of Well-Being. The Collected Works of Ed Diener},
    year={2009},
    pages={11--58},
    publisher={Springer},   
    doi={10.1007/978-90-481-2350-6_2}
}

@incollection{happiness,
    title={THE OBJECTIVE BENEFITS OF SUBJECTIVE WELL-BEING},
    author={De Neve, Jan-Emmanuel and Diener, Ed and Tay, Louis and Xuereb, Cody},
    editor={Helliwell, John and Layard, Richard and Sachs, Jeffrey},
    booktitle={WORLD HAPPINESS REPORT 2013},
    pages={54--79},
    year={2013},
    publisher={UN Sustainable Development Solutions Network}
}

@article{diener18,
    title={Advances in subjective well-being research},
    author={Diener, Ed and Oishi, Shigehiro and Tay, Louis},
    journal={Nature Human Behaviour},
    volume={2},
    number={4},
    pages={253--260},
    year={2018},
    doi={10.1038/s41562-018-0307-6}
}

@article{dieneradvopen,
    title={Advances and Open Questions in the Science of Subjective Well-Being},
    author={Diener, Ed and Lucas, Richard E and Oishi, Shigehiro},
    journal={Collabra: Psychology},
    volume={4},
    number={1},
    year={2018},
    pages={1--49},
    doi={10.1525/collabra.115}
}
    
 end{filecontents*}
 
addbibresource{jobname45.bib}


usepackage[colorlinks=true, linktoc = all, draft = false, linkcolor=black, citecolor=black, urlcolor=blue]{hyperref}


usepackage[acronym, nopostdot, nogroupskip, nonumberlist, nomain]{glossaries}
makeglossaries
newacronym{passiv}{PNSM}{passive Nutzung sozialer Medien}



setglossarystyle{listdotted}
setlength{glslistdottedwidth}{.6linewidth}


clubpenalty=10000                                          % Verhindert einzelne Absatzzeile am Ende oder am Anfang
widowpenalty=10000                                         % einer Seite.
displaywidowpenalty=10000                                  %
usepackage{setspace}
linespread{1.5}

newcommand{anf}[1]{glqq{}#1{}grqq{}}
AtBeginDocument{%
%   renewcommand{BCBL}{,}%
%   renewcommand{BCBT}{,}%
}


ExecuteBibliographyOptions{maxcitenames=2}

DeclareFieldFormat{citehyperref}{%
    DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links
    bibhyperref{#1}}

DeclareFieldFormat{textcitehyperref}{%
    DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links
    bibhyperref{%
        #1%
        ifbool{cbx:parens}
        {bibcloseparenglobalboolfalse{cbx:parens}}
        {}}}

savebibmacro{cite}
savebibmacro{textcite}

renewbibmacro*{cite}{%
    printtext[citehyperref]{%
        restorebibmacro{cite}%
        usebibmacro{cite}}}

renewbibmacro*{textcite}{%
    ifboolexpr{
        ( not test {iffieldundef{prenote}} and
        test {ifnumequal{value{citecount}}{1}} )
        or
        ( not test {iffieldundef{postnote}} and
        test {ifnumequal{value{citecount}}{value{citetotal}}} )
    }
    {DeclareFieldAlias{textcitehyperref}{noformat}}
    {}%
    printtext[textcitehyperref]{%
        restorebibmacro{textcite}%
        usebibmacro{textcite}}}

renewcommand{baselinestretch}{1.2}
setlength{parskip}{smallskipamount}
setlength{parindent}{0pt}

%%%%% Oxford-Komma vor & %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%DeclareDelimFormat[bib,biblist]{finalnamedelim:apa:family-given}{%
%    ifthenelse{value{listcount}>maxprtauth}
%    {}
%    {addcommaspace&space}}

newcommand{zittext}[2]{parencite[S. #2]{#1}}
newcommand{hervor}[2]{parencite[S. #2, Hervorheb. i.O.]{#1}}

begin{document}

pagenumbering{roman}

tableofcontents
clearpage                      
printglossary[title=Abkürzungsverzeichnis, type=acronymtype]

newacronym{pim}{PIM}{politische Internet-Memes}
newacronym{mk}{MK}{Meme-Kommunikatoren_innen}
clearpage
setcounter{page}{1}pagenumbering{arabic}

section{Einleitung}


parencite{dienerdiener95}  

parencite{sciencewb}

parencite{happiness}

parencite{diener18}

parencite{dieneradvopen}

printbibliography
end{document}

I put together a MWE to help to pinpoint the origin of the issue

xcv

documentclass[12pt]{article}

usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage[english]{babel}

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

begin{filecontents*}[overwrite]{jobname48.bib}    
@article{mooreii,
    author       = {Moore, Gordon and Moore, Eduard},
    title        = {Cramming more components onto integrated circuits},
    journaltitle = {Electronics},
    year         = 1965,
    volume       = 38,
    number       = 8,
    pages        = {114-117},
}

@book{kullbackii,
    author       = {Moore, Gordon and Kullback, David},
    title        = {Information Theory and Statistics},
    year         = 1959,
    publisher    = {John Wiley & Sons},
    location     = {New York},
}       
end{filecontents*}
addbibresource{jobname48.bib}

begin{document}
    
parencite{mooreii}

parencite{kullbackii}

printbibliography
end{document}

Correct answer by Simon Dispa on July 18, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP