Zotero best practices

You can “Add Note Item from Annotations” in the right panel where it creates a note - as Zotfile does - which mdnotes could then convert. The problem is that the notes don’t have any formatting (yet?) - so no colors or hyperlinks are created.

However, it does create a citation with page number for each annotation, so I wonder if mdnotes could somehow create hyperlinks by finding the citation and appending " “zotero://…” to it?

The database-based annotations really does offer a lot of benefits over standard embedded highlights - you can add zotero tags to any annotation for searching, cross-referencing etc…

1 Like

The zotero:// links come from Zotfile’s PDF extraction and mdnotes just translates the HTML notes into Markdown. I’m afraid that for us to get those links, Zotero has to add them to their annotations when they are translated as notes, or they should be available as part of the annotation data structure, so they can be built on export when mdnotes supports this.

1 Like

This link is not working. I’m using this alternative which is quite easy.

1 Like

Thank you pointing it out, I have updated the link.

hey, and thank you for your effort
I am using your translator but I am getting the output in this format when I drag and drop:
.(file:\\C:\mypdf.pdf).
i can’t figure out why, I looked into the script and the format there seams right. I don’t know what is wrong , may be there is an overlap with BibTex or something. Does anyone have the same problem.

In terms of getting the color names to show up in the exported annotation (ala @PedroSilva ) , you can modify the categories in extensions.zotfile.pdfExtraction.colorCategories and remove the hex code and replace it with the color name. Then when using @color_categories in extensions.zotfile.pdfExtraction.formatAnnotationHighlight you will get the name instead of the hex code

Original:
{“Black”: “#000000”, “White”: “#FFFFFF”, “Gray”: “#808080”, “Red”: “#FF0000”, “Orange”: “#FFA500”, “Yellow”: “#FFFF00”, “Green”: “#00FF00”, “Cyan”: “#00FFFF”, “Blue”: “#0000FF”, “Magenta”: “#FF00FF”}

Modified:
{“Black”: “Black”, “White”: “White”, “Gray”: “Gray”, “Red”: “Red”, “Orange”: “Orange”, “Yellow”: “Yellow”, “Green”: “Green”, “Cyan”: “Cyan”, “Blue”: “Blue”, “Magenta”: “Magenta”}

If you want the highlighted color to show up in Obsidian as well you could use the 8 x 8 Highlight Colors CSS from @Steve_yang.

{“Black”: “#h/black”, “White”: “#h/white”, “Gray”: “#h/gray”, “Red”: “#h/red”, “Orange”: “#h/orange”, “Yellow”: “#h/yellow”, “Green”: “#h/green”, “Cyan”: “#h/cyan”, “Blue”: “#h/blue”, “Magenta”: “#h/magenta”}

Then your extensions.zotfile.pdfExtraction.formatAnnotationHighlight value would need to include the highlighting syntax that Obsidian uses:

<p>%(color_category)==<span style=“background-color:%(color);”>"%(content)"</span>== (%(cite))</p>

image

2 Likes

I made color meaningful

{“Purple”: "[[Integration]]: ", “Red”: "[[Important]]: ", “Orange”: "[[Example]]: ", “Yellow”: "[[CentralIdea]]: ", “Green”: "[[Example]]: ", “Cyan”: "[[Citation]]: ", “Magenta”: "[[Figure]]: ", “Grey”: “[[Other]]”}

or

{“Black”: “”, “White”: “”, “Gray”: “Argument”, “Red”: “#Disagreement:”, “Orange”: “#Agreement”, “Yellow”: “#CentralIdea”, “Green”: “Example”, “Cyan”: “#Data”, “Blue”: “#Theory:”, “Magenta”: “#Citations”}

together with some tweaks I will get html code with color values in my output file which will display the color in view mode

#CentralIdea  <span style="background-color: rgba(153,255,153,.25);"><strong>(Green)</strong> - From fidgeting to expeditions, natural body movements manifest over a very broad range of spatiotemporal scales. The complexity of such movements is often organized with fractal structure, scale-free fluctuations spanning multiple spatiotemporal orders of magnitude (1-4). Such behavioral complexity may be beneficial for foraging (3-6), visual search (4), decision making based on priority (7, 8), flexible switching of behavior (9), and perhaps more. Similarly, fluctuations of ongoing neural activity in cerebral cortex can exhibit fractal, scale-free fluctuations like the spatiotemporal cascades sometimes referred to as 'neuronal avalanches' (10-18) and long-range temporal correlations (19-21).</span> ([Jones et al 2021:2](zotero://open-pdf/library/items/JAAPML5T?page=2))
4 Likes

Thanks for this! As @icebear and @yongqi have asked before, is there anyway to make a shortcut for this? So instead of drag and drop, I can copy-paste with a keyboard shortcut

Edit: My bad, I realize this can be achieved with cmd-shift-c, the default Quick Copy shortcut.
This will be really useful for quickly adding a citation when I’m not looking to create a bibliography

Hi,

Just a nice simple one - is it possible to modify this translator so that it links to the URL (web version of Zotero) rather than the desktop?
The resulting output would be like the “Item URI” translator.

Thank you!!

Jim

1 Like

This is so far the best review of some useful setups about Zotfile. I have one issue that remained, which is about extracting colored annotations. I don’t really understand how to use %(color_category) instead of %(color).

I did see on Zotfile’s website about the explanation: The wildcard %(color) is replaced by the annotation color (you can also use %(color_category) for the color category—reddish is red etc). So when I use%(color), I did see text highlighted with the specified color under extensions.zotfile.pdfExtraction.colorCategories. But how to set %(color_category). I expect to see for example, (Yellow-Conclusion).

1 Like

@Ditto these two settings are a bit confusing (I always manage it after a bit of trial and error). Maybe the community talk portion dealing with Zotfile helps a bit? https://youtu.be/LaEt9cqkj3I

1 Like

it looks very interesting. do you having more detailed info on what it is? (i couldn’t find any on the website)

for me having may bookmarks in browser, my books in zotero and my notes in obsidian is annoying, not mentioning other files that i keep in folders

i messed with it some weeks ago and it is not changeable. I wanted to add new categories to it (as it doesn’t cover all the colors adobe reader supports) and I couldn’t change them at all. Documentation on it is poor

It’s not changeable on the title (from what I recall), but it should work on your note content.

yes that is doable, but the setting for that didn’t make sense to me. I can recall from top of my head now but I remember there was some weird problems

Id be really interested. My main workflow involves PDF/Webpages → Zotero organiization + hypothes.is annotation → Obsidian → Anki.

I love obsidian for the connectivity and visualization.
Its really clunky. Can protolyst do all this?

I’m searching for a way to generate a modified file link based on the one that’s automatically created at the end of each Zotfile extracted annotation. This link, however, would replace the current link to the pdf or annotation with a more general link to the reference, as such. In other words, is there a way on either the Zotero or Obsidian side to generate such a link?

Currently, I copy and paste into Obsidian note the extracted annotation via the following link:
([Schulman 2016:12](zotero://open-pdf/library/items/NKJNCHWB?page=12))
Preview mode result:
(Schulman 2016:12)

What I’m trying to do is generate a zotero link that I can copy paste into zotero like this:
([Schulman 2016](zotero://select/library/items/))
Preview: (Schulman 2016)

Using Zutilo use the “copy select item links” command and it generates part of the link to I’m looking for:
zotero://select/library/items/NP74DGWF

Unfortunately, I’m too inexperienced to know how to use Obsidian (or Zotero) to automatically generate a reference link in Obsidian, e.g., (Schulman 2016)

Thanks in advance for any help you might be able to offer. I’m so grateful for all your work and the collaborative spirit of this forum.

You could try @silent 's plugin here: Zotero best practices - #72 by silent

Consider using the Citations plugin as well.

I think indeed the Zotero translator by @silent does this. I can’t remember if the readme on his repo explains how to install it, but I imagine it does.

I’ll also paste this handy tip from the Discord server (credit to @WhiteNoise ):

you can even put this [Open in Zotero](zotero://select/items/@{{citekey}}) in the template to get a direct link to the item in zotero automatically

2 Likes

Zotero translator by @silent does the trick. Thanks to @allanelder and @argentum for quick reply.

Re workflow: my thought is that Obsidian Citations plugin is perfect for writing projects that ultimately require properly formatted of citations but–as people seem to appreciate in the case of Zotfile’s extract annotations–the kind of link generated by @silent Zotero translator can be particularly useful when reading and taking/making notes.

If I had posted my question here earlier I might have saved three days of failed efforts to reinvent the wheel. :blush:

1 Like