Tinderbox Training Video 57 - Working with Tinderbox and Zotero

Tinderbox Training Video - Working with Tinderbox and Zotero

Level Intermediate
Published Date 8/20/21
Revision 1
Revision Note
Acknowledgements Bernardo Vasconcelos @Bernard-0
Type How To
Tags 4Cs of Knowledge Management and Exchange, Action Code, BetterBibTex, CSL4CKMEl, Pandox, Tinderbox, Zotero, aTbRef
Video Length 13:29
Video URL Tinderbox Lesson - Working with Tinderbox & Zotero - YouTube
Example File TBX L - Working with Tinderbox and Zotero.tbx (189.1 KB) Zotero RIS-citekey.js.zip (33.7 KB)
TBX Version 9.0
Instructor Michael Becker

In this Tinderbox lesson, I provide a high-level overview of my workflow and how I use Tinderbox and Zotero (https://www.zotero.org/), an online reference manager. I show how to add items to your Zotero library. I demonstrate how to use the Zotero RIS export translator and pull references into Tinderbox. I explain the RIS file format and discuss how Tinderbox parses the file. Finally, I provide an overview of how I’ve modified the built-in Tinderbox Reference prototype. I give a quick overview of the $Edict I’ve written. I show have I’ve added a plug-in to Zotero, BetterBibTex (Better BibTeX for Zotero :: Better BibTeX for Zotero), which helps me add a citation key to me references. I then demonstrate how I use this cite key, in combination with Pandoc (https://pandoc.org/) and a few other automatically steps I’ll explain in a future video to dynamically pull my styled references from Zotero and render them in Tinderbox to any style (e.g. APP, Chicago, etc.). I also am able to have the references inserted and properly formatted (again, this is an advanced step for a future video).

Table of Contents:
00:00 - Introduction
00:16 - Introducing Zotero
00:37 - Adding a reference to my Zotero library
03:10 - Pulling references into Tinderbox
05:46 - Example of my workflow
06:13 - Review of modified reference prototype
06:34 - A review of my action code
07:28 - Introduce cite key and BetterBibTex
08:36 - Importing a reference
09:32 - Ex. using Pandoc and citepoc
13:15 - Wrap-up and thank you

Here is the $Edict I use to parse my BetterBibTex enhanced RIS file.

if($CitationKey==""&$ReferenceRIS!=""){$CitationKey="@"+$ReferenceRIS.following("LB - ");};if($CitationKey!=""){$Name=$CitationKey};if($ItemType==""&$ReferenceRIS!=""){$ItemType=$ReferenceRIS.following("TY - ");};$Tags=$Tags+$ReferenceRIS.following("KW - ");$ZoteroURI=$ReferenceRIS.following("LC - ");$Name=$CitationKey;$Text="Abstract: "+$Abstract;$Text=$Text+"\n"+"\n"+"Q: How does this answers my research question?Q: What’s the Author’s question?Q: What’s the Author’s answer to their question?Q: Are there additional helpful details?"+;$DatePublished=$ReferenceRIS.following("DA - ");$DateAccessed=$ReferenceRIS.following("Y2 - ");$PublicationYear=$ReferenceRIS.following("PY - ");$Tags=$Tags+$ReferenceRIS.following("KW - ");

Zotero RIS with CItekey translator
The Zotero RIS with Citekey translator needs to go in your Zotero translator directory. For example, the path to mine is ~/Zotero/translators/. On macOS yours should be the same.

Note of gratitude: Here is a big thanks to @Bernard-0 (a TBX community member) who set me on the right path and helped me figure our Pandoc and the automagical process.

Get the complete list of Tinderbox training videos here: Mastering Tinderbox: Training Videos (Complete List).


Hi Michael,
great tutorial again! Thank you very much for it.
The basic idea works with Bookends (replacing Zotero as reference manager) too. Bookends supports the RIS format too. Some RIS Tags are unknown to me (LB, LC or DA) but this doesn’t affect the idea behind your approach. With Bookends $ReferenceRIS.following("T1 - ") would be the value I use for $Name. And how about a “\n” after each of your questions? But those minor issues don’t touch your nice concept.
I’m still trying to fix my personal “Zettelkasten” workflow and I don’t see the reason why I should copy a reference from Bookends into Tinderbox. I copy just the citation ({Niehaus, 2009, #195239}) and so if I export my Zettel at a later time and work on my article in Scrivener, everything is there with this little reference?! If I manage the reference in Tinderbox I would need a much more complex $Edict. I need to parse the different types of the reference. For example I need Y2 only if I accessed the reference online. This is no problem if I keep the reference in Bookends and move the citation string over to Tinderbox.
Did I miss something important here?
Thanks a lot for the effort you put into your tutorials - they helped a lot working with Tinderbox!
Thx and regards, Detlef

1 Like

I don’t think it’s necessary to copy every citation to Tinderbox — at least, not for everyone.

One place where this might help is the situation where you’re examining a source and, as you read the source, are adding Tinderbox notes on various issues that note suggests, and also connecting the source to other pertinent sources. If you’re doing that, you might well want the full reference in to be handy in Tinderbox.

Another case would be the situation where, when you come back to this next year, you’re going to immediately recognize what you meant by “Pauline Kael, Trash, Art, and the Movies”, where {Kael 1969c} could be nearly anything.


I completely agree. You can either pull the entire reference in or you just brig in the CitationKey as an attribute. It really just depends on what you’re trying to accomplish and what works for you.

How does Zotero compare to Devonthink? Aren’t they the same or similar?
Does one work better than the other with Tinderbox?

Zotero and DEVONThink are apps built for entirely different purposes.

Zotero is a reference manager, it helps you manage your citations and if integrated with other apps in your workflow to automatically pull and insert your citations in your work. It does have limited file storage and the new version is introducing a PDF viewer and highlighter.

DEVONThink is a powerful document repository tool with deep AI and machine learning capabilities for document discovery and management. While you can add citation keys to your files in DEVONThink, as it stands now DEVONThink is not going to help you automatically format and manage your citations.

The beauty of Tinderbox is that you can use with for what it does best, 4Cs of knowledge management, and use other speciality apps for what they do best.

Hi @satikusala,

Where did you get the “Zotero RIS with Citekey translator” so that it is even possible to drag and drop a Zotero item and get RIS output that includes the citekey?

Thank you,

Ah…wonderful question… The answers. Hours and hours of head scratching. I then ultimately had to figure out how to modify the translator myself to make it work (more hours). Later, I modified it to also add a ZoteroURI to the feed. I then created an action code that would parse the $RISReference attribute and extract the values into the attribute I created to hold them (more hours of head-scratching). In the end, got it all to work. Note, in the end it was 2 line change to the Zotero translator, and the action code below. So, not a lot of code was needed, rather it was getting familiar with the processes and strategy around using the tools.

RIS file is above with the demo TBX file. I’ve also included a link below.

Here is my action code wrapped in a function (you can take the code without the function wrapper and put it in a rule, edict or stamp, or put it in a function if you have 9.1). NOTE: you’ll want to modify the code or create the missing attributes in you file.

function fReferenceParse(){

	$CitationKey="@"+$ReferenceRIS.following("LB  - ");
$Abstract=$ReferenceRIS.following("AB  - ");
$URL=$ReferenceRIS.following("UR  - ");
$ItemType=$ReferenceRIS.following("TY  - ");
$Term+=$ReferenceRIS.following("KW  - ");
$ZoteroURI=$ReferenceRIS.following("LC  - ");
$DT3URL=$ReferenceRIS.following("LD  - DT3 - ");
$Text="Abstract: "+$Abstract;
$Text+="\n\n"+"Q: How does this answers my research question?\n";
$Text+="Q: What’s the Author’s question?\n";
$Text+="Q: What’s the Author’s answer to their question?\n";
$Text+="Q: Are there additional helpful details?";
$PublicationYear=$ReferenceRIS.following("PY  - ");
$DatePublished=$ReferenceRIS.following("DA  - ");
//Parse Date Accessed...
var vInput=$ReferenceRIS.following("Y2  - ");
var:list vDate=vInput.split("/");
var vYear=vDate.at(o).year;
var vMonth=vDate.at(1);
var vDay=vDate.at(2);
var:list vTime=vDate.at(3).split(":");
var vHour=vTime.at(0)-8;
var vMin=vTime.at(1);
var vSec=vTime.at(2);
$DateAccessed=date(vYear, vMonth, vDay, vHour, vMin, vSec);
//I user $URL not $ReferneceURL for everything. 
//Now that text is parsed can clear RIS.
//Disable rule to reduce processing load in the future. 


You need to install BetterBid Tex.

Here is the Zotero Translator:
RIS-citekey.zip (67.3 KB)

You need to stick it/them in the Zotero translator’s folder, e.g.

Please let me know if you have any questions.

1 Like

Thanks, Michael, for being so helpful, and in such a practical way! This action code will excite many on the forum, I would expect.

1 Like

Thanks @satikusala, I just flat out missed your original download link, but it is nice to know that you had to create it yourself and that I wasn’t just missing something!

Also, I haven’t tried functions yet, so this will be nice to try.

Take care,

1 Like

I most certainly did not create the translator. It is thousands of lines of code and was created by a Zotero contributor. I simple figure out how to add (with help) the two lines of code that I needed to add.

BTW, I just updated my reference parse action code so that the ItemType gets more reliably captured. See above.

Important update to my script above. Since I have $CitationKey configured as a set, in order for the $DisplayExpressionCache to be set I must first format it as a string, otherwise Tinderbox will convert the expression to a semi-colon separated list.