Page 1 of 1

Bookends and RStudio

Posted: Sun Nov 15, 2020 12:48 pm
by botanyman
Hi,

RStudio is a popular development environment for the R language. The upcoming version 1.4 of RStudio will offer the possibility to add citations to a Markdown document using Zotero. See https://blog.rstudio.com/2020/11/09/rst ... citations/

What are the options to use Bookends instead of Zotero?

Thanks for your insights.

Re: Bookends and RStudio

Posted: Sun Nov 15, 2020 10:41 pm
by iandol
RStudio uses Pandoc, and several of do us use Bookends + Pandoc; set up Bookends to output temporary Pandoc style citations with ease:

https://www.rousette.org.uk/archives/bo ... nd-pandoc/

This allows you a very nice writing workflow, using the floating citation window (or Alfred) to search and insert [@myref] temporary citations.

The biggest pain point of this workflow is keeping your BibTeX synced to your Bookends Library. Pandoc reads BibTeX/JSON reference databases, and so you must create an up-to-date copy from your Bookends source. You can manually export your Bookends database to BibTeX whenever you are going to compile a manuscript. There is Applescript to "automate" this too, but no really elegant solution to date.

There is a super-elegant potential solution, and this is based on what a Zotero Pandoc plugin does called ZoTxt:

https://github.com/odkr/pandoc-zotxt.lua

This Pandoc filter searches and retrieves the references "live" from Zotero, and therefore does not require any BibTeX copy of your database. Bookends has an Applescript interface and so we could build an equivalent magic filter for Bookends. I just don't have any free time to do this at the moment, but it would be a really nice improvement in workflow for Pandoc/RStudio/LaTeX users...