Zotero best practices

@Sans why wouldn’t you save the file directly to your vault? Maybe I’m missing a bit of context

You could also save the .md file directly in a folder in your vault (this is what I do)

@y.h I didn’t think about it. This is possibly the solution I was looking for!

@argentum I am just stupid :stuck_out_tongue:

In case anyone was looking for an (author, date) version of the plugin:

{
	"translatorID":"8dbf9b92-f796-4153-8f2e-ac6c157500dc",
	"translatorType":2,
	"label":"Markdown Item URI",
	"creator":"Silent",
	"target":"markdown",
	"minVersion":"2.0",
	"maxVersion":"",
	"priority":200,
	"inRepository":false,
	"lastUpdated":"2020-11-30"
	}
	 
	
	function doExport() {
		var item;
		while(item = Zotero.nextItem()) {
			var date = Zotero.Utilities.strToDate(item.date).year;

			var year = date && !isNaN(date) ? " " + date : (typeof item.date == 'undefined'?  "" : " " + item.date);
			var library_id = item.libraryID ? item.libraryID : "";
			var author_lastname = getValidAuthor(item);
			var title = item.title ? "*" + item.title + "*" : "";
			var key = item.key;
	
			Zotero.write(`[(${author_lastname},${year})](zotero://select/items/${library_id}_${key})`);
		}
	}

	function getValidAuthor(item){
		if(item.creators && item.creators[0] && item.creators[0].lastName){
			return item.creators[0].lastName + "";
		}else{
			return "";
		}

	}
1 Like

Hi @argentum , this figure is exactly what I want! Particularly, I’m interested in the block IDs, I mean adams1979-78f7565. Do they come from zotfile/mdnotes? Are they fixed after each extraction from pdf to md files? Could you point me to a reference where I find instructions on setting up zotfile for these IDs?

As @argentum commented on discord, this is a feature of mdnotes and it’s described at https://argentinaos.com/zotero-mdnotes/docs/next/advanced/hidden-prefs:

  • Setting extensions.mdnotes.obsidian.blocks to true will append a block ID to all non-header text blocks of exported Zotero notes, i.e. to each highlight and annotation extracted by Zotfile.
1 Like

In the latest beta version of Zotero and the new pdf-reader, you can export the annotations as md-files with working zotero-links. Just a head-up.

3 Likes

@Kullenej Great news! Thanks for letting us know. The function is excellent and works well – it’s a little tucked away but in the expected place. [Select Annotation ] > Right Click> Export Item >Select Markdown option.

Hi @Marc-A, could you tell me which version of zotero you use?

I just re-installed the latest zotero beta (5.0.97-beta.57+07df7d0de for Linux64) from dev builds. When I right-click on an annotation, unfortunately, it doesn’t display a markdown option. :frowning_face:

@janisc Using 5.0.97-beta58 on macOS. It looks like the function you’re missing was only added a few days ago. I’m sure it will be there in one of the next Linux updates.


1 Like

Just in case someone has missed it:
With the new “Markdown export of notes” functionality of Zotero beta-pdf reader, it is not necessary to import your notes through an MD-file… You can also drag-and-drop them into a note in Obsidian (pressing Shift key during drag-and-drop will keep links back to Zotero items and individual annotations).

10 Likes

can someone please explain it to me how this new system works step by step? I was using the old zotero zotfile mdnotes a while ago and then new pdf reader came and suddenly nothing was working and I waited for this workflow get fixed.
last i tried (which was like one or two weeks ago i think) i could not extract highlights added with new native zotero pdf reader via zotfile

The Zotero beta reader does not store annotations in the PDF so Zotfile can’t see the annotations. You can force Zotero to write the annotations to the PDF (with a PDF open in the Zotero viewer, select File->Store annotations in file), at which point you can no longer edit them in Zotero. However, other changes to the Zotero beta have occasionally broken mdnotes so even with annotations stored in the PDF you may have to find other workarounds.

I believe the author of mdnotes has stated they’ll likely update once the new Zotero is out of beta. Zotfile’s maintainer has said they don’t really have time to work on it, and given that some of the main features of Zotfile are basically superseded by the new Zotero, I wouldn’t bet my workflow on Zotfile for the long-term.

The latest version of the Zotero beta does extract annotations and can then export them to Markdown. It’s pretty cumbersome (you have to select “Add Item Note from Annotations” from the Item Notes sidebar and then right-click export the note from your library), but it’s something.

2 Likes

Correct! See here:

Some functionalities are still missing in the beta, but IMHO the most important advance now is that you can work with the Zotero integrated PDF reader. I liked it so much that now you can export annotations and your notes via drag-and-drop into a note in Obsidian (pressing the Shift key during drag-and-drop will keep links back to Zotero items and individual annotations in the PDF document).

The ability to export graphs is, by now, a great missing!

1 Like

I just released a minimal Zotero add-on that may be of interest. It lets you open existing Obsidian reading notes from the contextual menu of Zotero items.

Zotero-MarkDB-Connect searches your Obsidian Vault and adds a tag to the corresponding items in your Zotero database. You can color this tag so that Zotero items associated with Obsidian notes are visible at a glance.

It’s at an early stage of development so let me know if it doesn’t work for your use-case, if you find bugs, or if there are other features you’d like to see.

ZoteroObsidianCitationsMenu

E.g., in this image, the blue marker shows which items I’ve made Obsidian notes for

6 Likes

I love this! I love the synergy it creates between obsidian and Zotero :).
I will try it out this week, and I will let you know if I have any feedback to give.

1 Like

So, the zotero → edit pdf → extract to zotfile → paste to obsidian with zotero links is interesting, but I was disappointed to find that things break down if you try to then paste the obsdian doc into Word, since Word specifically uses the zotero plugin that has a ribbon button.

However, I think a simple macro would be usable for finding and converting these zotero links into the word bibliography.

For example: Note text I want to include (note on p.1)

The macro would find all zotero links, call the zotero word plugin for each instance, and add the relevant word citation using that plugin.

For example:

Note I want to paste into word (note on p.1)

  1. Run macro in word
  2. Macro finds each instance of a zotero :// link
  3. Parses the link, finds an attribute
  4. opens the zotero plugin dialogue, pastes in the attribute, hits enter
  5. Zotero plugin generates the dynamic word links and bibliography using its existing capabilities.

I know this probably seems like a roundabout way to convert obsidian notes with handy zotero links into working citations in a word doc, but it could be useful for the zotero workflow. As far as I can tell, the zotero plugin is the only way to add the zotero items to a word biblio, but it doesn’t use the links; but a simple macro wrapper could tie the two together.

No need to paste, you should be able to save in your vault directly.

The workflow isn’t really meant to help there. I recommend using pandoc to covert to word in that case (at least for markdown → Word).

Hey, I just tried out this plugin and I’m loving it so far. Enabling a two-way integration between Obsidian and Zotero is fantastic. Great work!

1 Like