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

Translation of quotes? #12

Open
ndw opened this issue May 24, 2020 · 6 comments
Open

Translation of quotes? #12

ndw opened this issue May 24, 2020 · 6 comments

Comments

@ndw
Copy link

ndw commented May 24, 2020

In the test affix_CommanAfterQuote.txt, the citation item is:

        {
            "id": "ITEM-1", 
            "prefix": "'quote',"
        }

but the expected output is:

“quote”, Hello Thing

I can't find anything in the specification that indicates that single quote characters should be translated into opening and closing typographic quotes. Why is the output from this test not:

'quote', Hello Thing
@ndw
Copy link
Author

ndw commented May 24, 2020

Similarly, the result in affix_MovingPunctuation.txt has double quotes translated into matching typographic quotes.

@fbennett
Copy link
Member

The logic of quotation marks is not fully explained, but the tested behavior follows from the spec on Quotes ("the quotation marks used are terms"), and the term names specified under Appendix II: Terms ("open-quote/close-quote" and "open-inner-quote/close-inner-quote"). The "outer" and "inner" quotation forms are set by the locale, the input-side quotation markup is converted into an abstract nested structure, and the markup is applied according to the locale. To enable processing of native-language input, both straight single- and double-quote chars and the terms themselves are recognized for purposes of parsing the nested quote structure.

This "flip-flop" behavior was one of the first extensions to CSL proposed by Sean Takats at Zotero, early in the development of CSL 1.0.1.

@ndw
Copy link
Author

ndw commented May 24, 2020

So the interpretation of the string 'quote', is:

  1. abstract quote mark
  2. the string quote
  3. abstract quote mark
  4. the string ,

And the processor decides how to render the abstract quote marks, including whether or not the following punctuation , appears inside or outside them.

Do I have that right?

(I really don't see where that's specified, FWIW)

@fbennett
Copy link
Member

That's right. If "follows from" is too strong an assertion, I'll softening it to, "compatible with." In any case, that's my recollection as an implementer. I'll leave discussion of the specification proper to the CSL maintainers.

@bdarcus
Copy link
Member

bdarcus commented May 24, 2020

Flagging this for a few people, since it bears on the clarity of the spec. Would be nice if we could plug these holes are Norm is identifying them, and we're working on resolving lingering issues on the schema.

@rmzelle @adam3smith @bwiernik @denismaier

@bdarcus
Copy link
Member

bdarcus commented May 29, 2020

My understanding of where we're at now:

@fbennett has now removed spec files that rely on undocumented modes (#16).

This one is not one of them, and the resolution of this is to document this behavior.

So I should probably move this to the documentation repo.

Correct?

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

3 participants