Opened 8 years ago
Closed 6 years ago
#1262 closed defect (fixed)
Broken pluralization with et al. + other issues
| Reported by: | dstillman | Owned by: | simon |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | styles | Version: | 1.5 |
| Keywords: | citeproc-js | Cc: | fbennett |
Description
I don't know the details on this, but opening for review. Patch forthcoming.
Attachments (4)
Change History (16)
Changed 8 years ago by fbennett
comment:1 Changed 8 years ago by fbennett
- Summary changed from is-numeric doesn't work for certain fields to Broken pluralization with et al. + other issues
- Type changed from enhancement to defect
- Version changed from 1.0 to 1.5
This patch incorporates four changes to Zotero Sync Preview 1.5. All four arise from work on the Bluebook style, but they are not otherwise interrelated, and should probably be divided across four tickets. All four are contained in the attached patch file, with an explanation of each change, and markers showing which line edits apply to which change. Very briefly:
(1) A name field with et al. is incorrectly identified as singular under some conditions. This is a bug, fixed with a small change to one line of code.
(2) The is-numeric test does not work for the note/extra or the locator field. While this may not be a but technically speaking, I do want to be able to apply this test to these fields for the Bluebook style, so I added changes to my local zotero to make it happen. Recognizing the note/extra field required only one additional line of code, but adding recognition of the locator field has harder, and the approach I have taken here may not be the best.
(3) An is-phrase test added by this patch tests for a space within a field, which (because Zotero strips fields before storage) has the effect to checking whether it contains multiple fields. This test is likely to be useful for ad hoc customization of fields that normally contain one word, and rely on an auto-generated prefix or suffix that users might need to override to cover some cases ad hoc.
(4) A lastchar-num test added here checks to see whether the last character of a field is a number. This covers a very specific issue in the Bluebook style. It requires the addition of three lines of code and modifies another.
comment:2 Changed 8 years ago by fbennett
Sorry about the typos in the above.
s/may not be a but technically/may not be a bug technically/
s/whether it contains multiple fields/whether it contains multiple words/
comment:3 Changed 8 years ago by dstillman
- Cc fbennett added; simon removed
- Owner changed from fbennett to simon
- Status changed from new to assigned
Thanks for your work on the Bluebook style.
Reassigning to Simon for review of 1 and 2.
3 and 4 really need consensus from the XBib list (or at least approval from Bruce) before we can do anything with them. A working Bluebook style is very important to us, but we can't unilaterally add features to CSL, which is an independent specification (since otherwise CSL files that used those features would be incompatible with other CSL processors). So I'd recommend posting to XBib to see if you can get support for is-phrase and lastchar-num. (The latter, in particular, seems pretty specific, and I'm not sure if it's better or worse than general regex support, but that's the sort of question that other CSL implementors (and Simon) could address.)
comment:4 Changed 8 years ago by simon
The patch for (1) is good. I have no strict opposition to (2), although I think the appropriate resolution would be to implement is-numeric for all fields. This patch allows <number variable="note"/> and <number variable="locator"/>, which are not in the schema.
After reading Frank's forum posts, I admit I'm still a little unclear on the use cases for (3) and (4), but I don't think there's anything inherently wrong with these ideas. I may or may not be in email contact for the next two weeks, but I'd trust the decision of the XBib community (if one is reached) regarding these points.
comment:5 Changed 8 years ago by fbennett
It would be great to have is-numeric opened to cover all fields.
Rentze has pointed out on the forum that (3) is essentially an escape mechanism, and that Dan has suggested using enclosing quotes within the field for this purpose. That strikes me as a much better approach than my hackish idea of scanning for spaces. It is more flexible, will extend better to Asian languages, and is more intuitive for end users.
Both Dan and Bruce have signaled initial doubts over the wisdom of (4), and I must confess that I take their point. The use case for which I cooked it up is very specific and very uncommon (book citations, in Bluebook in which the title ends in a number, which also have a locator pinpoint that is also a number ... whew). In fact, I can cover this better, and with simpler instructions to end users, if (3) is implemented using enclosing quotes.
Here are some use cases. A normal book citation in Bluebook, to a statement made on page 25 of the target source, looks like this:
Jane Roe, Anonymous Woman 25 (2000)
Here are some exceptional cases:
John Doe, Anonymous Man ([9th ed. 10th prtng.] 2003)
John Doe, My Life in 2001[, at 25] (2002).
(Braces added, to indicate field contents.) The first citation consists of the author, the title, the edition, and the year of publication. The "ed." suffix that is ordinarily appended automatically to the edition string must be suppressed in this case. The second citation consists of the author, the title, a locator, and the year of publication. In this latter case, Bluebook rules require that the space ordinarily prepended to a page number be replaced with ", at ", to make it clear that the 25 is a page number. A quoting mechanism would permit user customization of the target region to cover these very specific but frustratingly common offbeat cases, in a way that is very easy to explain.
I'll try to carry this one forward with the XBib community.
Changed 8 years ago by fbennett
Extend is-numeric test to cover note/extra fields and user-entered locator string
comment:6 Changed 8 years ago by fbennett
I have done a trial implementation of an "is-quoted" test operator, and broken out this plus changes (1) and (2) into three separate patch files. Hope this helps.
comment:7 Changed 8 years ago by fbennett
There was a bug in the third patch. Posting a replacement.
Changed 8 years ago by fbennett
Add is-quoted test for use with all fields and the user-entered locator string (updated)
comment:8 Changed 8 years ago by dstillman
See my comment questioning the addition of a separate "is-quoted" operator: http://forums.zotero.org/discussion/5080/isphrase-condition/#Comment_22086
comment:9 Changed 8 years ago by dstillman
comment:10 Changed 8 years ago by dstillman
comment:11 Changed 7 years ago by simon
- Keywords citeproc-js added
comment:12 Changed 6 years ago by simon
- Resolution set to fixed
- Status changed from assigned to closed
(In [6053]) Use citeproc-js as CSL parser. There is an issue with multiple citations in numbered styles that I will probably need Frank's help to track down, but otherwise, this seems to work. Many things are completely untested, including EndNote style support. Currently requires CSL 1.0 styles. In the near future, I hope to use the XSLT stylesheet to transform CSL 0.8 to CSL 1.0.
closes #1650: suppress author does not work for multiple sources
closes #1505: Edit Biblography Button Strips Year Disambiguation
closes #1503: Editing a bibliography resets all reference numbers to 1 (new)
closes #1262: Broken pluralization with et al. + other issues
closes #1238: Localize quotation marks
closes #1191: Harmonize 'plural/pluralize' label attribute with CSL schema
closes #1154: Only one works page numbers are added to the citation are when citing multiple works by the same author
closes #1097: Disambiguation issues
closes #1083: Defect in IEEE CSL with Multiple Citations
closes #993: more sophisticated subsequent-author-substitute
closes #833: text-transform doesn't work with name
Patch file incorporating four changes (one bug fix and three enhancements)