Smart quotes in notes created with Add Note from Annotations

In Zotero 6.0.18, when `Add Note from Annotations` is selected to extract an attached PDF's highlighted annotations, each block of highlighting is wrapped in smart quotes (i.e. "curly" quotes, not straight quotes). This occurs despite the hidden preference setting `note.smartQuotes: false`.
And, when selecting to export that note using `Export Note...` and selecting the `Format` to be `Markdown`, the smart quotes are retained. This despite Markdown supposed to be a plain text format.
How do I get straight quotes for both?
  • I don't know the answer to how to remove them (though I'd guess note templates can), but does this actually cause any issues? Smart quotes are plain text -- they're regular utf-8 characters -- and I don't think markdown should have any problems with them.
  • Yeah, this is a misunderstanding of what "plain text" is — typographic quotes are plain text. I'm not aware of any Markdown editor that doesn't support Unicode.

    I guess one could argue that note.smartQuotes: false should cause added annotations to use straight quotes, but that setting is really just there for people who use certain odd keyboard layouts where you insert an accented character by typing a straight quote followed by a letter, and the smart quotes interfered with that. Someone using such a layout could even be manually inserting typographic quotes for quotations. Technically, "smart quotes" just refers to the automatic conversion while typing, not to typographic quotes themselves.
  • Yes, I identified two issues regarding inline quotes:

    1) The setting `note.smartQuotes: false` was ignored when Zotero extracts highlighting from a PDF attachment, which previously was respected by the Zotfile plugin (which I now see was rather probably controlled by the `zotfile.pdfExtraction.formatAnnotationHighlight` configuration I modified many years ago. I'll have a look at note templates to see if I can get that to use straight quotes, but suspect not as `zotero.annotations.noteTemplates.highlight` has the value `

    {{highlight}} {{citation}} {{comment}}

    ` (the para tags are not being read as verbatim) which omits any quotation marks (unlike the Zotfile setting), so I suspect they are hardcoded in the extraction.

    2) Markdown note export retains/produces typographic quotes. Whilst I agree that most/all text editors support UTF8, John Gruber's original Markdown[1] intended that typographic markup should not be part of the source document (as seen in that document) . Hence, he wrote the SmartyPants[2] filter to produce typographic quotes (amongst other typographic enhancements) from the original Markdown ASCII source. And, this typographic conversion remains an extension in more modern and extended Markdown formats (e.g. Pandoc, with the `smart` extension[3]). Indeed, in Pandoc if you convert from Markdown to Markdown, by default typographic quotes (plus the other SmartyPants features) are converted to their ASCII equivalents. I believe that Zotero should retain this expected behavior on Markdown export. But, if not, I can run Pandoc on any notes exported from Zotero to get the output I expect and want.

    [1]: https://daringfireball.net/projects/markdown/index.text
    [2]: https://daringfireball.net/projects/smartypants
    [3]: https://pandoc.org/MANUAL.html#typography
  • edited December 21, 2022
    so I suspect they are hardcoded in the extraction
    They're localized.
    The setting `note.smartQuotes: false` was ignored when Zotero extracts highlighting from a PDF attachment
    Because, again, using typographic quotes when generating a quotation from scratch isn't what "smart quotes" refers to. "Smart quotes" is about converting characters while typing.
    John Gruber's original Markdown intended that typographic markup should not be part of the source document
    Even if what John Gruber did in 2004 was relevant for Markdown in 2022, I don't think that's implied at all. The goal was to be able to type in ASCII for a few specific characters while writing your weblog and get proper typographic output, not to bar the use of typographic characters in source documents. Markdown outputs HTML, but any HTML is still valid in a Markdown source document. So too with Unicode characters. There are also…over a hundred thousand more valid Unicode characters than the few he was concerned with there, so the idea that a Markdown source document is inherently ASCII is nonsensical. "Plain text" != ASCII.

    This isn't something we'll be changing.
Sign In or Register to comment.