Available for beta testing: Markdown export of notes
In the latest Zotero beta, we've added support for Markdown export of Zotero notes, without the use of any third-party plugins. Paired with the new PDF reader and note editor, this provides a way to annotate PDFs, add those annotations to Zotero notes, and then export those notes to a Markdown-based tool, with optional
You can now configure a Note Format for Quick Copy separately from an Item Format in the Export pane of the preferences. If only notes are selected in the items list when pressing the Quick Copy shortcut or using drag-and-drop, the selected note format will be used. You can also use "Export Item…" on notes, which will show the export dialog with only note-compatible options.
We've replaced the previous (vaguely Markdown-ish) plain-text format when dragging Zotero notes to a plain-text text area with proper Markdown, and this can now be triggered via the Quick Copy keyboard shortcut as well. As before, both plain text and rich text are put on the clipboard, and the format used will depend on the target application. (In some cases, you may need to paste without style to force a Markdown editor that tries to accept rich text to use the Markdown instead.) If you want raw HTML markup, there's an "HTML" option, which copies HTML markup as plain text, similar to the "Copy as HTML" option for the bibliographic formats.
We'll be adding more customizability to this in future versions, so let us know what sorts of options you'd like to see.
(If you're using Word, LibreOffice, or Google Docs, you can use the Add Note button available in the beta to insert notes with annotations into your document with active Zotero citations and then generate a bibliography from those citations.)
Known issues:
- The
- It's not currently possible to copy a note to Markdown while viewing a note in the PDF reader, but we'll make that possible in an upcoming version. For now you have to go back to the library view.
- When using "Export Item…", you can choose whether to include
- Embedded images, including image annotations, aren't currently included in note export. There's not a great way to do this without embedding huge
zotero://select
and zotero://open-pdf
links back to Zotero items and individual annotations.You can now configure a Note Format for Quick Copy separately from an Item Format in the Export pane of the preferences. If only notes are selected in the items list when pressing the Quick Copy shortcut or using drag-and-drop, the selected note format will be used. You can also use "Export Item…" on notes, which will show the export dialog with only note-compatible options.
We've replaced the previous (vaguely Markdown-ish) plain-text format when dragging Zotero notes to a plain-text text area with proper Markdown, and this can now be triggered via the Quick Copy keyboard shortcut as well. As before, both plain text and rich text are put on the clipboard, and the format used will depend on the target application. (In some cases, you may need to paste without style to force a Markdown editor that tries to accept rich text to use the Markdown instead.) If you want raw HTML markup, there's an "HTML" option, which copies HTML markup as plain text, similar to the "Copy as HTML" option for the bibliographic formats.
We'll be adding more customizability to this in future versions, so let us know what sorts of options you'd like to see.
(If you're using Word, LibreOffice, or Google Docs, you can use the Add Note button available in the beta to insert notes with annotations into your document with active Zotero citations and then generate a bibliography from those citations.)
Known issues:
- The
zotero://open-pdf
links should include annotation
parameters to re-select the original annotation, but those are currently missing when using some of the available methods to add annotations to notes, and only a page number is included. If you drag annotations directly from the PDF reader to a note, the annotation key will be included. We'll fix this for all methods in an upcoming version.- It's not currently possible to copy a note to Markdown while viewing a note in the PDF reader, but we'll make that possible in an upcoming version. For now you have to go back to the library view.
- When using "Export Item…", you can choose whether to include
zotero://
URLs in the Markdown export. It's not currently possible to configure this when using Quick Copy.- Embedded images, including image annotations, aren't currently included in note export. There's not a great way to do this without embedding huge
data:
URIs, and we haven't yet evaluated how different Markdown editors would handle this. Another option might be to serve images via a local webserver, but I don't know if Markdown editors support live rendering of images or whether that would actually be something many people would want. This discussion has been closed.
Just want to cast my vote here that an option to export image as data URI would be great. That would make for completely portable and versatile MD note file.
In my note editor (Obsidian), it is trivial to add a CSS snippet to automatically hide or replace the huge URI component when cursor is not on that URI line.
This would allow to link the exported notes to other exported notes or parent items.
I imagine that proposing a filename based on the name of the note would probably be needed to make it possible to link to related notes.
1、allow to customize the MD template for the Note export, just like [mdnote]
2、allow to customize the format of the highlight & annotation in Note, just like [zotfile]
Check it out here:
https://github.com/e-alizadeh/Zotero2md
All annotation and notes that belong to a Zotero item will be outputted to a single markdown file.
Since I'm using **Obsidian** as my main note editor, the Zotero2MD Python library allows you to convert Zotero tags into internal links ([[zotero_tag1]]). It's also possible that you specify which Zotero tags to convert to internal links ([[zotero_tag1]]) and which to keep as tags (with #zotero_tag2).
Check out all available output configurations here: https://github.com/e-alizadeh/Zotero2md#custom-output-parameters
Feel free to request a feature and/or report a bug: https://github.com/e-alizadeh/Zotero2MD/issues
--> Please note that this only works for annotations on the Zotero's new PDF reader and note editor as they are saved in Zotero databases (see https://www.zotero.org/support/pdf_reader_preview).
NOTE: If the features I'm covering in the Python library become available in the Zotero app, I will no longer support the Python library!
https://www.zotero.org/support/pdf_reader#adding_annotations_to_notes
But yes, we'll think about enabling Quick Copy drag-and-drop of individual annotations to other programs.
I wasn't sure if this was in the dev pipeline, so I recently released an add-on that lets you open exported markdown notes from the contextual menu of Zotero items, and adds a colored tag to items so that you can see which items are associated with markdown notes at a glance. https://github.com/daeh/zotero-obsidian-citations
I'd be interested to hear if/how it works with people's workflows, since markdown exports are becoming a standard feature of Zotero. (Right now ZoteroObsidianCitations is built with the ObsidianMD editor in mind, but it can be easily adapted to work with other markdown storage strategies.)
Thanks for all these great updates!
As someone not familiar with computer programming, I am having a hard time trying to follow this discussion on what needs to be done to set up to have it all working. Basically, I am wanting to get highlights and associated notes and (independent) notes out of Zotero in Markdown so I can use them in other writing tools as Obsidian. Any guidance that you could provide would be most welcome.
With the addition of this export feature, Zotero has become unparalleled as a tool for academic research. If only I knew how to set it all up. :)
1. In the Zotero library pane, select the note or notes you want to export.
2. Right-click and choose 'Export Notes ...'. By default, this will include keeping live links to Zotero.
3. This will open your file dialog so you can save the files as markdown files wherever you choose.
As I understand it (although I don't use Obsidian myself, so could be wrong about this!), Obsidian essentially reads from a set of Markdown files on your hard drive, so you should just be able to save the Markdown file wherever the Obsidian files are and retrieve it as you would normally. In Craft and Ulysses, you just have to follow the instructions for importing Markdown files.
How did you get the live links added? All that was exported was the text of the note, no live links to Zotero. Also, does this feature work only for notes? Is it able to also work for highlights and the notes that are added to the highlight?
Maybe I should post in a new thread with a title like "How to use markdown export of notes & highlights in beta test version". I do not want to have this thread filled with questions such as mine.
https://github.com/paperai/pdfanno
https://github.com/klassif-ai/react-pdf-ner-annotator
My only feature suggestions would be to allow toggling between markdown and rich text (rendered markdown) in the editor--this is typical of many markdown editors--and also allow totally disabling the ordinary rich text editor functionality in the preferences. I like to work 100% in markdown and always find rich text editors cranky. Being able to toggle back and forth between markdown and rendered views would be great.
I am wondering if it is possible to directly get the annotation key without exporting the note.
Personally, I will take notes directly on Markdown-based editors (e.g., obsidian, typora), since my notes usually contain a lot of formulas.
This feature will be essential for those who take notes directly on markdown editors.
May I suggest the following additional features?
1. As already suggested above, it would be great to export selected annotations, to support a workflow where Zotero is used to read, highlight and comment and an external notetaking software is used to later write a summary note.
2. For image highlights, include a markdown link to the image file so that the image can be displayed by software such as Obsidian, plus a Zotero link to take the user to the original source.
But note title is "exported element" afterward, would be a feature suggest to also apply the note title when exporting (the one that appears in the first line beside the yellow note icon in zotero desktop app)
Thanks :)