Fields for Zotero

Phillips Rogfield thebudget72 at gmail.com
Tue Aug 16 07:03:19 UTC 2022


Hi Miklos,

thank you very much for your answer!

Let’s make sure we are on the same page here.

Zotero is already able to write its citation with LibreOffice.
To do so, it currently uses one of two methods, at user’s choice:
(1) ReferenceMarks, which are NOT compatible with Microsoft Word
(2) Bookmarks, which are SOMEHOW compatible with Microsoft Word, in the 
sense that you can’t put citations in footnotes, and they tend to break 
very easily.

Instead, the Zotero plugin for Microsoft Word uses:
(1) Fields, which are NOT compatible with LibreOffice
(2) Bookmarks, see above.

The point of this post is to allow the plugin for LibreOffice to use 
“Fields”.

In particular, I have to use the UNO interface to write the following in 
the |word/document.xml| file inside a .docx file:

|<w:r> <w:fldChar w:fldCharType="begin"/> </w:r> <w:r> <w:instrText 
xml:space="preserve"> [some text here] </w:instrText> </w:r> <w:r> 
<w:fldChar w:fldCharType="separate"/> </w:r> <w:r w:rsidRPr="007C09F6"> 
<w:rPr> <w:rFonts w:ascii="Calibri" w:hAnsi="Calibri" w:cs="Calibri"/> 
</w:rPr> <w:t> [some text here] </w:t> </w:r> <w:r> <w:fldChar 
w:fldCharType="end"/> </w:r> |

would the |com.sun.star.text.TextField.Bibliography| interface allow me 
to write the above code?

Best and thank you again.
Phillips.

On 16/08/2022 08:23, Miklos Vajna wrote:

> Hi Phillips,On Mon, Aug 15, 2022 at 05:19:33PM +0200, Phillips Rogfield wrote:
>> Zotero<https://www.zotero.org/>  is a citation manager with a plugin forLibreOffice<https://github.com/zotero/zotero-libreoffice-integration>.I would like to implement Fields, that is, for the plugin to write citationusing Fields, as per this issue<https://github.com/zotero/zotero-libreoffice-integration/issues/39>.It looks like the relevant entry point is |com.sun.star.text.Fieldmark|,however I went to the IDL reference<https://api.libreoffice.org/docs/idl/ref/index.html>  and there seems to beno such class under |com.sun.star.text|.Is it undocumented? Can you point me in the right direction?
> Fieldmarks are primarily for preserving fields imported from Word, soit's somewhat intentional that there is no UI / documentation on how tocreate them.Writer's bibliography UI creates bibliography fields instead, availableas the com.sun.star.text.TextField.Bibliography UNO service. Did youconsider going with that instead?Regards,Miklos

​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20220816/1ebf3acc/attachment.htm>


More information about the LibreOffice mailing list