Open Omikhleia opened 1 month ago
N.B. I wouldn't be against transferring smartquotes.sile to the SILE organization, if it may help here... But it would need #1631 (#1641) to be sorted out first, so that it can be made independent from the silex.lang adaptation layer...
And since it would still be a 3rd-party dependency outside the core distribution (whether as of today, or as a subproject under the SILE organization), wouldn't it also imply removing the bibtex support from the core distribution to manage it separately? (Which might be a good option anyhow, such things do not really belong to the "core", esp. if we want to consider CSL support at one point...)
I wouldn't be against transferring smartquotes.sile to the SILE organization, if it may help here
It might not be sufficient,
The period likely does not go inside the quotes if following usual conventions.
Actually, the picture is not obvious either in English, with titles already ending in a punctuation mark:
See https://universitypark-lonestar.libanswers.com/faq/241427
The devil is in the details as always.
A smartquotes package in core (or at least the org) makes a lot of sense to me, but I'm not sure with all the other things going on here that this would actually be a good use case for it. It looks to me like the whole string assembly bit of this code just needs to be refactored into a localized string using Fluent. Just because there is more punctuation involved than words being translated doesn't make in an inappropriate use of the tech: taking a bunch of arguments and outputting them in a certain order with certain marks between them depending on the locale is a localization job. The whole thing should probably be processed at once, not section by section, allowing localizers not just us coders to have easier control over how it all goes together.
Any chance I could convince you to work up an MWE with an entry each in English and French for example such that we could test the outcome of any proposed solutions to this?
A smartquotes package in core (or at least the org) makes a lot of sense to me, but I'm not sure with all the other things going on here that this would actually be a good use case for it. It looks to me like the whole string assembly bit of this code just needs to be refactored into a localized string using Fluent.
My current quick experiments lean towards both using smarquotes and Fluent, actually. But this is a "long-term" project (with bibliographies just on their way being assembled here) - so I wouldn't decide too soon on a solution, but you can count me 'in' at some step (i.e. after shorter term projects get completed)
For the record, with CSL:
punctuation-in-quote
in CSL locale defines whether the punctuation goes inside our outside the quotesHowever, the following concern (from my previous comment) does not seem to be addressed:
- Footnotes: Keep the comma after a title ending in a question or exclamation mark.
- Bibliography: Omit the period after a title ending in a question or exclamation mark
The CSL strip-periods
is something else, and does not cover these cases. There's no mention of them in the CSL specification, as far as I can tell. But this discussion on Zotero hints at it performing some extra "cleanup".
SILE 0.14.17 or 0.15-develop
While the bibliograpĥy package has provision for i18n via fluent, it always use curly quotes for article titles, etc. That is, “'Title”
https://github.com/sile-typesetter/sile/blob/b2cc0841ff603abc335c5e66d8cc3c64b65365eb/packages/bibtex/bibliography.lua#L378-L382
This is naive, and wrong: