-
Notifications
You must be signed in to change notification settings - Fork 14
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
Inner quotes handled incorrectly for it-IT locale. #87
Comments
We can handle quote alternation properly when the quotes are added by CSL processing. Hard to think of a good solution short of having pandoc recognize all kinds of localized quotes as Quoted elements, which would require lots of changes. As a workaround, I'd suggest backslash-escaping the inner quotes, so pandoc will just pass them through literally without changing them. (You probably want to use curly quotes instead of straight ones in this case.) |
I’ve escaped my quotes for now, but I think there's a bug in that pandoc and citeproc don't currently agree on what a Quoted element is: pandoc thinks it should always be in The best solution, in my view, would be to have pandoc recognize as a quoted element a run of text enclosed in the quotation marks defined for the locale. I don't personally benefit from the recognition of Quoted elements, but if pandoc is going to recognize them, and wants to work with non-English documents, it should recognize as a quote what is marked as such according to the locale. If that's the solution you choose, than I think this issue can be closed, and a pandoc one for recognizing localized quotations should be opened in its place. The other solution would be for pandoc to continue to only recognize |
It's true, we could convert |
Another option would be for citeproc to use a custom Span element instead of Quoted to represent quoted sections, e.g. Note also that the code for resolving Quoted elements to inlines with localized quotes is currently in pandoc, not citeproc: |
This way we can leave pandoc's Quoted alone, and we won't get strange effects like the one described in #87 (where `"` behaves differently when in a citation suffix).
Thanks for the fix (though I haven't tested it). I think I had also seen this issue in a title that used quotes. As I understand it, you fix will deal with that too. |
The current code will treat a Quoted element in a title (or other bibliography field) specially, doing flip-flopping and localization regardless of the lang. It seems to me that this is the proper behavior, but feel free to give a counterexample. I had thought of making this locale sensitive (so that Quoted elements were just left alone in languages that don't use single or double curly quotes for either inner or outer quotes), but I decided against this in the end -- and in any case it wouldn't make a difference for Italian which uses double curly quotes for inner quotes. Here are two examples showing the current behavior in titles:
|
I think the problem I saw was double curly quotes in the title becoming guillemots in the output, which happens when it's a field that the style renders in italics rather than quotes. Italian bibliography styles I'm familiar with tend to use italics for the article title and quotes for the container title. So you get this:
This looks weird if the article title is in a language, like English, that doesn't use guillemots. But I can see this is a difficult problem to solve: flip-flopping is important, and parsing quotes is generally a good way of doing that, but non-English documents and multilingual bibliographies complicate matters. For now, the best solution I see is escaping quotes that shouldn't be changed. |
In Italian, «» are used for outer quotes, and "" for inner quotes, and the it-IT CSL locale (lines 74–77) specifies this. When a pandoc citation has a quotation with inner and outer quotes in its suffix, the inner quotes are changed from "" to «» if the locale is
it-IT
, whether this is specified by pandoclang
metadata or adefault-locale="it-IT"
attribute on thestyle
element in the CSL file.I assume this is a bug in citeproc because it does not happen to quotations in body text.
Test file (
test-quotes.md
):Correct output from
pandoc test-quotes.md --citeproc --csl universita-pontificia-salesiana.csl -t markdown-citations
:Incorrect output from
pandoc test-quotes.md --citeproc --csl universita-pontificia-salesiana.csl -M lang=it-IT -t markdown-citations
:pandoc --version
reports:The text was updated successfully, but these errors were encountered: