Help bringing highlights from Zotero to Obsidian / how to hide ugly markdown chunks in Annotator in edit mode?

I’m new in Obsidian (and already obsessed with it, it’s great!) and I’ve been having some trouble getting my PDF highlights into my notes.

I use Zotero to store my PDFs and like to make highlights and annotations on my tablet. I have Zoo for Zotero on Android, and my Obsidian vault is in my OneDrive. I tried using Citations to add highlights from my Zotero pdfs to obsidian, but faced a few issues:

1 - When using Xodo or the OneDrive annotator, highlights were duplicated once imported into Obsidian. I made sure to toggle off the “highlight as annotations” option, still no good.

2- using any PDF annotator requires me to download the pdfs to my tablet, which I find a bit cumbersome as I have to delete them one by one after.

The solution seemed to come with the Annotator plugin - I could just use Zotfile to sync my PDFs to a Zotero folder on my vault, and then just annotate directly in obsidian, bring highlights and notes in my neat note, and perfect.

The main issue with that is I get those very ugly markdown chunks while on edit mode:

I almost never use view mode and prefer to have everything nice and clear on my edit mode.

So a few questions:

  1. Is it impossible to have a smooth workflow with only zotero, obsidian and onedrive, no downloading into the tablet?
  2. Is there a way to hide that ugly chunk of markdown, or have it render more nicely in edit mode?
  3. Anyone knows how I can prevent this double highlighting?

Any other advice with the workflow is more than welcome! Thanks a lot in advance everyone!

I maybe have a solution. Use it for the past half a year, and find increasingly attractive.

A member of my community explained it in details. I’ve translated it for you. If you have any questions — ask. Original post in Russian is in here: Как настроить Zotero Integration Plugin раз и навсегда - Zotero | Mendeley | Библиография - Zettelkasten | Умные заметки | Базы знаний


"Despite the excellent work of Readwise, one cannot diminish the reliability and convenience of Zotero (and it’s bad :grinning:). So, let’s figure out how to set it up in conjunction with Obsidian.

But before that, I’ll tell you what the final result will be from the performed manipulations:
Any annotations will be exported to Obsidian in a convenient and preset format for you (using a template).
Annotations, regardless of where you made them, on the phone or on a PC, will be synchronized and subsequently exported to Obsidian.
Working links to highlighted places in Zotero. Both on the phone and on the PC.
From Zotero for iOS, you’ll get a pretty good reader.

  1. Preparing Zotero

First of all, we need to install the Better BibTeX plugin for Zotero.
Go to the mentioned GitHub repository 35 and download the first file with the .xpi extension.

Then open Zotero and in the upper left corner click on Tools, and then on Add-ons. An Extensions window will open where you need to drag the file downloaded from the link above. Restart, and you’re done. And you won’t need any Mdnotes.

  1. Preparing Obsidian

In Obsidian, download the Zotero Integration plugin and go to its options.
Next, in the photo, I will indicate numbering for your convenience."

Note: The “:grinning:” is a placeholder for a grinning emoji, and “GitHub repository 35” refers to a specific repository which is not provided in the text.

The photo is here :slight_smile:

Download PDF Utility by clicking the button provided to us.

In the ‘Note Import Location’ section, specify where the annotations will be exported. Point it to your Obsidian storage and the folder you need.

Turn on ‘Enable Annotation Concatenation’. This will allow you to update the note with annotations if, for example, you made a couple more highlights in your PDF and imported it again, then the existing file will be overwritten, supplemented with new notes.
Important! Therefore, if you exported notes to Obsidian and then added something to that note, and then made notes in Zotero again and re-exported to Obsidian, the file will be overwritten and YOUR additions will disappear. Keep that in mind.

Solution: you can change the name of the file with the exported notes, and then the subsequent export will simply create the same file but updated, and then you will transfer what you wrote from the old file to the new one.

  1. Preparing the Template

Now, before we continue, let’s deal with the template according to which your notes will be exported.

Apparently, you can’t upload a file here, so I’ll attach the template content below under a spoiler.

Create a note in the template folder in your storage and paste the following into it:"

Note: The translation stops where the user’s text cuts off, so the content to be pasted into the template is not provided.

Here’s the translated text:

"Insert this:


---
title: "{{title}}"
year: {{date | format("YYYY")}}
tags: books 
authors: {{authors}}{{directors}}
---

author:: {{authors}}
read start:
read end:
tags:: #source/zotero
URL: {{url}}
Zotero Link: {{pdfZoteroLink}}

### The Book in 3 Sentences

### How the Book Changed Me

### Key Concepts & Evergreens

## Highlights
{% for annotation in annotations -%} 
    {%- if annotation.annotatedText -%} 
    {{annotation.annotatedText}}”{% if annotation.color %} | **{{annotation.colorCategory}} {{annotation.type | capitalize}}** {% else %} {{annotation.type | capitalize}} {% endif %} | [Page {{annotation.page}}](zotero://open-pdf/library/items/{{annotation.attachment.itemKey}}?page={{annotation.page}}&annotation={{annotation.id}})
    {%- endif %}
    {%- if annotation.imageRelativePath -%}
    ![[{{annotation.imageRelativePath}}]] [View on page {{annotation.page}}](zotero://open-pdf/library/items/{{annotation.attachment.itemKey}}?page={{annotation.page}}) {%- endif %}
{% if annotation.comment %} 
> {{annotation.comment}}

{% endif %} 
{% endfor -%}

As you’ve understood, everything that ARE NOT formulas (under the Highlights header) you can modify as you like. Metadata, when you read, links, etc., change it as you wish for your needs. I use the template from a forum/Rustam.
By the way, those who know these conditionals can modify further.

The third last condition > {{annotation.comment}} is the format in which your notes on highlights will be displayed. This > makes YOUR notes on highlights a quote, that is, a blockquote. You can remove it at your discretion. :man_shrugging:

The final stretch.

Now that the template is ready, go back to the Zotero Integration plugin options and in the Import Formats section do the following:

Attached a photo.
Add Import Format
Give it any name.
Specify the path where the note with annotations will be created in storage. {{title}} means what the name of your note will be according to the Title of the file in Zotero. You can choose {{citekey}}, individually.
Path where photo highlights will be saved. Suppose you highlighted an area in Zotero. This area (photo) when imported to Obsidian will be saved in the specified folder.
UPD: At the end of Image output path, add a slash / to {{citekey}}, as indicated by Obsidian itself.
Most importantly, the path to your template, which we have already created.
Done. Now go to Zotero (and keep it open or minimized), then to Obsidian and try to launch the Zotero Pop-up window through the command palette in Obsidian.

Ctrl + P (default), then enter Zotero, and your created Import Format appears.
Spoiler.
A Zotero pop-up window appears where you enter the name of the article/book, previously annotated.
Spoiler.
Select, confirm.

Done, in about 2 seconds a note appears in your folder. :cowboy_hat_face:

The final result will look like this:

At the time of writing, I added a couple more highlights through the iPhone, and in a few seconds, they appeared in Zotero on the PC. Then I re-exported the highlights, and everything updated smoothly in the note that was created earlier. Links are clickable and take you to the highlighted place BOTH on the phone AND on the PC."

2 Likes

oh my god thanks a lot for all the detailed explanation!! Awesome community too :slight_smile:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.