The citation shows as (Author et al., 2020b, 2020a), is it right?

edited May 14, 2023
The following style is used:
title Elsevier - Harvard (with titles)
ID 188BET靠谱吗//www.brodersterzo.com/styles/elsevier-harvard

When two items with same first author and year ( https://gist.github.com/redleafnew/62779077eaaa3004e4d5df1e41faec9d) are insterted (the item wit title of Metabolic Engineering for Production of Functional Polysaccharides is inserted firstly)

the citation shows as:

(Schilling et al., 2020b, 2020a)

The bibliography shows normally.

Could the citation show as (Schilling et al., 2020a, 2020b)?
  • Any idea?
  • Yes, it should be a, b.
    technical: I think this is a bug in the citeproc-js -- the style sorts in-text citations by the same author macro as the bibliography, so they should be in the same order, but it looks like citeproc-js applies the et-al from cs:citation and then does something....weird.
    I think we'll want to try to get this fixed in citeproc, In the meantime, you can fix this by changing the first sort key in citation to something like

  • Done, many thanks.
  • edited May 15, 2023
    > ...but it looks like citeproc-js applies the et-al from cs:citation and then does something....weird.

    I don't think it's a bug of citeproc-js.

    I've slightly modified citeproc-js to print the sort keys (as follow).

    [test_Test] sort keys (bibliography_sort): Schilling|C.,|Koffas|M.A.G.,|Sieber|V.,|Schmid|J.|,120200000100000000|
    [test_Test] sort keys (bibliography_sort): Schilling|C.,|Badri|A.,|Sieber|V.,|Koffas|M.,|Schmid|J.|,120200000100000000|
    [test_Test] sort keys (citation_sort): Schilling|C.|,120200000100000000|
    [test_Test] sort keys (citation_sort): Schilling|C.|,120200000100000000|


    The citation_sort keys of both cites are identical and therefore they appear in the order as they cited (ITEM-1: 2020b -> ITEM-2: 2020a).

  • edited May 15, 2023
    right, but I don't think citeproc-js should apply et-al to the sort key when it's just in cs:citation --the spec isn't as clear on this as we'd maybe want, but see
    Second, et-al abbreviation can be used (using either the et-al-min/et-al-subsequent-min, et-al-use-first/et-al-subsequent-use-first, and et-al-use-last options defined for the macro, or the overriding names-min, names-use-first and names-use-last attributes set on cs:key).
    Note that this explicitly doesn't mention et-al set on the parent node.

    Conceptually, the current behavior
    a) means that sorting by the exact same sort condition in cs:citation and cs:bibliography leads to different outcomes and
    b) it's impossible to not set et al sorting for an in-text citation without resorting to the somewhat ugly "just use large number for names-min" hack I have above.

    edit: I said "something weird" because johnmy had mentioned citing the "Metabolic" paper first, but I see the same as you, i.e.sorting by order in which items are cited.
Sign Inor Registerto comment.