Plugin message in scenario: Zotero + LO Writer + .odm / .ott
My writing environment is Zotero + LibreOffice Writer + master document with sub-documents linked to master + document template
In the above scenario Zotero plugin prints following message to screen while author/user performs save to file:
"This document contains Zotero ReferenceMarks. Upon reopening the document, Zotero will be unable to edit existing citations or add new references to the bibliography. To save Zotero citation information, please select the "ODF Text Document" format when saving, or switch to Bookmarks in the Zotero Document Preferences."
https://s3.amazonaws.com/zotero.org/images/forums/u11124913/nkdopjane15f4443ypjp.jpg
I value work results of persistent quality, on another side afraid from possible side-effects of a switch to Bookmark-based references. This moved me to dig bit deeper the above question. I interviewed for this the deepwiki Devin AI-agent trained on LibreOffice-core code-base and asked it my question. In the response Devin didn't find crucial differences in how .odt format handler handles ReferenceMarks on one side and the .ott / .otm do. Maybe Zotero developers want to take a look at this question?
Unfortunately not possible to attache here my .txt / .pdf with whole record of made conversation with deepwiki Devin. Here the crucial excerpt:
Feb. 23th '26
Interviewing deepwiki Devin (AI agent) as guest user and the default GPT-model trained on LibreOffice-core code base.
# DeepWiki Q&A with Code Context for Repository: LibreOffice/core
## Q1
Writer, reference management however external to LibreOffice, the Zotero app. Zotero plugin for LO Writer uses by default ReferenceMark to place citations in document. It means in case of Zotero plugin in LibreOffice Writer the native format is ReferenceMark. The matter gets bit complicated when master documents or document templates get involved in writing work. Zotero plugin uses the distinction of .odt file format and .ott / .odm one. In this case it identifies a risk in handling ReferenceMark data and recommends/proposes user to make a switch to Bookmark based references. My question to LibreOffice-core code base: does Writer template or master code really handle /store ReferenceMark data differently than Writer regular documents do so in result references stored to template or to master document can stop be functional in the form Zotero plugin expects it?
### Answer
Short answer
No, the LibreOffice core does not treat ReferenceMark storage differently in templates (.ott) or master documents (.odm) versus regular documents (.odt). The core ReferenceMark implementation (SwFormatRefMark/SwTextRefMark) and the MarkManager are document-type-agnostic; there is no conditional logic in the provided code that alters how ReferenceMarks are stored or retrieved based on document type. The Zotero plugin’s recommendation to switch to Bookmarks in templates/masters is not due to a core storage difference. core:43-57 core:91-106 core:1807-1821
Detailed answer
### Core ReferenceMark implementation is document-type-agnostic
- SwFormatRefMark and SwTextRefMark implement reference marks without any branching on document type (template/master/regular). They store a name (SwMarkName) and manage text positions uniformly core:43-57 .
- The MarkManager provides access to marks (bookmarks, fieldmarks, annotation marks) via interfaces that iterate over the document’s mark container, with no per-document-type filtering core:91-106 .
### Enumeration and lookup are uniform
- SwXReferenceMarks enumerates reference marks via SwDoc::GetRefMarks/GetRefMark(name), which operate on the document’s mark list regardless of file format core:1807-1821 .
### No evidence of special handling in templates or masters
- The provided snippets include loading/saving paths and mark update logic, but none contain conditional behavior based on whether the document is a template or master document. Test cases for Zotero-named marks operate on regular documents only core:336-378 .
### Likely reason for Zotero plugin heuristic
- The Zotero plugin’s warning about ReferenceMarks in .ott/.odm likely stems from observed fragility in complex workflows (e.g., master document subdoc relationships, template inheritance) rather than a core difference in how ReferenceMarks are stored. The core treats ReferenceMarks as document-internal marks; issues arise from how external tools manage them across document boundaries.
## Notes
- If there were document-type-specific handling, it would likely appear in load/save filters or in SwDoc/SwDocShell initialization, which are not covered in the provided snippets.
- Bookmarks are handled via the same MarkManager infrastructure, so switching Zotero to Bookmarks avoids any edge cases specific to ReferenceMark usage in templates/masters, but the core storage mechanism itself is not different.
In the above scenario Zotero plugin prints following message to screen while author/user performs save to file:
"This document contains Zotero ReferenceMarks. Upon reopening the document, Zotero will be unable to edit existing citations or add new references to the bibliography. To save Zotero citation information, please select the "ODF Text Document" format when saving, or switch to Bookmarks in the Zotero Document Preferences."
https://s3.amazonaws.com/zotero.org/images/forums/u11124913/nkdopjane15f4443ypjp.jpg
I value work results of persistent quality, on another side afraid from possible side-effects of a switch to Bookmark-based references. This moved me to dig bit deeper the above question. I interviewed for this the deepwiki Devin AI-agent trained on LibreOffice-core code-base and asked it my question. In the response Devin didn't find crucial differences in how .odt format handler handles ReferenceMarks on one side and the .ott / .otm do. Maybe Zotero developers want to take a look at this question?
Unfortunately not possible to attache here my .txt / .pdf with whole record of made conversation with deepwiki Devin. Here the crucial excerpt:
Feb. 23th '26
Interviewing deepwiki Devin (AI agent) as guest user and the default GPT-model trained on LibreOffice-core code base.
# DeepWiki Q&A with Code Context for Repository: LibreOffice/core
## Q1
Writer, reference management however external to LibreOffice, the Zotero app. Zotero plugin for LO Writer uses by default ReferenceMark to place citations in document. It means in case of Zotero plugin in LibreOffice Writer the native format is ReferenceMark. The matter gets bit complicated when master documents or document templates get involved in writing work. Zotero plugin uses the distinction of .odt file format and .ott / .odm one. In this case it identifies a risk in handling ReferenceMark data and recommends/proposes user to make a switch to Bookmark based references. My question to LibreOffice-core code base: does Writer template or master code really handle /store ReferenceMark data differently than Writer regular documents do so in result references stored to template or to master document can stop be functional in the form Zotero plugin expects it?
### Answer
Short answer
No, the LibreOffice core does not treat ReferenceMark storage differently in templates (.ott) or master documents (.odm) versus regular documents (.odt). The core ReferenceMark implementation (SwFormatRefMark/SwTextRefMark) and the MarkManager are document-type-agnostic; there is no conditional logic in the provided code that alters how ReferenceMarks are stored or retrieved based on document type. The Zotero plugin’s recommendation to switch to Bookmarks in templates/masters is not due to a core storage difference. core:43-57 core:91-106 core:1807-1821
Detailed answer
### Core ReferenceMark implementation is document-type-agnostic
- SwFormatRefMark and SwTextRefMark implement reference marks without any branching on document type (template/master/regular). They store a name (SwMarkName) and manage text positions uniformly core:43-57 .
- The MarkManager provides access to marks (bookmarks, fieldmarks, annotation marks) via interfaces that iterate over the document’s mark container, with no per-document-type filtering core:91-106 .
### Enumeration and lookup are uniform
- SwXReferenceMarks enumerates reference marks via SwDoc::GetRefMarks/GetRefMark(name), which operate on the document’s mark list regardless of file format core:1807-1821 .
### No evidence of special handling in templates or masters
- The provided snippets include loading/saving paths and mark update logic, but none contain conditional behavior based on whether the document is a template or master document. Test cases for Zotero-named marks operate on regular documents only core:336-378 .
### Likely reason for Zotero plugin heuristic
- The Zotero plugin’s warning about ReferenceMarks in .ott/.odm likely stems from observed fragility in complex workflows (e.g., master document subdoc relationships, template inheritance) rather than a core difference in how ReferenceMarks are stored. The core treats ReferenceMarks as document-internal marks; issues arise from how external tools manage them across document boundaries.
## Notes
- If there were document-type-specific handling, it would likely appear in load/save filters or in SwDoc/SwDocShell initialization, which are not covered in the provided snippets.
- Bookmarks are handled via the same MarkManager infrastructure, so switching Zotero to Bookmarks avoids any edge cases specific to ReferenceMark usage in templates/masters, but the core storage mechanism itself is not different.
Upgrade Storage
## Q2
Well, in this particular case I should possibly have been talking about Zotero ReferenceMarks instead of ReferenceMarks. Does this distinction plays any role as far as it concerns your previous answer to my point?
### Answer
Short answer
No. “Zotero ReferenceMarks” are not a distinct core type; they are ordinary ReferenceMarks with Zotero-specific names (e.g., ZOTERO_ITEM CSL_CITATION). The core stores and enumerates them via the same SwFormatRefMark/SwXReferenceMarks/MarkManager paths regardless of document type, so the prior answer remains unchanged. core:43-57 core:1807-1821 core:1433-1482
Detailed answer
### Zotero ReferenceMarks are just named ReferenceMarks
- The core has no separate “Zotero ReferenceMark” class. Zotero creates standard ReferenceMarks with names like ZOTERO_ITEM CSL_CITATION {} ... and updates them via the same SetRef field insertion and update mechanisms as any other reference mark core:1433-1482 .
- SwFormatRefMark stores only the name (SwMarkName) and text position; it does not interpret the name content, so Zotero prefixes are treated like any other string core:43-57 .
### Enumeration and lookup are identical
- SwXReferenceMarks lists and finds reference marks via SwDoc::GetRefMarks/GetRefMark(name) without any Zotero-specific branching core:1807-1821 .
- The MarkManager’s mark container is agnostic to mark names; it does not filter or handle ZOTERO_* prefixes differently.
### No document-type-specific handling for Zotero-named marks
- Test cases that insert/update Zotero-named refmarks operate on regular documents; there is no conditional logic in the core that changes storage or retrieval based on .ott/.odm vs .odt core:1433-1482 .
- Therefore, Zotero’s plugin heuristic to switch to Bookmarks in templates/masters is not due to a core difference in how Zotero ReferenceMarks are stored.
## Notes
- The Zotero plugin’s behavior is driven by naming conventions and external workflow considerations, not by a distinct core mark type.
- If you need to verify persistence across save/load, check the ODF filters for reference mark export/import; those paths are not covered in the provided snippets but would also be name-agnostic.
Actually I like to add bibliography to master document right now, at the point of time the document is still far from be complete. Till day of write work completion only to need the bibliography updates be performed. Plugin message however places me in the position of being uncertain what will be my best handling.
In my ongoing writing mission what would be the overall costs of the switch to Bookmark-based references?
EDIT
I approach conclusion that for Zotero plugin for LibreOffice the message discussed here to trigger also on .ott and .odm to be alert exaggerated.
I think the message printed to screen as described in opening post this forum thread is meant more for the case that document encountered by Zotero (or its extension for LibreOffice) has an origin external to LibreOffice. However LO Writer template and master documents (.ott, .odm) are less LO-foreign. Devin didn't find in LibreOffice-core code base a code which would perform distinction between .odt on one side and .ott/.odm on another side - in terms of ReferenceMarks handling procedures. Nor finds Devin in Zotero libreoffice integration code base such distinction. I think printing this message in scenario as addressed here has a good chance to be eliminated unless Zotero developers find a concrete reasons to not do so.
In lights of my current analysis results the message puts user (as far as scenario presented is concerned) unjustifiably in uncertainty and the need of clarification. It costed me lot of time and effort to check the rationale of message and finding proper reaction on my side to it (inclusively communication in this thread).
The switch to Bookmarks-based references appears in case of LibreOffice to be no option - if to consult e.g. opinions found here in forum.