biblatex icon indicating copy to clipboard operation
biblatex copied to clipboard

Odd test in authoryear-comp.cbx

Open moewew opened this issue 5 years ago • 0 comments

For some reason the authoryear-comp styles test for the cite:extradate situation (Knuth 1986a,b) with

\ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND
            \(\value{multicitecount}=0\OR\iffieldundef{postnote}\)}

https://github.com/plk/biblatex/blob/23f6a15eef21789da19068f62be85dffa494e623/tex/latex/biblatex/cbx/authoryear-comp.cbx#L34-L40

In particular the \value{multicitecount}=0 seems odd.

Compare the output of the first and second citation in

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=authoryear-comp, 
  backend=biber,
]{biblatex}


\addbibresource{biblatex-examples.bib}

\begin{document}
\autocite[380]{knuth:ct:b,knuth:ct:c}

\autocites{sigfridsson}[380]{knuth:ct:b,knuth:ct:c}{worman}

\autocites{sigfridsson}{knuth:ct:b,knuth:ct:c}{worman}

\autocites[380]{knuth:ct:b}{knuth:ct:c}{worman}

\autocites{knuth:ct:b}[380]{knuth:ct:c}{worman}
\printbibliography
\end{document}

I'm not yet sure what (if anything) should be done here, but I wanted to track the issue before I forget about it again.


I guess what we really want to avoid is something like in the fourth citation above

(Knuth 1986a, p. 380,b; Worman 2002)

the fifth citation looks good as

(Knuth 1986a, 1986b, p. 380; Worman 2002)

and should probably not be shortened to

(Knuth 1986a,b, p. 380; Worman 2002)

because the postnote is explicitly fixed to the entries here.

I'm a bit unsure about the first situation

(Knuth 1986a,b, p. 380)

where the postnote is less explicit.

As such I would probably want to check if the current or the previous cite key had a postnote...

moewew avatar Apr 11 '20 11:04 moewew