Feature request re inline citations that have quotation marks

There is (if my knowledge is up to date and accurate) a long-standing problem with Chicago-style inline citations, when the final character is a closing quotation mark, as here:
See Smith, “Important article," and Jones, “Big article.”
I have a proposal that is, I think, more related to CSL and citeproc than to Zotero per se, but let me float it first among Zoterons.

Off-the shelf Chicago CSL specs include a final period for citations, but historians like myself often need a comma, or nothing added at all.
See Smith, “Important article," and Jones, “Big article.”
See Smith, “Important article," Jones, “Big article,” and others.
See Smith, “Important article," and Jones, “Why now?”
So we modify the CSL and, under <citation>, remove the suffix, changing this
<layout suffix="." delimiter="; "
to this
<layout delimiter="; ">
Now we have no punctuation. Great. We can just add it in our word processor after the citation, or we can add it as a suffix on the final item.
See Smith, “Important article,” and Jones, “Big article”.
See Smith, “Important article,” Jones, “Big article”, and others.
See Smith, “Important article,” and Jones, “Why now?”
But now the comma or period is (for those of us in the US) in the wrong place. It should be inside the quotation mark, not after it.

In the word processor we can just edit the citation and get what we want. But now we have a problem. We have severed the connection to the Zotero record. The citation will no longer be updated automatically. If we make a small style change or fix some spelling in the database, those changes will not reflect in the formatted citation.

My proposal is to put the needed punctuation in the suffix field of the final item and change how citeproc amends a suffix. Currently, it just appends the suffix. But that could be changed: If the citation without the suffix ends in a closing quotation mark and the suffix begins with a comma or period (and punctuation-in-quote is in force), then move that comma or period to just inside the closing quotation mark. A simple concatenation in citeproc.js would be replaced by a few substring functions.

suffix=. on the Jones item would produce
See Smith, “Important article,” and Jones, “Big article.”
suffix=. Translations mine. on the Jones item would produce
See Smith, “Important article,” and Jones, “Big article.” Translations mine.
suffix=, and others on the Jones item would produce
See Smith, “Important article,” Jones, “Big article,” and others.
Does this make sense? Has it already been discussed and rejected? Would it address the issue well? If so, how would this be implemented? With a change to the CSL spec? As a bug fix to citeproc? An enhacement to citeproc?

Thoughts welcome before I start looking at citeproc.js myself.

(I pitched in with the very first Word plugin years ago and I recall we struggled with this back then too. Now that I have returned to use Zotero on a book with 1200 footnotes, I find that the problem is still there. Sigh. My JS scripts skills are OK but I don’t know citeproc.js nearly enough right now that I could make production-level changes. So I am still at the thinking-about-it stage.)

-- John
  • Yeah, this is a citeproc-js bug, but I don't know if it's a general bug or specific to how CMoS is coded, so first thing would be to try this with a much simpler style and see if the suffix is _always_ appended or sometimes included.

    I'd also note that the recommended method for handling the use case you start out with the standard CSL is to add ", and others" in the suffix for the citation, which I believe works correctly with punctuation?
  • edited September 29, 2023
    Did you mean what I posted at https://forums.zotero.org/discussion/comment/444767 is a citeproc-js bug? or that this is? Where do I post citeproc-js bugs?
  • For this use case, adding , and others as a suffix does not produce the right result. The comma appears outside the quotation mark.
  • edited September 29, 2023
    Maybe the behavior I describe is in fact what is intended and there is simply a bug in citeproc?
Sign In or Register to comment.