Skip to content

Placement of cite:post in code flow #24

Closed
@moewew

Description

Consider the following MWE

\documentclass[british]{article}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[backend=biber, style=apa, natbib=true, defernumbers=true]{biblatex}
\DeclareLanguageMapping{british}{british-apa}

\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}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}

\begin{document}        
  \cite{OECD2009,sigfridsson}

  \cite{OECD2009,sigfridsson}

\citereset\citeresetapa
  \cite{OECD2009}

  \cite{OECD2009}
\end{document}

You will find that in the first block the subsequent citation to the OECD source still triggers the full author (interestingly without the brackets - though that seems intentional with sabrackets?), while the second block correctly shows the shortauthor.

This seems to have to do with the placement of cite:post, if it is moved to the loopcode, every work triggers its use. With

\DeclareCiteCommand{\cite}
  {\usebibmacro{cite:init}%
   \usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}%
   \usebibmacro{cite:post}}
  {}
  {\usebibmacro{postnote}}

the citations look as expected.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions