Programmatic reference insertion to the flat ODF XML document

edited February 1, 2024
Hello!
I wondered if there are existing solutions to insert references to existing `.fodt` file? The use case is to change references being already inserted to document by Mendeley, to equivalent Zotero references assuming the libraries of both reference managers contain the same papers. I can parse flat XML in python, but couldn't find proper solution to programmatically insert Zotero references. I believe it might be implemented within LibreOffice Wire Protocol framework (https://www.zotero.org/support/dev/client_coding/libreoffice_plugin_wire_protocol) but may be there are better solutions. I am not fluent in js and Java so modifying the official Zotero integration plugin (https://github.com/zotero/zotero-libreoffice-integration) is not an option for now.
  • Zotero is compatible with citations inserted with Mendeley Desktop. If you import your library into Zotero using the Zotero Mendeley importer, the items in your document will be automatically linked to your Zotero library.
  • It is really new thing for me. I have not an idea one could reuse references with different bibmanagers' backend.
    There are some issues with mendeley2zotero import. Some citations did not exist in imported collection. As well pdf annotations looked very strange (annotation text was separated from the original part selected, instead having been linked to a sticky note). In result of this behavior I have a part of library items imported via "canonical" imported, with remain part imported manually, re-annotated also manually and merged if necessary with existing items. So, identifiers and citekeys might differ from those were present in the Mendeley library.
    Could you please clarify some more things on interoprating items among different reference managers? What is the mechanism and what it rely on?
  • https://en.wikipedia.org/wiki/Citation_Style_Language

    In Word, if you choose toggle field code for a citation, you could see the underlying csl fields as inserted by Zotero or Mendeley. Not sure how that works in LibreOffice.
  • @emirsale Generally there is no interoperability between different citation manager references inserted into text documents. However there is one between Zotero and Mendeley Desktop (now discontinued).

    If you imported items with the importer included in Zotero, and did not delete them, and later merged items imported in some other way with them, then they should still be linked with your document. Otherwise you will need to reinsert those items manually from your Zotero library. You can check to see if the item is linked to your library when clicking on the citation bubble and checking whether a "Show in Library" button appears. There will soon be a better, unified way to check all items cited in the document, but for now this is your only option.

    Do note that it's not a problem to have cited items in a document that are not connected to your library unless you need to modify the item metadata in Zotero and want that reflected in your document.
Sign In or Register to comment.