Even if you were aiming for a more efficient approach in
Docear 1.2 zotero code#
Simpler to code - all updates use the same rebuildProcessorState()Ĭall on the processor, using data extracted from the document in a This might be a problem for large documents, but it is much Last I heard, Docear was using a simpler approach, recasting theĮntire citeproc-js registry on each citation edit, insert or delete,Īnd feeding refreshed citation strings into the document on eachĬycle. (individual references) and citation IDs (in-document referenceĬlusters), and limit document updates to the specific item or citation In Zotero (and I think in Mendeley), we track both item IDs In citeproc-js there are two ways to go about context-sensitive The approach adopted in Docear might be worth a look. If someone were to undertake coding for GD integration at some point, It does seem pretty thin, at this point at least. It would be great, however, to get some input on whether Zotero would be on board with this, since it would require some additions to the API (which could, potentially, also be contributed by a third party).Īnyone have any other ideas on this topic? Obviously this would be a good amount of work to get done and I don't expect Dan or Simon to take this up. Of course, the API might just not yet be suitable for Zotero integration with live citations. These are the first two core issues that I was thinking of, so I thought I'd ask for some input. I imagine something like, , ] as the request and as the response (plus bibliography) given a numeric style. The API would accept a set of references (in the order that they appear in text) as either IDs or JSON data (IDs would be easier for API users, but accepting raw JSON would be more versatile and probably somewhat easier to code on the server side) and return a set of formatted in-text references (in the same order as supplied) and the formatted bibliography. I think the most reasonable approach here would be for to provide this through the API. So assuming that the above would work out for managing citations within a document, one would also need to be able to format citations/bibliography correctly. Something similar to RTF/ODF scan could be developed to convert Zotero links to live citations. Scanning of the whole document would only be necessary when inserting a bibliography/updating in-text citations (this should only be done with explicit user commands, not after each addition) and stripping links, Another downside to the link approach is transferring documents from Google Docs to Word/LO. If the user is trying to edit a citation, then we could check only the area surrounding the cursor for links. Sounds pretty bad, but that's the best I can think of atm. However, if you wanted to find all citations/links in the document, you could essentially go through the document character by character and check if there is a link set there. Interacting with links is not very convenient, since they would be set on a segment of text without any easy way of retrieving them directly. The add-on would then offer an option to strip links (same as removing field codes). Also this system would complicate other operations (editing, deleting references, etc.)Īnother possibility that is available is inserting pre-formatted citations as links and storing the reference ID as the URL (bonus points: it redirects to the reference on ). I suppose you could use two bookmarks to indicate start and end of a citation, but it becomes easy for the user to delete only one of the bookmarks and mess up this syntax. Bookmarks exist, but are associated with a single position in text, not a range of text. Unfortunately, in Google Docs field codes do not exist. If we end up displaying the id to the user, then it's essentially the same as ODF scan. The general idea is to display a pre-formatted in-text citation and associate a Zotero ID with it in a user-invisible fashion (same as is done in Word/LO with fields and bookmarks).
I started looking around at the Google Docs add-on API and I think it may be possible.
While that's true, it would be quite nice to eventually add proper Zotero integration into Google Docs, which should be equivalent to Word/LO addons (i.e. As adamsmith explained in this post, you can essentially do the same thing using drag-and-drop from Zotero. This resulted in a few people on Twitter and in the forums requesting that a similar feature for Zotero be added to Google Docs. Google recently introduced add-ons for Google Documents, among which is an EasyBib add-on that essentially inserts a pre-formatted bibliography into Google Docs documents. I just want to get a technical conversation going about Zotero integration with Google Docs.