Using Zotpress?


#1

Is anyone else in the community using Zotpress (a WordPress plugin which integrates Zotero, the open-source citation management software), with their Pressbooks instance? As more of our faculty start thinking about using Pressbooks to write academic texts, we’ve been fielding more questions about integrating with Zotero. I’ve been using Zotpress on some non-Pressbooks WP-powered sites for a while and love it, but recently ran into some issues when I tried to combine it with the plugin which produces footnotes (I was inserting a shortcode inside of a shortcode, and the ‘parent’ shortcode didn’t know what to with it). If anyone else has done more with Zotpress or other citation management tools in Pressbooks, I’d love to hear more!


#2

Support threads where I discuss the problems I’m encountering in further detail: https://wordpress.org/support/topic/spinning-wheel-in-place-of-reference-for-shortcodes/ + https://wordpress.org/support/topic/shortcodes-within-shortcodes-2/. It doesn’t appear that Pressbooks’ native footnote tool (https://github.com/pressbooks/pressbooks/blob/13d352f7a3954de4a89d59615df9760a693ec108/assets/src/scripts/footnote.js) supports other do_shortcodes() calls currently. Could Zotpress’ shortcodes be added to the Pressbooks footnote tool easily, and would others be interested in something like this?


#3

Hi @SteelWagstaff, I don’t think we can realistically support nested shortcodes in our footnote shortcode. The reason for this is that the footnote content is wrapped in an inline tag and then positioned using the CSS Generated Content for Paged Media for Prince (PDF) output (this lets them appear at the bottom of each page rather than as chapter endnotes). The necessity of using an inline tag means footnotes can’t contain block elements like paragraphs and lists, so we have to do a lot of hacky stuff to get more complex footnotes to display properly (see also this topic). I expect if we enabled shortcode nesting for our footnotes shortcode we would fully break PDF outputs. Also, given the advent of Gutenberg, we are going to need to revisit our footnote methodology anyway…

All to say that this is probably not an easy integration to support. I think the best approach would be to clarify your use case (how do you want an integration with Zotero to work?) and see if there’s a better solution we can develop. I know we have some work to do to add Zotero-compatible metadata but I have yet to get a clear specification on how to format metadata for Zotero (see here).


#4

Thanks for the quick and detailed reply Ned. To clarify, I think there are two separate and distinct ways that I’d imagine Pressbooks interacting with Zotero (which could also be genericized to apply to other citation managers).

First, I think there’d be broad interest and utility in making sure that Pressbooks’ metadata conformed to the ingestion expectations of Zotero and other citation managers—what Zotero refers to as its ‘translators.’ This would ensure that Pressbooks published titles could be more reliably added to someone’s reference library in the way that books in library catalogues or amazon or articles from research databases can be. That’s the issue that is described here and here on other discourse forums.

The second way that I could see these bibliographic tools being integrated into Pressbooks is actually a separate issue, and the one I’m interested in exploring in this thread. The idea of the bibliographic management tool is to function as a big library of metadata for objects a researcher is interested in, and to make it easy for that researcher to drop references from that library in their writing/publishing flow in an automated way. Instead of manually writing out a parenthetical citation for some article I’m citing in APA format for one publication and then manually changing it to MLA for another publication, I just insert a reference from my citation management tool and it handles the formatting, keeps track of all the references I’ve inserted into a page or article or chapter or book and then produces a nicely formatted bibliography for me as well. All I need to do is tell it to switch globally from one citation style to another and viola—magic happens. This is a huge time saver for research-based writing and publication, and the first integrations for Zotero, Mendeley, Endnote, and Refworks were with word processors, for obvious reasons. In my view, Zotero is the best of the bunch (because OSS!). Zotpress is the plugin that allows writers to access their reference library and insert references and create bibliographies in WordPress (using shortcodes) in an analogous way to what they might be used to doing with Zotero and Microsoft Word or Libre Office, for example. Adding support for Zotpress in Pressbooks would essentially mean figuring out a way for academic writers to use this tool to better automate their citation and bibliographic creation processes. Does that provide a good, helpful overview of the use cases?


#5

Thanks, Steel. Definitely it does. To your two points:

  1. Metadata output is the “low-hanging fruit”, relatively speaking. Frustratingly, Zotero does not support Schema.org with Bibliographic extension, which is present in our webbooks already. I would be open to implementing whatever the most straightforward additional metadata schema is that would support this integration, but I have limited research bandwidth at present so I would be grateful to community input in terms of a clear specification.
  2. I think at this point we would want any integration to be future-proof in terms of Gutenberg. I don’t know what Zotpress’ roadmap is but it would be worth contacting the plugin developer to inquire? I see things like this and think there could be some really cool possibilities for loading in citations from the Zotero API:

Long story short, given that we are a dev team of two and half and are looking at the significant task of building Gutenberg support into Pressbooks within the next 6-9 months, I want to make sure that we don’t build ourselves into supporting something that will not work through that transition.


#6

Ned–just got a reply from Katie. She wrote:

To be honest, I’m not very familiar with Gutenberg, and my time for Zotpress is really limited, so I don’t have much bandwidth for making plans. But if there’s a simple and easy-to-integrate solution, I’m happy to consider it or accept code submissions.