Giter Club home page Giter Club logo

Comments (16)

adam3smith avatar adam3smith commented on June 19, 2024 2

But the only scenario in which this wouldn't solve the multiple quotation variants per language problem is if someone had typographic quotes type 1 in their data and then wrote a text relying on typographic quotes type 2.
In that case they'll have to normalize their quotes (e.g. to straight quotes) and the style will convert into whichever form its locale (which can be a built-in locale with type 2 quotes) prescribes.

from citeproc.

fbennett avatar fbennett commented on June 19, 2024 1

In citeproc-js, the quote chars recognized beyond straight-quotes depend on the language field value (in ISO) of the item. So guillmet in a title of an "en" item will not be touched, but for "fr" items, they will be normalized.

from citeproc.

jgm avatar jgm commented on June 19, 2024 1

In citeproc-js, the quote chars recognized beyond straight-quotes depend on the language field value (in ISO) of the item. So guillmet in a title of an "en" item will not be touched, but for "fr" items, they will be normalized.

This library has the same behavior (I believe). Only straight quotes and the quotes specified as inner and outer quotes in the locale you're using are normalized; others are kept as they are.

from citeproc.

jgm avatar jgm commented on June 19, 2024

I'd love to get comments from CSL people on how this should be handled.
@bdarcus is it correct that citeproc.js just leaves curly quotes alone and doesn't do quote flip-flopping with them? That could lead to some bad results if you have curly quotes in your bibliography file, it seems to me.

from citeproc.

badumont avatar badumont commented on June 19, 2024

I don't think so. Straight quotes are what we type by default: if we make an effort to type curly quotes, that should be because we want them. It may be a problem only with bibliographic items retrieved automatically by the Zotero connector provided that we want the punctuation to be normalized, but these often need some cleaning anyway. And if curly quotes are automatically changed, what option is left to force them?

from citeproc.

bdarcus avatar bdarcus commented on June 19, 2024

I don't really know.

But logically, I don't see why one wouldn't.

Copying @fbennett @bwiernik @adam3smith

from citeproc.

bwiernik avatar bwiernik commented on June 19, 2024

A lot of bibliographic metadata contains properly typeset quotes. Manually typing quote marks in data is probably the minority of CSL cases, and many publishers include proper quotes.

So, in sum, citeprocs should normalize all quotes. We have discussed an escape syntax to intervene on hyphen/en dash normalization. I imagine such a syntax could apply here too.

But treating all quote marks the same, regardless of character, is expected. See this example in the test suite https://github.com/citation-style-language/test-suite/blob/master/processor-tests/humans/decorations_NestedQuotes.txt

Edit: Aligned this with Frank's comments below.

from citeproc.

badumont avatar badumont commented on June 19, 2024

Could'nt it be controlled by an attribute on cs:style? Something like normalize-quotation-marks, with accepted values all (default) and straight? If it depends on the publisher, it would be more logical to set it in the style than escaping characters in the bibliographical database.

In the meanwhile, how can we meet the requirements of the minority which retain the original punctuation of the cited item if all marks are converted?

from citeproc.

fbennett avatar fbennett commented on June 19, 2024

(Rereading, I see that that's the premise of the original question. I'm not following well, should sit this one out.)

from citeproc.

bwiernik avatar bwiernik commented on June 19, 2024

@jgm Yes, I think that's a reasonable behavior. For the unusual case that someone wants to prevent proper typesetting of inner/outer quotes, then a future general escaping/literal syntax could apply. I don't think any behavior currently needs to change in this library.

from citeproc.

badumont avatar badumont commented on June 19, 2024

The behavior described for citeproc-js isn't the same. Citeproc-js modifies the marks only in those items whose CSL language field is set to the same locale as the document. This prevents from modifying the curly quotes in references to English works when the document locale is set to fr. The behavior of citeproc, on the other hand, is to ignore the CSL language variable.

Whatever solution you prefer, the pair '« ' and ' »' is not recognized as quotation marks. Here is a MWE:

test.md

---
lang: fr
references:
- type: article-journal
  id: Frenchquotes
  author:
  - family: Doe
    given: John
  title: Le « titre dans le titre ». Étude
  issued: 2020
---

Command:
pandoc -t plain --citeproc test.md

Actual ouput:
Doe, John. 2020. « Le « titre dans le titre ». Étude ».

Expected output:
Doe, John. 2020. « Le “titre dans le titre”. Étude ».

from citeproc.

jgm avatar jgm commented on June 19, 2024

OK, thanks for this. I have to look into this, but I suspect the reason the guillemets aren't being recognized is that the locale file has

    <term name="open-quote"&#160;</term>
    <term name="close-quote">&#160;»</term>

A good experiment would be to remove the &#160; and see if that changes things. (If it does, we'll have to consider how to fix things so this works properly.)

from citeproc.

badumont avatar badumont commented on June 19, 2024

from citeproc.

denismaier avatar denismaier commented on June 19, 2024

Another thing to keep in mind is that some languages (e.g. German) have multiple quote variants that can be used interchangeably, but each document should be consistent, of course. Is there a way to take care of this?

from citeproc.

bwiernik avatar bwiernik commented on June 19, 2024

@denismaier The only mechanism provided for quote normalization in CSL is the inner-quote and outer-quote terms, for which a locale can provide one each.

from citeproc.

denismaier avatar denismaier commented on June 19, 2024

@adam3smith that makes sense!

from citeproc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.