Problem With Converting Footnotes to Different Styles in LibreOffice

edited June 16, 2017
Hey and thanks to everyone reading / (eventually) commenting:

I am faced with the following problem: after downloading a google docs file as ODT and running it through Zotero's ODF scanner via Firefox, I am getting a working document: Zotero / LibreOffice is correctly reading the codes in the footnote section and converting it into text (i.e. it goes from: http://i.imgur.com/73fobux.png this to this: http://i.imgur.com/h1QqevK.png).

So, this is where it gets weird. The next thing which needs to be done is to convert these footnotes (which, when scrolled over, are being recognized [see: http://i.imgur.com/6GcogGj.png] as referring to Zotero) into Chicago-style notes. When I go to do this (make sure Zotero desktop is running -> go to Zotero settings in LibreOffice -> choose a style -> apply) I get some... interesting results. On both Mac and Windows clients, all citations in my document turn into this: http://i.imgur.com/M5n76Xx.png. In the case of Mac, LibreOffice starts pulling a ton of CPU power / memory and freezes up (see http://i.imgur.com/aRVZ9uX.png). On Windows, I get an error (can't screenshot because not on Windows at the moment) which basically tells me that the citations / Zotero library referred to aren't working. It's not a hardware issue - both computers I tried this on are equipped with 16GB of fast memory, SSDs, and 2,7Ghz+ current-gen processors.

Some observations from home troubleshooting:

- It occurred to me that the length of the document / number of citations (35 pages and 250+ respectively) could be the problem. It's not: I got the same problem trying to process just one page of this file.
- Making a new google docs document and dragging in a Zotero citation from my main group (just 1 citation) doesn't cause the problem to occur: in this case, LibreOffice was able to identify and convert the source.

The document has references from several groups, and several of the sources quotes are not on my computer's harddrive / listed under my Zotero. I think this might be the problem, but some help would be good. Making a new document in which one footnote (one which is not on my computer) is used replicates the previously described problem. It's my suspicion that the following needs to be done:

- All sources need to be put - regardless of whether this is a higher volume than can be hosted online (it is) into one group.
- That group needs to be exported as RTF and then downloaded as a local group.
- Once this group exists, all citations in the Docs file need to be re-referenced (dragged in) from the new group.

Has anyone run into this problem / do the bullet points above seem like a viable solution to this problem?
  • Your problem here is most likely the fact, that your citations are already in footnotes and you are trying to convert it to a footnote-based style, so Zotero tries to move your citations in footnotes to.. footnotes.

    Does it work if you choose a non-footnote based style, like APA?
  • Thanks for your response!

    An interesting suggestion, but unfortunately the problem persists: the {Citation} message (produced because Zotero / LibreOffice couldn't access sources) moves to the body of the text when I try to convert the footnotes to normal Chicago Style (Author, Date) citations.
  • Okay. So what you're most likely seeing on MacOS is this issue. I.e. You're getting the same prompt that you would on Windows, but it is invisible and manifests as a freeze.

    RDF/ODT scanner developers will need to look into this.
  • edited June 16, 2017
    Absolutely the case - LibreOffice on MacOS Sierra crashes rather than showing an error message (and thanks for sharing a link to the issue).

    But the question remains: is there something I can do to ensure Zotero / LibreOffice don't run into this issue at all (i.e.: is there a way to avoid the error message even being sent)?
  • Just got a good result copying a piece of text which uses sources which occur in only one Zotero group (the full extent of which is on my computer) - could it really be as simple as adding sources which do not occur in Zotero groups which register on my computer to the 'main' document group?
  • If you can reproduce the issue by inserting citations in footnotes from two different groups and then changing the style, then it's a Zotero issue. Otherwise this is to do with RDF/ODT scanner.
  • Thanks, integration of all non-grouped sources it is then...
  • I tested without issues with citations from 2 different groups, converting from one standard style to another, so this is an issue that @fbennett or @adamsmith may be able to solve, although if the time is short, citations from a single group is a viable workaround.
  • But do you have access to both groups? I think there are some sources in my document which occur in groups which my account isn't included in. Basically because some sources were collected before I joined the project / groups are somewhat disaggregated.

    Either way, I appreciate the help! Plenty to try at least.
  • I think there are some sources in my document which occur in groups which my account isn't included in.
    Yes, this in combination with ODF scan would trigger an error message and I don't think there's anything we can do about that:
    ODF Scan just inserts the dynamic link to the Zotero database after scan (rather than storing reference information in the document the way the LO add-on does by default). If you set a citation style after that, it looks up the item information in Zotero. If that's not possible (because you don't have access to the group), it'll throw the error message that the item isn't available.
  • @adamsmith Perfect! Thanks for confirming the problem (which is obviously on my side then).

    Just to confirm: 1 inaccessible link would cause LibreOffice to render ALL links in the document as missing? On Windows, the program doesn't crash but this is what happens.

    Either way thanks for your help (also @adomasven) - I'm gonna apply this and i'll post again once I confirm that my problem has been resolved by simply securing access to the locked groups.
  • no, it'd just cause one link as missing, but I'm guessing if LO crashes, this breaks the linking process of updating them for the rest.
  • @adamsmith hm, but on Windows LO doesn't crash and it still renders broken links universally.

    I'll investigate and let you know if group access fixed the issue.
  • ah sorry, I misunderstood. That shouldn't happen and I can't see how ODF scan would cause it, but I'll try to test this. Won't be super quick though. Let us know what you find.
  • I've gotten LO working on a Mac here this morning, so I'll join the party and try to have a go at breaking it today.
  • Okay, I can reproduce the fault as well. Drawing items from multiple libraries works just fine, but when an ODF Scan entry is not available in the target library, LO on a Mac freezes without displaying the error dialog.

    I've dug back into the ODF Scan plugin code a bit, and it will be possible to fail gracefully on missing items, leaving a raw ODF Scan cite where the missing item had been. While possible, implementation won't be entirely trivial. We'll need to touch Zotero to check for presence of the item. The touch will need to be async, since the relevant library may not yet have been opened in the current Zotero session. That will mean that the entire conversion function needs to be asyncified. It isn't a particularly traumatic rewrite, but it will take more time than I have to put into it at the moment.

    I've pushed the small change that triggers the need for asyncification into a branch of the ODF Scan plugin source, in case anyone wants to take a stab at the coding.
Sign In or Register to comment.