BUG: (CSL) Zotero does not support "container-title-short"

Summary: Zotero does not support the standard CSL field "container-title-short" both reading in CSL, as well as outputting CSL.

The CSL standard specifies "container-title-short" as the Journal or other publication's abbreviated title: https://docs.citationstyles.org/en/stable/specification.html#appendix-iv-variables

Failure on import: Importing valid CSL that contains this property, Zotero does not map it correctly to its internal field "journalAbbreviation".

Failure on export: When exporting a Zotero record that contains an entry for "journalAbbreviation", the field is exported to CSL as "journalAbbreviation": , instead of remapping the field name. In contrast, "journal" is correctly remapped to "container-title" at CSL export.

I took a brief look at the code but because it is split across multiple subrepos I couldn't quickly ascertain where the problems were.
  • journalAbbreviation is valid CSL-JSON
  • edited October 9, 2021
    > journalAbbreviation is valid CSL-JSON

    Conceded.

    But then, so is `container-title-short`. It appears to be specifically called out in documentation and various sources as the official short form of `container-title`. (journalAbbreviation appears in the variables list, but sources I have found appear to favor `container-title-short`. For example, in the link in my original comment the Appendix IV, variables, lists `container-title-short`, but not `journalAbbreviation`. Thus it is reasonable to at least conclude that an IMPORTATION bug exists.

    I am further intrigued by the following type mapping which purports to have been created from Zotero's source code and indicates that the zotero internal field `journalAbbreviation` maps to `container-title-short` in CSL-JSON: https://aurimasv.github.io/z2csl/typeMap.xml#map-journalArticle
  • The CSL-JSON spec and the CSL style spec are slightly different, with the CSL-JSON spec including some aliases for variables for historical reasons. The preferred form for both is container-title-short, but journalAbbreviation is valid, and Zotero’s output works fine.
  • FWIW, BBT CSL exports remap journalAbbreviation to container-title-short.
  • > Zotero’s output works fine.

    @bwiernik I apologize I am not effectively communicating my follow-up request.

    Could you please file a bug on Github that Zotero fails to correctly IMPORT CSL-JSON which uses the `container-title-short` tag?
  • We probably can, but can we step back and talk about the use case? Why do you care about CSL JSON round trip?
  • @adamsmith I don't care about the round trip _per se_. I am producing an application that emits CSL-JSON and I would like to be able to consume it with Zotero.

    The Zotero export tag (which I still feel is undesirable behavior, but I am willing to concede) was an incidental observation.
  • @adamsmith As another concrete reason to address this bug, the Pubmed Central CSL-JSON API outputs "container-title-short".

    Again to be clear I don't really care about "round trip." I am interested in correctly _importing_ items into Zotero.

Sign In or Register to comment.