-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use fields in odt files for Word compatibility #39
Comments
LibreOffice has incomplete support for Word fields. It clearly recognises and avoids erasing them, but there is no UI to edit the field contents within LibreOffice, nor programming API to interface with them from the plugin. |
Editing the contents of a field works for me (Libreoffice 6.0) and the changes are shown correctly in Word. Creating fields also works (insert the citation, create a |
Ok, I've done some more research on Fieldmarks and while, as noted above, LibreOffice clearly has some internal support for them. I am not sure it is complete and the programming API doesn't seem to be documented, which means that we would avoid using it for now since it is likely to change and break the plugin. Once the API is stable and documented, we would definitely accept a PR, although we would move to just using Fields in LibreOffice to simplify interoperability with Word, and convert old-style fields on document open or interaction. |
I've done some preliminary testing on inserting fieldmarks and asked on StackOverflow about finding Fieldmarks. JIM k's solution works (not sure about citations in footnotes though), but it might be a lot slower than Reference Marks. Still, "This document contains Fieldmarks, do you want to convert them to edit/insert citations" is a lot better than "This document uses fields and you need Word installed to change anything about it" |
We receive a lot of user feedback via the Zotero forums and I don't remember a single instance over the past couple of years of users being confused regarding collaboration between Word and LibreOffice. Either way, in the case of collaborative work across LO and Word we already support Bookmarks. Conversion from Fieldmarks to Reference Marks wouldn't help in this case, since the Word user would not be able to continue working on the document. If collaboration is expected Zotero already supports conversion to Bookmarks via the document preferences. We could suggest converting Fieldmarks to Bookmarks, but Bookmarks increase the risk of accidentally corrupting the fields or the document itself. Given that users often tend to click "Yes" in dialogs without reading them this could cause more problems than solve. Furthermore, having code based on unstable API makes it vulnerable to breaking with updates from LO, which means increased additional maintenance over the long run. Once the API is stable and there is a way to access Fieldmarks in the document, we will move to using Fieldmarks and remove the need for Bookmarks and Reference Marks completely. That is desirable, because it will simplify all plugin architecture significantly. |
The problem is not the confusion, but the irritating extra steps for everyone (e.g. here).
That's right, but the other way (Refmarks->Fieldmarks) will be needed for older documents even after the change to Fieldmarks. This could be done in LO Basic so the Java component can get simplified. I've created a bug report to get the ball rolling. |
Thanks for the interest and for creating the bug report. Another venue worth asking on is the LibreOffice developer mailing list since they may want to discuss this in more detail and you may be able to get this included into one of their weekly meeting's agenda. |
Any update on this? I have lots of documents with "fields" citations and that is forcing me to stick with Word. Having the ability to edit "fields" citations in LibreOffice would be great! |
This would be really nice. Libreoffice and MS compatibility is a major issue for me running Linux. |
I have not looked into this in more detail, but we may be able to support Word fields/fieldmarks in LibreOffice 7.6 and later. See |
After testing LibreOffice 7.6 and talking with LibreOffice developers I have discovered the following:
Regarding (1), we could consider adding a patch to LibreOffice which would make Word Field text editable. Assuming LibreOffice developers would be willing to accept it, we could move forwards with Field support. We generally wouldn't be as interested in this, but with the development of the new Word JS plugin, we would rather not support Bookmark citations given their various problems. On the other hand, with support for transferring Zotero citations via the transfer format, we could just slash Bookmark support for the time being without adding Field support to LibreOffice. |
I guess still nothing about this? |
The odt format also allows fields, as the following experiment confirms:
What does not work:
The extension currently doesn't recognize the citation fields, but libreoffice loads and writes them correctly in both formats. If they could be either loaded natively or converted on loading / saving the document, interoperability with Word users would be much improved.
The text was updated successfully, but these errors were encountered: