plk/biblatex-apa

Multiple shortauthor (acronyms) after first quote.

Closed this issue · 1 comments

Hello

I am fairly new to advanced latex and biblatex use.

I am working citations and references with multiple acronyms applying the apa6 style.

I used what is shown in this issue and it works correctly. Now what I'm looking for is that after the first quote only the author's acronym is displayed, and not the full description.

Using the same example of the issue:

\documentclass[a4paper]{article}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@MISC{ann,
  author    = {{American Educational Research Association} and {American Psychological Association}
               and {National Council on Measurement in Education} and Anne Elk},
  author+an = {1:family=student; 2:family=student},
  author+an:acro = {1:family="AERA"; 2:family="APA"; 3:family="NCME"},
  title     = {The Title},
  date = {2018},
}
\end{filecontents}
\usepackage[backend=biber, style=apa6, citestyle=apa6, bibstyle=apa6]{biblatex}
\addbibresource{\jobname.bib}


\renewcommand*{\mkbibnamefamily}[1]{%
  #1%
  \haspartannotation{family}{T}{}
  \getpartannotation{family}
  \haspartannotation[][acro]{family}
    {\addspace\mkbibparens{\getpartannotation[][acro]{family}}}
  {}}

\begin{document}

\autocite{ann} \\
\autocite{ann} \\

\printbibliography

\end{document}

The output as:

(American Educational Research Association [AERA], American Psychologi-cal Association [APA], National Council on Measurement in Education [NCME],& Elk, 2014)
(American Educational Research Association [AERA] et al., 2014)

A output desired

(American Educational Research Association [AERA], American Psychologi-cal Association [APA], National Council on Measurement in Education [NCME],& Elk, 2014)
(AERA et al., 2014)

Or

(American Educational Research Association [AERA], American Psychologi-cal Association [APA], National Council on Measurement in Education [NCME],& Elk, 2014)
([AERA] et al., 2014)

Thanks.!

It is not inconceivable that one might implement something like this based on the annotation feature, but one would essentially be recreating all the name tracking and name uniqueness features. That appears to be a bit of a waste if you want to get everything right, so I believe the conceptually best solution here is to use the extended name format as shown in https://tex.stackexchange.com/a/449082/35864.

Admittedly, the code in https://tex.stackexchange.com/a/449082/35864 is a mouthful, but we can always think of moving some of the stuff there into the kernel (I'm thinking ifnameseen and namecount).

Note also that the code shown here and copied from #63 (comment) was only intended for testing. You'd want to get rid of some unnecessary tests for production use

\documentclass[a4paper]{article}
\usepackage[american]{babel}
\usepackage{csquotes}

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

\renewcommand*{\mkbibnamefamily}[1]{%
  #1%
  \haspartannotation[][acro]{family}
    {\addspace\mkbibparens{\getpartannotation[][acro]{family}}}
  {}}

\begin{filecontents}{\jobname.bib}
@misc{ann,
  author         = {{American Educational Research Association}
                    and {American Psychological Association}
                    and {National Council on Measurement in Education}
                    and Anne Elk},
  author+an:acro = {1:family="AERA"; 2:family="APA"; 3:family="NCME"},
  title          = {The Title},
  date           = {2018},
}
\end{filecontents}
\addbibresource{\jobname.bib}

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