[Tex/LaTex] biblatex-apa: always use shortauthor in text

apa-stylebiblatex

I'm using biblatex-apa together with koma-script book class scrbook. Referring to the question biblatex-apa: for citations in text of the same author but different publications: shortauthor every time in [ ], I'm trying to achieve that at every instance of citation of that organization in text prints the short author.

Assume the following minimal example

\documentclass[10pt,ngerman]{scrbook}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
    @book{OECD2009,
        title = {P{ISA} {D}ata {A}nalysis {M}anual: {SPSS}, {S}econd {E}dition},
        publisher = {OECD Publishing},
        year = {2009},
        author = {{Organisation for Economic Co-operation and Development}},
        address = {Paris},
        shortauthor = {{OECD}}}
\end{filecontents}

\usepackage[ngerman]{babel}
\usepackage[backend=biber, style=apa, natbib=true, refsegment=chapter, defernumbers=true]{biblatex}
\DeclareLanguageMapping{ngerman}{ngerman-apa}

\addbibresource{\jobname.bib}
\defcitealias{OECD2009}{OECD}

\begin{document}        
    first \cite{OECD2009} -- subsequent \cite{OECD2009}     
    \printbibliography
\end{document}

So when I first cite \cite{OECD2009} as well as every following occurrence, I would like to see

OECD (2009)

(\parencite likewise). However the Reference section should include the entry using the full author

Organisation for Economic Co-operation and Development. (2009). PISA Data Analysis Manual: SPSS, Second Edition. Paris: OECD Publishing.

How can I achieve that? As you can see, I already experimented with \defcitealias but I'm not too happy with that since I have to use \citetalias and \citepalias at every instance.

Any hint will be highly welcome

Best Answer

You can use the little piece of code

\makeatletter
\AtEveryCitekey{\ifnameundef{shortauthor}{}{\def\cbx@apa@ifnamesaved{\@firstoftwo}}}
\makeatother

It resets the test to check if the name has been seen before to be true if a shortauthor is present. So you get to see the shortauthor even at the first citation.

MWE

\documentclass[ngerman]{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{OECD2009,
  title       = {P{ISA} {D}ata {A}nalysis {M}anual: {SPSS}, {S}econd {E}dition},
  publisher   = {OECD Publishing},
  year        = {2009},
  author      = {{Organisation for Economic Co-operation and Development}},
  address     = {Paris},
  shortauthor = {{OECD}},
}
@ARTICLE{7.01:7,
  AUTHOR         = {J. Chamberlin and A. Novotney and E. Packard and M. Price},
  TITLE          = {Enhancing Worker Well-being},
  SUBTITLE       = {Occupational Health Psychologists Convene to Share Their Research on Work, Stress, and Health},
  JOURNALTITLE   = {Monitor on Psychology},
  VOLUME         = {39},
  NUMBER         = {5},
  PAGES          = {26-29},
  DATE           = {2008-05}
}
\end{filecontents}
\usepackage[ngerman]{babel}
\usepackage[backend=biber, style=apa, natbib=true, defernumbers=true]{biblatex}
\DeclareLanguageMapping{ngerman}{ngerman-apa}

\addbibresource{\jobname.bib}

\makeatletter
\AtEveryCitekey{\ifnameundef{shortauthor}{}{\def\cbx@apa@ifnamesaved{\@firstoftwo}}}
\makeatother

\begin{document}        
  \cite{OECD2009}

  \cite{OECD2009}   

  \cite{7.01:7}

  \cite{7.01:7}
  
  \printbibliography
\end{document}

gives

OECD, 2009

OECD, 2009

Chamberlin, Novotney, Packard, und Price, 2008

Chamberlin u.a., 2008