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
APA requires special delimiter between years of collapsed citation #40
Comments
See http://citationstyles.org/downloads/specification.html#citation-collapsing for the current options. This has been discussed before: http://xbiblio-devel.2463403.n2.nabble.com/Collapsing-join-delimiters-td2602396.html#a2610962 and in an off-list email thread between Bruce, Frank and me ("Delimiter on cs:layout in cs:citation only?" on 8/30/09 and 8/31/09). We could add a "year-delimiter" attribute for cs:citation, but as I mentioned in the xbiblio thread, the old Zotero CSL processor used a hard-coded ", " between collapsed years. Should we just specify the same behavior for CSL 1.0 processors? |
I don't really understand the question. Is the collapsing behavior really the issue here, or is it the need for an item-by-author delimiter (which I could have sworn we already had)? E.g. even if there was no collapsing, I'd still expect:
|
I can't remember ever having seen a by-author delimiter. @adamsmith? |
I'm not saying that's what it's called. I'm just saying this seems like an obvious feature that I could have sworn was there at some point. It's possible it dropped out along the way somehow. If it did (and we need to confirm that), then that's a bug that demands an immediate minor point release I'd say (except implementors may get pissed :-)). I'm looking at the schema now, but not seeing it. It'd be good if others could confirm. Basically what we have here is a distinction between two things: contributor groups (in the example, Brown and Smith qualify as two distinct groups), and items within those groups. We need delimiters for both. I say I could have sworn this was there because this is how I designed the first proof-of-concept; with an explicit concept of contributor groups. Here's an example of what an earlier version of CSL looked like for an APA citation:
So let's boil this down to two questions:
|
I brought this up on the Zotero forum today and frank posted it here. I haven't found anything in the schema or specs to address this.
|
Somewhat edited version of our previous email conversation: https://gist.github.com/906212 |
Yes, that illustrates the problem; thanks. Glad I raised it clearly in 2009, but unfortunate if we never resolved it. But per above
If, as I suspect, this slipped through, then we need to explicitly add a notion of "contributor group" and "within-group items", and to ensure we have delimiters for both. This might require changes in the spec, changes in the schema, or both. In the end, we need delimiters for the following:
|
It looks like hard-coding a comma for joins between cites to the same author can be used as a short-term solution, to allow time for discussion. Good point that this is not necessarily about collapsing. I think I understand the use case. I'm a little confused by some of Bruce's points above, though. In the proof-of-concept CSL example, I don't see anything that would make a contributor group explicit. I'm also not sure what "within-group items" refers to, as distinct from "contributor group". (Edit: The list is helpful. The third type of delimiter is currently lacking.) |
Forget about the earlier example; it does have it's own problems :-) So it sounds like we have agreement on the problem. Now we need to move on to the solution. I'm having a problem getting nxml mode to properly auto-complete, which makes analysis a bit difficult. I see a few distinct possibilities:
I have a feeling we're going to need 3, which also means changing and/or adding tests to the test suite. Once we settle this, I suggest we do an immediate 1.0.1 release of the schema. |
Okay, I have a hard-coded comma running in citeproc-js. It causes 24 fixtures in the existing test suite to fail. That's fine in the short term, but it raises a question about how the new option will work:
|
I don't understand why this issue is so acute; I see no need to rush a 1.0.1 release. For the short term, we can just adopt the behavior of Zotero 2.0.9 by hardcoding a ", " as Frank indicates above. |
FWIW, delimiter on cs:name has a default value of ", ". See http://citationstyles.org/downloads/specification.html#name |
I overspoke about test breakage. If the implicit hard-coded behavior is applied to citations in in-text styles only, only three existing tests fail to clear. This looks good, so I'll push the revised code for use in Zotero. I agree with Rintze that we there is no need to rush to production with a solution in the schema. If the attribute makes it into 1.0.1 when it emerges in due course, that should be fine. Understood about default of no value, so no hard-coded default. Should this fall back to the value (if any) of cs:citation delimiter though? It seems like that might be what people would expect. |
OK, thanks rintze. Then let's go with that as well. But note: it's not included in the schema; we should add a [ a:defaultValue = ", " ] annotation to these for utmost clarity. So does this mean we want the following?
And you guys are right that the default means this is turned on so current styles are correct, and so there would be no rush on the schema release. But we should update the test suite and spec so other implementors can deal with it. |
This issue is broader than the delimiters, and also encompasses sorting: So, for example, if one wants to sort a citation by date and then author, it should be possible to get this:
Right now, the spec is confusing on this count, as it seems quite reasonable an implementation would do:
... which doesn't (necessarily) make a lot of practical sense. I see two options (which aren't mutually exclusive):
|
I just checked with Zotero 2.0.9, and it produces the same result as citeproc-js does currently. I've figured out how to produce a grouped sort without too much trouble, but it seems to me that it would be risky to implement this group-and-sort behavior implicitly. It's much easier to explain behavior that is controlled by an attribute or element in the CSL. If this is truly universal, styles can be modified in the next XSLT transform. Rinze has put up a proposal like this:
I would favor using a single group-by-macro or group-by-variable attribute on cs:sort, like this:
This would make it clear that the "author" macro is not relevant as a sort key. |
So we have a few questions:
Answers probably need to consider another, related, issue that Andrea recently ran into: how to implement I think author grouping is fundamental to the model (including in the bibliography), so perhaps we shouldn't be averse to accepting that here. E.g. unless we can envision an explicit use case for non-author grouping in On q2.2, putting it on On q1, I'm pretty sure (though could be convinced otherwise) that grouping is the expected default behavior. Perhaps, per list comments, we should try to get some data on this. |
I don't understand how cites are to be grouped, if the characteristics of group members are not stated somewhere. |
I started this before seeing latest reply from fbennett, but the comment towards the end on defaults anticipates his point. Actually, thinking about this some more, I think Frank's suggestion makes the most sense; something like:
It's simple, flexible, and probably not hard to add to existing styles. Moreover, with the value as macro, it makes little sense to talk about defaults. What implications might this have for |
Second thought: you could implicitly group on collasible "authors" if the collapse attribute has a value. That would keep cites aligned for potential collapsing, which I think is what you're after. |
You wouldn't want any grouping in the bibliography. If it's tied to collapsing, you would get that result. |
I guess with the bib thing I'm trying to get at the idea that there's already implicit grouping of sorts (on author; reflected in the And yes, you're right that the So what's your druthers now, given all this? |
At the implementation level, it would be done by first sorting on the group key (the bit that would go away with "suppress-author"), then assign the first-listed explict key value as primary key to the members of each group, with the group key as first secondary. The explicit cs:key elements would then be used as further secondary keys. So with collapse="year" in the style, and macro:author as the bit that is caught by "suppress-author", this:
Would produce keys like this:
While an explicit sort of authors like this:
Would produce keys like this:
In the second example, the first three keys come out identical, so you would get the cites ordered by author, with a year sort of each author's cites, which is what one would expect. Still not sure I like the idea of turning this on without an explicit attribute to invoke the grouping, but it does seem like it would produce sane results. |
If the sole key set in cs:bibliography is the year, we can assume that the style just wants the cites ordered by year, regardless of authorship. The same in cs:citation, for a style that doesn't do any collapsing. |
I've come around to wondering now whether this enhancement of sort behavior might be safe to implement in the processor on the current schema, with the collapse attribute controlling whether the grouping behavior is turned on. It would be a significant change, but does look like that would be the expected behavior. If that sounds like a possibility, shall float this as a proposal on zotero-dev, at Mendeley, and with Andrea and other implementers? |
Sure. I do think, as I mentioned above, that we'd want to add some explicit discussion of author grouping to the spec where collapsing gets recast in those terms, and to perhaps even make a point of calling out a reserved |
I've implemented grouped sorting as discussed here in citeproc-js, limiting the behavior to non-numeric in-text styles that have the collapse attribute and do not use the position attribute for context sensitivity things like "Ibid". There is a test to go with the code. I'm pretty sure that this will be non-controversial among users, so I've bundled the changes in a processor release, with a comment in the release note concerning the change, and an offer to add a toggle to turn off grouped sorting if necessary. We'll see how it goes. Thanks for persisting on this, Bruce; it took me awhile to focus properly on the use case, but it's pretty clear that "grouped" sorting is the only correct method of automatic sorting for this category of citation styles. |
This thread has raised two issues:
Looking at what is in the tests, and running in citeproc-js, it looks like both issues have been addressed -- the first by adopting the same implicit behavior as in 0.8.1, and the second by introducing implicit grouped sorting behavior. In that state, both issues require only notes in the specification. I'll add a note to that effect to the documentation tracker, with a link back to this thread. The discussion here is pretty cluttered (largely thanks to yours truly), so I'm closing this ticket, and will open a fresh one, with a milestone of 1.1, for the introduction of an explicit delimiter for use between collapsed cites. |
For posterity, the "explicit delimiter for use between collapsed cites"-ticket is #52. |
It looks like we we missed one. APA uses semicolons between full cites:
But the years of a collapsed cite are separated by commas:
What is the way forward?
The text was updated successfully, but these errors were encountered: