Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about collapse_ChicagoAfterCollapse.txt #36

Open
jgm opened this issue Jul 20, 2020 · 17 comments
Open

Question about collapse_ChicagoAfterCollapse.txt #36

jgm opened this issue Jul 20, 2020 · 17 comments

Comments

@jgm
Copy link

jgm commented Jul 20, 2020

I'm confused about this test; probably I don't understand how after-collapse-delimiter is supposed to work, and I'm hoping someone can illuminate me.

The result is

(Whittaker 1967, 1975; Wiens 1989a, 1989b)
(Wong 1999, 328; 2000, 475; Garcia 1998, 67)
(Whittaker 1967; Wiens 1989b)

I fully understand the first entry: we use the after-collapse-delimiter, which is ;, after the collapsed "Whittaker 1967, 197". But what is going on in the third? Here there is no collapsing. Yet the after-collapse-delimiter is still used.

The spec gives this example:

]E.g. with collapse set to “year”, delimiter on cs:layout in cs:citation set to “, ”, and after-collapse-delimiter set to “; ”, citations look like “(Doe 1999, 2001; Jones 2000, Brown 2001)”.

Here the after-collapse-delimiter is only used after the collapsed citation; it is not used after "Jones 2000". On the basis of that, I'd expect the regular delimiter , to be used for the second example:

(Whittaker 1967, Wiens 1989b)
@jgm
Copy link
Author

jgm commented Jul 31, 2020

Can anyone help explain this?

@denismaier
Copy link
Member

denismaier commented Jul 31, 2020

I have no idea, but how this is implemented, and if there is some further reasoning behind that. But after reading the specs, this looks like a bug to me. As no collapsing takes place in the third citation, I don't see why the after-collapse-delimiter should be used instead of just the regular delimiter. So yes, I agree the expected output should be:

(Whittaker 1967, Wiens 1989b)

@fbennett @adam3smith @bwiernik @bdarcus ?

@denismaier
Copy link
Member

denismaier commented Jul 31, 2020

Hmm, maybe: Chicago uses a semicolon as delimiter between multiple sources in the same citation. So, actually I wonder why we have delimiter=", " instead of delimiter="; ...? Is this some hack to accommodate these rules?

By the way, the first two test outputs come directly from CMoS 15.30:

(Whittaker 1967, 1975; Wiens 1989a, 1989b)
(Wong 1999, 328; 2000, 475; Garcia 1998, 67)

The third output (i.e. (Whittaker 1967; Wiens 1989b)) isn't there.

@fbennett
Copy link
Member

fbennett commented Jul 31, 2020

My memory on this was hazy, but with some detective work I've confirmed that @denismaier's intuition is exactly right. The report below is a bit long, but there is a prize at the end.

The after-collapse-delimiter attribute has been in there since at least 2009, with a test that conforms to the spec:

(Condit et al. 2000, 1995, 1998; Connell 1971, Cortes & Hunziker 1971)

Oddly, both this test and the collapse_ChicagoAfterCollapse.txt test raised here pass, although they reflect different behavior with after-collapse-delimiter.

There was a proposal in June of 2011 to add an attribute collapse-delimiter that was aimed at an APA (? and perhaps CMoS?) requirement. That led to an extensive discussion of author grouping, which led to the current author-grouping specification:

The delimiter proposal seems to have dropped out of the mix in the discussion. The current off-spec behavior in the current collapse_ChicagoAfterCollapse.txt test dates from March 8, 2018:

The change limits the previously tested (and conformant) behavior of after-collapse-delimiter to styles that set collapse="year-suffix". CMoS sets collapse="year", so the special delimiter is used everywhere but between collapsed citations. That's the role-reversal that @denismaier notes, and it seems to have been done by intention to work around the lack of a collapse-delimiter attribute.

Following that lead, we find that after-collapse-delimiter="; " is actually used in the current official release of chicago-author-date.csl``:

Tracing the origin of that change leads to this commit ...

... which leads to this discussion on the Zotero forums:

And there we have it: a workaround introduced to get correct output from styles in wide use, while avoiding the need for a CSL schema update. The workaround is on me, but it was an escape manoeuver that everyone signed off on at the time, so I'll forgo the customary apology on this occasion. :-)

Edit: It turns out that git log has an option for sniffing out changes affecting particular areas of a file, using regular expressions to define the span. Here is the command that turned up the commit:

  • git log -L /after-collapse-delimiter/,/layout/:chicago-author-date.csl

@bdarcus
Copy link
Member

bdarcus commented Jul 31, 2020 via email

@fbennett
Copy link
Member

As @adam3smith notes in the Zotero forum thread, the delimiter attributes are a bit of a mess. It might be time for an audit of what styles require, and root-and-branch reform of the attributes and their respective names.

@bdarcus
Copy link
Member

bdarcus commented Jul 31, 2020

It might be time for an audit of what styles require, and root-and-branch reform of the attributes and their respective names

Hmm ... any thoughts on this @bwiernik?

@bwiernik
Copy link
Member

Yeah, clarifying the names would be really good here.

@bdarcus
Copy link
Member

bdarcus commented Jul 31, 2020

This was partially resolved, it seems, by adding @cite-group-delimiter ...

citation-style-language/schema#52

... but this test doesn't use it; I guess because the comma is default.

In any case, the above linked issue is the primary record, I think.

Perhaps at minimum we could add to the docstrings for these two attributes, with an example; maybe even the one John posted.

Do we need any actual schema changes?

Also, could we added a description field to this test to clarify for future developers? If yes, what should the content be?

Something like this?

In these examples, the semi-colon serves to delimit the citation (author) groups, and the comma the individual citations within those groups. [insert brief attribute discussion]

@bwiernik
Copy link
Member

I think we will need at least one new attribute. Working on a post.

@fbennett
Copy link
Member

This was partially resolved, it seems, by adding @cite-group-delimiter

chicago-author-date.csl doesn't sort citations, so (in current citeproc-js) citation-group-delimiter would not be available.

(Does CMoS mandate grouping of citations by the same author, or is the order left to author discretion? If the latter, that would undermine the case for imposing author grouping in all styles, regardless of presence/absence of explicit citation sorting.)

@bwiernik
Copy link
Member

bwiernik commented Jul 31, 2020

It's left to discretion. Chicago recommends alphabetical, chronological, or based on rhetorical purpose.

From the manual:

Two or more references in a single parenthetical citation are separated by semicolons. The order in which they are given may depend on what is being cited, and in what order, or it may reflect the relative importance of the items cited. If neither criterion applies, alphabetical or chronological order may be appropriate. Unless the order is prescribed by a particular journal style, the decision is the author’s.

@bwiernik
Copy link
Member

bwiernik commented Jul 31, 2020

I didn't pull up specific manual references for these, but I can recall styles specifying the following delimiters for citation groups:

Delimiter Example Current name New name
Delimiter between cites Jones 1992, p. 123; Smith 1994 delimiter on cs:citation delimiter on cs:citation
Delimiter between cite and locator Jones 1992, p. 123 delimiter on cs:group delimiter on cs:group
Delimiter between collapsed cites Jones 1992, p. 123, 1994; Smith 1994 Not explicit; will pick up group delimiter if citations are sorted collapse-delimiter
Delimiter between collapsed cites, if there is a locator Jones 1992, p. 123; 1994, 1996; Smith 1994 hack of after-collapse-delimiter collapse-with-locator-delimiter
Delimiter between grouped cites, even if not collapsed (e.g., citations by the same author) Jones 1992, p. 123, Jones 1994; Smith 1994 cite-group-delimiter cite-group-delimiter
Delimiter used after a collapsed cite before the next cite (typically used if , is the regular delimiter and the collapse delimiter, but ; should be used after collapse) Jones 1992, p. 123, 1994; Smith 1994, Wilson after-collapse-delimiter after-collapse-delimiter
Delimiter between year suffixes Jones 1999a, b year-suffix-delimiter year-suffix-delimiter

I think adding collapse-delimiter and collapse-with-locator-delimiter explicitly makes the most sense and avoids trying to be too clever.

Inherited default values for the delimiters

  • delimiter on cs:citation -> cite-group-delimiter -> collapse-delimiter -> collapse-with-locator-delimiter
  • delimiter on cs:citation -> after-collapse-delimiter
  • , -> year-suffix-delimiter

@bdarcus
Copy link
Member

bdarcus commented Jul 31, 2020

That's super helpful; thanks!

We should move this to the schema repo.

I wonder, at least to clarify documentation:

Doesn't the "collapse" language, per my consistent argument over the years (as you can see in the linked threads), confuse the issue?

"Collapsing" is the outcome of the formatting, not logically what's happening in the styles; nor how a style guide would describe it. And collapsing is merely one way to represent the grouping, but the need to distinguish delimiters remains regardless.

Leaving aside the locator question, I see "author group" delimiters in the table above, and "within-author group" delimiters (if you will, author-year delimiters).

Also, @bwiernik, I can't tell from your examples how locators impact this, since the examples don't all include locators. Could you fix that please?

@bwiernik
Copy link
Member

In style writing, cite grouping and cite collapsing are two different steps to accommodate two different types of style recommendations.

Some styles, like APA and Chicago, collapse adjacent citations by the same author. Chicago for example says:

Additional works by the same author (s) are cited by date only, separated by commas except where page numbers are required.

APA says:

Give the authors' surnames only once, for each subsequent work, give on the date.

They don't use the word "collapse", but that reasonable word to summarize the explicated behavior.

Other styles (e.g., some British Harvard styles) don't collapse, but do group (e.g., the Jones 1992, Jones 1994; Smith 1994 example).

@bwiernik
Copy link
Member

Also, @bwiernik, I can't tell from your examples how locators impact this, since the examples don't all include locators. Could you fix that please?

I added page numbers to the Jones 1992 item in each of the examples. Sorry that I mistakenly left off the locator from the with-locator example before.

@jgm
Copy link
Author

jgm commented Oct 1, 2020

CMoS sets collapse="year", so the special delimiter is used everywhere but between collapsed citations.

I still don't quite get the expected results.

(Wong 1999, 328; 2000, 475; Garcia 1998, 67)

Here we have a collapsed citation: Wong 1999, 328 and Wong 2000, 475 collapse to Wong 1999, 328; 200, 475 -- but the after-collapse delimiter ; is NOT used between them. It seems that this is due to the presence of a locator, perhaps? But I'm still missing a clear statement of the rule to follow.
EDIT: Ah, I see "if there is a locator" in @bwiernik 's table above.

jgm added a commit to jgm/citeproc that referenced this issue Oct 1, 2020
jgm added a commit to jgm/citeproc that referenced this issue Dec 21, 2020
This seems to be citeproc.js's behavior and it gives better
results for chicago-author-date:  we want both `[@foo20; @foo21, p. 3]`
and `[@foo20, p. 3; @foo21]` to produce a semicolon separator, rather
than a comma.

See also citation-style-language/test-suite#36

Closes #38.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants