Available for beta testing: Google Docs integration

edited 7 days ago
The latest Zotero beta and Zotero Connector beta for Firefox features an experimental implementation of Google Docs integration. You will need a beta of both Zotero and the Connector.

To begin testing you will need to go into the Connector Preferences -> Advanced and check "Enable Google Docs Integration (experimental)". This will enable a Zotero menu and toolbar button in Google Docs editor, which will allow the full Zotero citing experience previously available on LibreOffice and Word. Before beginning to work, Zotero will prompt you to authenticate the plugin with your Google Account.

More details:
  • This is a very early experimental plugin and you should not plan any serious big piece writing with it, unless you are willing to backup your document frequently, and perform manual troubleshooting in case of document or citation corruption. That said, we have done a fair amount of testing and the plugin appears to be stable in normal usage and ready for a public preview.
  • Citation inserts/edits slow down significantly as the number of citations increases. We will be looking for ways to improve the speed, but due to limitations of the current Google Docs API, it is not clear how much performance we will be able to add. With 100+ citations a single citation update can take up to 10s, so you will want to disable automatic citation updates in the document preferences for bigger document.
  • Google Docs provides limited facilities for text formatting. Styles that use small caps fonts will not use a true small caps formatting style in Google Docs and instead will fall back to the "Alegreya Sans SC" font. Citations that have been inserted with disabled automatic citation updates will be inserted with grey background, instead of dashed underlining, like in Word and LibreOffice.
  • Copying citations across documents is currently not supported (and we do not guarantee support in the future). Copying citations within a document should work without problems.
  • Shared document editing is fully functional as long as both editors have editing permissions for the document. You do not need to share Zotero libraries or be in the same group library -- the citation data is embedded in the document. However, you should avoid inserting or editing citations concurrently. There are mechanisms in place to prevent document and citation corruption due to concurrent citation editing, but due to technical limitations they are do not provide perfect safety.
  • For non-Zotero users the active Zotero citations will appear as links leading to URLs like https://www.zotero.org/google-docs/?abc123
  • There is currently no official support for compatibility between Google Docs and Word/LibreOffice. If you download the document from Google Docs and open it with Word, in place of active citations you will have in-text links that do not lead anywhere. The Google Docs plugin uses these links to identify citations within the document. A workflow for converting docs between different word processors is coming soon.
  • The plugin needs both Zotero and the Zotero Connector to work. Currently there are no plans for citing support with Zotero Connector or Zotero only.
  • A stable Connector update for Chrome and Safari with the plugin support is coming after some initial Firefox beta testing too. The Google Docs plugin itself will remain experimental and disabled by default for a while, until we are happy with its stability and have figured out how to troubleshoot and provide support for citing issues
If you try this out, let us know how it works for you and if you run into any trouble.
«1
  • Is there any way to add support for opening a Zotero Word/LibreOffice document in Google Docs and have citations converted.
  • Is there any way to add support for opening a Zotero Word/LibreOffice document in Google Docs and have citations converted.
    Very unlikely to ever support something better than the ODF-Scan-like workflow. This is because Google Docs does not feature any support for data types that Word or LibreOffice uses.
  • edited 28 days ago
    Edit, sorry, didn't come out as intended.

    1. Awesome

    2. Still seeing some problems. Empty document, trying to insert a citation (tried various styles). Everything goes well up to the citation picker. When I select a citation and press enter I get

    Zotero experienced an error updating your document. [Exception... "Unexpected error" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: chrome://zotero/content/xpcom/connector/httpIntegrationClient.js :: Zotero.HTTPIntegrationClient.Field.prototype.setText :: line 176" data: no]
  • edited 28 days ago
    @adamsmith could you submit a report ID from Zotero and test in a new profile?
  • Report ID is 2140201487
    will try without add-ons later. New profile won't happen until tonight.
  • Awesome!!!
  • This appears to be an incompatibility with Better BibTeX -- disabling the add-on fixes it and re-enabling reproduces the error. cc @emilianoeheyns
  • I'll look into it tomorrow... Hopefully it's just one of the monkey patches, not a race condition.
  • How far off is this from being non-beta btw? I currently do *not* have the time to target more than one version.
  • At least a couple of weeks. I had written this in an attempt to not interfere with BBT and either us or you may be able to apply a simple fix such that a single codebase can work with both versions. See my message on zotero-dev
  • My previous attempt with dual sync/async didn't work out well, plus it builds in extra complexity which is almost instantaneously legacy code... I can work on a branch for things that don't upend the whole architecture, but the latest released BBT always only supports the latest released Zotero. If it works on earlier versions I don't complain, but my workload makes it impossible to do too many permutations.

    I won't have access to a computer until the morning, but I could actually really use gdocs for throwaway pieces for work with colleagues who insist on word files, so I'm keen on getting this fixed.
  • @adomasven This looks great and are good news! I tried it out and started a document in APA style with a citation and list of references. So far that worked well. Then I tried to switch to a footnote style (CMoS full note) but that didn't work ans some strange loading artefacts were repeated again and again.
  • @adamsmith what kind of problems are you seeing? I can see that CAYW is broken but just in the sense that I don't get results. In my limited tests, Zotero seems otherwise unaffected. What problem did you experience?
  • Google Docs plugin (announced here) throws errors when inserting citations with BBT enabled. You would have to test the plugin to see the error.
  • Does this beta connector work with both the regular release of Zotero and the beta?
  • Actually, do not worry about it. I found a simple fix on our side. If CAYW is not affected, you can just ignore the changes on our side.
  • Happy to hear that.

    CAYW is affected, but it seems fixable. Who calls initDoc? Is that called by Zotero? Should I call it in createDocument?
  • @zuphilip That should generally work, although switching between inline and footnote styles is using some really brittle code that requires the user to keep the cursor focused in the document and not interacting while it is happening. Switching to an footnote style and then trying to switch back to an inline style is currently broken but will be fixed in the next update.
  • Happy to report that multilingual cite support works fine when JM is run with this.
  • @adomasven This note has piqued my curiousity:
    You can transfer the document to LibreOffice using the RTF/ODF-Scan plugin.
    Are there steps that would convert from GD references to ODF Scan markers, or would this mean that a document intended for LO export with live citations should be written with ODF Scan markers from the start?
  • Just chiming in to say "nice". I think I may prefer this over the word processor plugins. Will this work for collaborative editing?

    Now that I may actually use Zotero with something else than bibtex, where should I ask about "Author (year)" support for citations?
  • @fbennett I assumed that the plugin had a citation style that converted citations to markers, but it seems that I may have been wrong. Either way, we're working on a solution for document transfers between Google Docs and Word/LO, since being able to go both ways.

    @emilianoeheyns Collaborative editing works, but concurrent citation editing may produce unexpected results.
  • I'm getting


    Zotero experienced an error updating your document. Error: Failed to insert field. Could not find the placeholder link. {"noteType":0,"code":"{}","text":"{Updating}","id":"UsSQPN"}

    Debug ID: 1251657904
  • @emilianoheyns Was this a one off or reproducible? Were you editing the document while Zotero was trying to insert the citation?
  • @adomasven Yes, no style is involved. The ODF Scan plugin works by unzipping the ODT file, mangling the XML with a series of regular expressions, and rezipping the file. (Sounds horrible, but converting the strings in the DOM would have been impossibly cumbersome.)
  • @adomasven it's reproducible, but I wasn't editing the document. The circumstances under which I can reproduce it are pretty uncommon though: if I position my cursor at the end of a paragraph, then drag right (thereby I think selecting the end-of-paragraph marker or somesuch, see https://imgur.com/a/MQCv6X9) and then click "add/edit citation", I get this error.

    When I have text selected and I choose add/edit citation, I also get an error:

    Zotero experienced an error updating your document.

    responseJSON.response.result is undefined

    (debug ID 372109881)
  • Hey wait -- I assume the beta connector speaks HTTP to Zotero? That means I could retire my Application/Document/Field implementation in CAYW and just use the HTTP endpoint to pop up the picker.
  • Hey wait -- I assume the beta connector speaks HTTP to Zotero? That means I could retire my Application/Document/Field implementation in CAYW and just use the HTTP endpoint to pop up the picker.
    @emilianoeheyns You could, but there's no real reason to. Let's continue this discussion in zotero-dev though.
  • Collaborative editing works, but concurrent citation editing may produce unexpected results

    Can somebody please explain this a bit more? We now use Frank's and Sebastian's rtf/odf scan solution, and while it's not perfect (esepcially for GDocs with tables or text boxes), at least it has never created any 'version control' issues. So what type of 'unexpected results' are these? And are these bugs that will be fixed, or 'structural' problems? 

    I do think that a more elegant solution to Google Docs integration is a smart move. Also in 'competitive' terms (Mendeley - and the entire secondary school 'market' segment). But the real-time collaborative aspect really would have to be perfect...

  • Concurrent citation editing: two people try to add/edit citations in the same document at the same time.

    I think that's a fairly easy to avoid scenario as things go. Adomas specifies possible effects in the first post:
    The result of concurrent editing is undefined, but will most likely produce errors, and may lead to citation or document corruption.
Sign In or Register to comment.