Zotero integrations

As with most UX matters, I think taking a second to formulate a couple personas might be beneficial here.

Persona 1: Taylor

  • Age: 26
  • Profession: Software engineer.
  • Main goal: A place to record interesting thoughts to help explore curiosities and remember ideas for apps.
  • Likes: Using things in the way they are intended to be used.
  • Dislikes: Breaking our going outside of established standards.
  • Confused by: Why anybody would want any WYSIWYG functionality in apps that aren’t built to be WYSIWYG from top to bottom.
  • Quote: “Plaintext files are elegant because they’re strictly plaintext. If someone wants to do more than record and display plaintext, then they shouldn’t use a plaintext editor.”

Persona 2: Alex

  • Age: 37
  • Profession: Anthropology PhD candidate.
  • Main goal: A better way of organizing his knowledge to help write research papers.
  • Likes: Feeling like his tools are serving him instead of the other way around
  • Dislikes: When software gets in the way – especially when he’s told that the obstacle is a feature instead of a bug.
  • Confused by: Any code more complicated than the most basic parts of markdown formatting (italic, bold, headers, lists, and quotes).
  • Quote: “When the code helps me think, show the code. When it just makes things more opaque, hide the code. I just want to get across the finish line easily and efficiently.”

These are incredibly basic personas, but I think they’re enough to let us begin reasoning about what different kinds of users might want. Instead of saying vague things like “users will want to do X” (which makes the user into an elastic entity that stretches and bends to fit any ideas whatsoever), forcing ourselves to instead ask “What would Terry/Alex want?” will keep us focused on making sure that the way we are imagining features actually serves the goals of the users.

Anyway, I imagine that Terry and Alex would want different things here. Terry would probably want Obsidian to implement Zotero integration the same way that it’s done with Zettlr and Sublime Text. Meanwhile, Alex would probably rather it be done in the kind of live preview way that Typora renders everything, looking to the way that Zotero designed the plugins for MS Word, LibreOffice, and Google Docs for ideas about what a GUI control panel might look like.

I don’t think Terry is better than Alex or vice versa. They just have different goals and values. So, they want different things from Obsidian.

Perhaps there’s a way of approaching this that’ll let Terry and Alex both be happy. Maybe it’s as simple as having a preference toggle to switch between “Show the code in the editor” and “Render the output in the editor.” As an interaction designer, this is the solution that I’d recommend, but of course it depends on whether or not the programmers can figure out how to implement the idea.

Edit: If one of the Obsidian devs would like me to produce mockups of the solution I’m proposing (no, not just what the toggle would look like in the preferences; I mean mocking up what the functionality would actually look in both modes), then let me know. I care enough about this functionality that I’d be willing to put the time into doing this.

12 Likes
  1. These goals are not incompatible. The important points you are discussing @ SquareBottle are more general questions about how WYSIWYG from UX-point-view should be implemented, not specific to Zotero.

  2. I think Zotero plugin is quite low now on priority list of developers, the highest chance for getting it when someone will implement it after the API will be exposed.

  3. From the design objectives “Obsidian as Markdown editor” is quite unlikely we get something like Google Docs of MS Words. I want to have Obsidian with live markdown preview, but Google docs or MS Word Zotero implementation goes against plaintext philosophy - so clean LateX style citation with \cite{} or more markdown style @ (together with implemented citation picker) which could be rendered to actual citations/bibliography in WYSIWYG mode

  4. I agree that the most probable is a currently implemented solution about which @ SquareBottle write: >>having a preference toggle to switch between “Show the code in the editor” and “Render the output in the editor.”<<

4 Likes

So, is there any smooth way to cite using Zotero? Or now it is just better to use Zettlr for such purposes
Could someone please navigate me, since its seems pretty complicated for me as Mac user

I thought it was relatively easy to copy+paste citations from Zotero already into ant text app - from their manual:

“Zotero can also insert citations and bibliographies into any text field or program. Simply drag-and-drop items, use Quick Copy to send citations to the clipboard, or export them directly to a file.“

Is that not the case?

1 Like

+1 to this, would love to be able to autofill citekeys from a .bib file like you can in Zettlr. Hit @ and be able to auto complete your reference library

4 Likes

I also discovered the zotero-roam-export plugin a few weeks back and opened an issue about the markdown export. It didn’t look very promising, so I’ve since then spent some time writing a plugin for Zotero that works for my own workflow.

I only briefly used Zettlr, and so far I don’t see myself using Obsidian to write papers directly, so I don’t need the full citation powers that Zettlr offers (at least so far!). In my case, even pandoc has its limitations, which is why I end up writing the paper using LaTeX anyways. For me, Obsidian is useful to keep my (often private) notes, and relating ideas from what I’ve read or highlighted to some other idea that I’m working on, which is why I keep two different files for the same paper: one with my notes linking to the one with the information for Zotero (that way, if needed, I can fully rewrite the latter with a (newer) export, without losing my notes in the former).

The plugin I wrote is based on the zotero-roam-export plugin and in short, my plugin does the following:

  • Extracts metadata from the item and highlights from the PDF using Zotfile (similar to zotero-roam-export ) and saves it in a markdown file. I get one file for each item selected. I can save directly in my vault, and I can (optionally) choose to use cite keys (using Better Bibtex) as file names e.g. doe2020aaaa-zotero.md
  • Creates a file for my own notes based on the naming above (minus the suffix) doe2020aaaa.md , and transcludes the metadata, links to the highlights/annotations, and adds a header for my notes. This is the one I use to link when I refer to the whole paper and as a sort of table of contents around specific ideas of that paper, i.e. I can “cite” the paper as [[doe2020aaaa]] .
  • Adds all those files as linked attachments to the Zotero item, so that if I double click the markdown note is opened with the default markdown app from Zotero (if eventually the URL protocol is implemented, then the link can easily be switched to include obsidian:// ). This basically lets me go from one app to the other. In Obsidian, in the doe2020aaaa file I can write my own notes, and in preview mode I can also click on a link in that opens Zotero and selects the right item. In Zotero I can double click to edit my notes, or open it in Obsidian.

If this sounds like it might be useful to someone here, I can share the Zotero extension.
Disclaimer: This is my first time coding anything Javascript or Zotero-related and I can’t really guarantee that it will work well or efficiently. I learned a lot and reused some parts of the zotero-roam-export in order to get the plugin working for myself (so far so good).

Finally, I have a question for those that use Zettlr or want a Zettlr-like way to cite within Obsidian. What does your (expected) workflow look like? Do you use Zettlr/Obsidian to create PDFs and render citations? How would the citation in Obsidian look like? Do/Would you also create a note for the paper itself? And if so, when do you “cite” and when do you link to the note, i.e. [See @doe2020aaaa] vs See [[doe2020aaaa]] ?

Edit: Here’s the plugin https://github.com/argenos/zotero-mdnotes

The standalone post with my workflow (slightly updated since) is here: Zotero plugin to export metadata and notes to markdown

14 Likes

Wonderful job! Thanks a lot!

Zettlr has integration with auto-exported library file from Zotero. Basically, it offers suggestions once you start typing [@ in the editor. It’s convenient as a substitution for MS Word plugin, but the functionality is quite basic.

2 Likes

Hi, thanks for your sharing. I have downloaded your plugin and it works well.
How can you import these files into the Obsidian? I can drag the file into a new note in Obsidian and make it as an attachment. Is this the right way?

If you go to Tools > Mdnotes preferences you can set the path to your vault (or a folder within it) so that it’s the starting folder whenever you export anything. That’s just to set the starting path, so you don’t have to choose it manually each time, but in the end the notes will be exported on whichever path you choose.

1 Like

Great! It helps a lot.
Thanks for your prompt reply.

Wow ! really appreciate your work on hours of working for this zotero integration , ,i have installed them on Zotero and ,i have set the path folder where the obsidian vault folder for ZOTFILE ,BETTERBIBTEX and MDPREFRENCES.
I couldn’t comprehend beyond this ,for my capacity .
well i guess i am a bit thick skulled lol ,could there be any gif or some demonstration after this as an example file or folder ?(apologies if i am wasting your time ).

Do you mean something like this? Here is a small gif showing batch export as well.

After you’ve set your path, right click on the item you want to export (I added a small cheat sheet of what to select here). If you choose a path inside your vault during the export, you just need to go back to Obsidian and open the files there.

1 Like

Is it possible to adapt/reuse one of the plugins for Zettlr, Atom, Sublime? Adding bibliographical references is the only serious thing tha is currently missing.

Unfortunately, I have no idea. I think these are all different pieces of software so we’ll need to wait either until the guys at Obsidian implement it or they create an API / plugin interface so that other people can help with certain features’ implementation.

Meanwhile, there’s a universal Zotero picker for Windows, give it a go.

3 Likes

I am on Mac :slight_smile: , but thanks. I will keep copy/pasting bibtex codes.

Have you tried this method with Automator?

1 Like

That is pretty cool. I keep forgetting about AppleScript. Thanks.

1 Like

Mobius1,

I agree with you because this works for me. But won’t other users have to install LaTeX too? The typical Word user may not want or need this.

Then again, if you’re using .md, you’re already rejecting proprietary solutions.

I’m surprised nobody has mentioned the rbbt add-in to RStudio. It’s designed for RStudio’s markdown files, so its functionality is extremely close to what we’re discussing.

Rbbt uses the same citation dialog as is used for Word, LibreOffice, and Google Docs. And the add-in easily attaches the dialog to a hot key.

I’ve never used Zettlr, so I’m not sure how its @ mechanism works, but unless @ brings up a search box that pares down choices as one writes, I would find it a major PITA.

I also subscribe to the software design philosophy of doing one thing well. Rbbt facilitates insertion citations in the standard format used by BibTeX, BibLaTeX, and pandoc-citeproc from one or more *.bib files specified in the yaml. That’s it.

All the stuff about creating a reference list in Obsidian, displaying the reference list in real time, even writing papers in Obsidian, etc. moves away from the one-thing-well philosophy to a bloated-Swiss-Army-Knife philosophy. If Obsidian needs to move in this direction, and obviously I’m skeptical of this, then such things should be separate from a Zotero interface.

Similarly, people want Obsidian to be able to access the extractions created by the Zotero ZotFile plugin’s ability to extract annotations from pdf files. To me it makes more sense to create another Zotero plugin, arg’s mdnotes is on the right track, that copies ZotFile’s extractions as .md files to a specified folder, with naming options similar to how the BibTex and BibLaTeX plugins let the user give a template for citation text.

A more extensive plugin might also offer a choice of target formats for the extraction (.md, .tex, html, etc.).

Also working on the Zotero side, one might add an option to dovetail mdnotes with BibTeX/BibLaTeX, so that when the contents of a Zotero collection changes, not only does the specified .bib file get updated automatically, but so too do extractions in a separately specified folder.

To me the most formidable difficulty arises from citations doubling as [[WikiLinks]]. Their respective markdowns are distinct. At one time Fletcher Penny’s MultiMarkdown had both citations and WikiLinks, but he depreciated the WikiLinks because “the feature was more trouble than it was worth.” Obviously, something like WikiLinks is an essential feature for Obsidian, although I prefer MultiMarkdown’s richer feature set. Maybe changing from [[link]] to {{link}} would be a sufficient modification to allow not only citations and WikiLinks to coexist in Obsidian, but also MultiMarkdown instead of Markdown.

In general, things that are Zotero-centric should be implemented in Zotero and be as independent of Obsidian as possible, and things that are Obsidian-centric should be implemented in Obsidian and be as Zotero-independent as possible.

4 Likes

Zettlr does offer auto-completion once you type @ (at least from what I remember). I don’t know how hard it is to bring that to Obsidian, but it probably will come as a plugin. Format-wise, following the Zettlr example, pandoc should take care of the inclusion and formatting of the references.

I agree that there are at least two workflows (or parts of it) that might have to co-exist.

Citation is probably interesting for those looking to publish directly from Obsidian. Using @citekey (following pandoc’s) format is probably wise.

Equally, just keeping notes about the references is a matter of having a way to export and link to the reference manager (as I do now with Zotero using the mdnotes plugin or even manually by simply naming your notes after unique cite keys).

As you mention, the “tricky” part comes from the coexistence of these two aspects, particularly if what we want is both to cite and link with the same format.

  • Citing with pandoc is usually done with [See @citekey], but wouldn’t produce a node in the graph, or a clickable note.
  • In my opinion, citation with backlinks, e.g. using [[@citekey]], doesn’t make much sense since most people would expect the preview/export to be the full citation, not necessarily the note about the reference. Maybe it can be used like this if we add options in the export dialogues.

If we don’t care as much about having the same format, and care just about the associations, those are just dependent on detecting the links, i.e. if it’s possible to associate notes that use the @citekey, and count them as links, then the ability to explicitly reference vs link might work well for most, but could make autocompletion confusing and complicated.

2 Likes