How to export references from (LibreOffice) document?
Hello!
I use the Zotero Firefox plugin, and the one for LibreOffice. My Zotero entries are organised with tags, collections or different libraries. After completing a document, I am now looking for a way to export (to BibTeX) only the references I used it that document. Is there any? If not, please consider adding one; preferably the "Edit Bibliography"-screen.
Please see http://drop.pr/Nxy0WQ.png . IMHO even the possibility to drag-and-drop selected references from the right to a folder/collection on the left would help. But a dedicated export option would be neater :-)
Thanks and greetings!
I use the Zotero Firefox plugin, and the one for LibreOffice. My Zotero entries are organised with tags, collections or different libraries. After completing a document, I am now looking for a way to export (to BibTeX) only the references I used it that document. Is there any? If not, please consider adding one; preferably the "Edit Bibliography"-screen.
Please see http://drop.pr/Nxy0WQ.png . IMHO even the possibility to drag-and-drop selected references from the right to a folder/collection on the left would help. But a dedicated export option would be neater :-)
Thanks and greetings!
https://rintze.zelle.me/ref-extractor/
<text:reference-mark-start
tag.There's a little bit of surrounding JSON that Zotero inserts to mark the citation itself, but that shouldn't be hard to understand.
If the LO and Word Zotero plugins use the same CSL JSON, it's a shame that LO can't save a document in .docx format with the CSL JSON intact. In trying to get more insight, I found https://github.com/zotero/zotero-libreoffice-integration/issues/39
* In LibreOffice, change the Zotero citations in the .odt file from ReferenceMarks to Bookmarks.
* Save the document in LibreOffice as .docx
* Open the .docx document in Word, and change the Zotero citations from Bookmarks to Fields. Then save the .docx file and try the extractor.
It sounds like you didn't try the last step, which might be what you're missing.
One possible explanation is that the value of "text:name" is used both to store the CSL-JSON metadata and to identify which start and end tags belong together, but I'd like to have this confirmed (or at least know for certain that both tags always have the same value so I can just extract the metadata from one).
In the zotero-libreoffice-integration thread on issue 39, users tstenner and adomasven seem to be people who might have the answer to our question about duplication. I don't know what's a good way of bringing their attention to this discussion.
As for the questions regarding ODT xml schema - I have no answers. We only interact with LibreOffice via their plugin APIs and LibreOffice writes the ODT files with all the relevant doc data to disk. You should ask the LO developers.
http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#__RefHeading__1415230_253892949 says: (emphasis mine)
So that seems to confirm that the text:name attribute value on the start and end tags of any given reference is always the same, which should make supporting ODT files in my reference extractor fairly trivial. It's a bit silly to use the complete CSL JSON string as a identifier, but I'm not sure Zotero can do anything about that. Although maybe you could store this metadata on the
<text:meta>
or<text:meta-field>
attributes?