Zotero to ODT (then Jutoh) - citation links not preserved

Using Zotoro 4.0.12 plugged in to Firefox 23.0.1 linked to LibreOffice 4.1.0.4 on Win XP (on VirtualBox on Ubuntu), (then importing to Jutoh Demo 1.71.14).

Within LibreOffice I have the Zotero Document Preference set to use Reference Marks and am saving in ODT format. The Zotero plugin correctly inserts the blibiography for my citations, in that they are the correct textual representation of them.

However, when saving and then importing the document into Jutoh the citations and bibliography have the correct textual representation, but there appears to be no link between the citations and corresponding bib. entries.

I don't think this is a Jutoh issue. Reason: I have unzipped the ODT produced by LibreOffice and inspected the content.xml . My observations are:

- Each citation has three adjacent (not nested) XML elements:
<text:reference-mark-start text:name=" ... "/>
<text:span text:style-name="T1">text of citation</text:span>
<text:reference-mark-end text:name="..."/>

- The individual bibliography entries only have a styled paragraph with span elements for the individual components of the reference.

- There is no sign of anything that could be an ID which could be the source / target of a cross-link.

Is it possible to save citation-to-bibliography links in Zotero+LibreOffice/ODT?

Have I missed some vital setting, or are my expectations too high?
  • edited August 25, 2013
    I don't quite understand. This works in LO, it doesn't work in Jutoh - why don't you think this is a Jutoh issue?
    If you open the content.xml of a LO document with reference marks, citations will look like so:

    <text:reference-mark-start text:name="ZOTERO_ITEM CSL_CITATION {"citationID":"15g2crs59k","properties":{"formattedCitation":"(Author1 et al., 2008)","plainCitation":"(Author1 et al., 2008)"},"citationItems":[{"id":2088,"uris":["http://zotero.org/users/2433/items/JJU6BMVT"],"uri":["http://zotero.org/users/2433/items/JJU6BMVT"],"itemData":{"id":2088,"type":"article-journal","title":"Article, No Issue, Url, Full Date","container-title":"Test Journal","page":"12-15","volume":"12","URL":"www.testurl.edu","author":[{"family":"Author1","given":"One"},{"family":"Author2","given":"Two"},{"family":"Author3","given":"Three"}],"issued":{"date-parts":[["2008",12,16]]},"accessed":{"date-parts":[["2008",12,16]]}}}],"schema":"https://github.com/citation-style-language/schema/raw/master/csl-citation.json"} RNDCEn3ufvYXs"/>

    where the uri is the ID.
  • May be I'm misunderstanding how / where the bibliography construction process works.

    I can see, as in your example above, and in my ODT file, that all the information needed to create a bibliography entry is packed in the text:reference-mark-start text:name attribute. I can see that the Zotero plug-in would use this to generate the complete bibliography.

    I had assumed that, once this unpacking / bibliography construction had taken place in LibreOffice+ Zotero plug-in, that the two separate textual groups (citations distributed through the document and the bibliographic references in one group) would be saved in ODT with cross-links from citations to bib. entries.

    You seem to suggest that Jutoh ought to again unpack and parse the packed bib.info in each individual citation' text:name attribute and build its own bibliography, duplicating the bibliography constructed by the Zotero plug-in.

    Is that what you expect?
  • edited August 25, 2013
    Or, to put it another way, leave Jutoh out of the discussion completely...

    If I use the Zotero plug-in for LibreOffice to insert citations, then I build a Bibliography, there are no (hyper-)links from the individual citations to the corresponding bibliographic entries in this LibreOffice document.

    They are just isolated, unrelated bits of text.

    Is that the correct behaviour?
  • The Zotero plugin generates the bibliography based on the citations in the document. If you add a new citation via the plugin or use the Refresh function, it will update the bibliography. There's not supposed to be any other sort of link.
  • Ah, thanks.

    I'll think about writing my own little converter to modify the ODT file: it would decode the packed citations and generate by own bibliography, with two-way hyperlinks between citations and bibliography, so that they appear cross-linked in a resultant EPUB book (when it is exported by Jutoh).

    I'd rather target Sigil as my ebook compiler (being not a paid-for product), but I suspect the packed citation data will have been lost from the LibreOffice HTML export which Sigil would require.

    The alternative would be to use Sigil and to build my own Zotero-to-html tool using the Zotero API. I would use this to construct the bibliography in a separate HTML file which Sigil would integrate into the book. I've played with the API enough to see that it is possible, but it would inject the citations rather too far down the document preparation process for my liking (no round-trip editing).
  • (independently of this, bib-citation hyperlinks are a pretty frequently requested feature, so it'd be nice to get that as an option in the word processor plugins. Not aware of anyone working on this though. There is a VB script for Word somewhere on the forum that should be pretty easy to find, but not sure if that's worth it)
Sign In or Register to comment.