Tropy-plugin-csl: CSL-JSON "dimensions" exported but not imported into Zotero “Artwork Size”

Hi everyone,

I’m using the Tropy CSL export (tropy-plugin-csl) to send items to Zotero. I’m trying to populate the “Dimensions / Artwork Size” field in Zotero for illustration-type records.

What I’m seeing

  • The CSL-JSON export produced by Tropy contains the field “dimensions” .
  • The item is exported as “type: “graphic”” and includes e.g. “dimensions: “L 32 mm × l 28 mm × ép. 6 mm”” (real example from my export).
  • After importing the CSL-JSON into Zotero, the item ends up as Item Type: Artwork , but the “Artwork Size / Dimensions” field remains empty.

Expectation
Since Zotero’s Artwork “Artwork Size” is mapped to CSL “dimensions” , I expected the value to appear there after import.

Question
Is this a known limitation/bug (either in the Tropy exporter or in Zotero’s CSL-JSON importer), or is there a recommended way to encode dimensions so that Zotero reliably fills “Artwork Size” for Artwork items?

Extra context / checks

  • I verified that the JSON actually contains “dimensions” and the CSL type is “graphic” .
  • I can share a minimal CSL-JSON sample if that helps for debugging.

Thanks in advance for any guidance, and happy to test a fix or adjust my template if there’s a best practice.

Best regards,
Antonio Mendes da Silva

That’s odd, if your exported CSL-JSON file contains ‘dimensions’ then your mapping seems to work fine. Can you share the exported CSL-JSON file? Maybe we can spot the issue.

Here it is, thanks for your help !

from_tropy_to_Zotero_01.json (3.7 KB)
from_tropy_to_Zotero_02.json (3.7 KB)

These are the regular JSON files exported by Tropy, but can you post the CSL-JSON file exported via the plugin?

Hi,
I attempted to create a single Tropy template to cover all the item types that the CSL plugin needs to export (maps, graphics, books), which is why I included both an ‘extent’ field and a ‘format’ field. Could this be the reason why the ‘dimensions’ field fails to export?

This results in the two attached files…

export_Zotero_with_Extent.json (1.3 KB)

export_Zotero_with_format.json (1.3 KB)

Yes, that’s probably it. You can verify it by looking at the CSL-JSON file – if there’s no dimensions there then Zotero will not see it either.

The export templates maps each field to its label. When exporting, the plugin will go through these fields one by one and map the corresponding value. If you use the same label more than once then the second occurrence can overwrite the first one. So maybe that’s what’s happening here. It can be tricky to use a single template to cover multiple different mappings. One way around this is to use multiple templates and multiple plugin configurations. You can use the + Icon next to the plugin configuration to create a new one and use the name fields to distinguish between them. The name will show up in the export context menu so you could have, e.g. Export → Zotero Artwork Zotero Book and so on.