Available for beta testing: Markdown export of notes

24
  • I second the suggestion of @alflamingo.
    Also, a note in Zotero has links to other items: the parent item, other items by 'related to', and also tags. This information is not included in the export to markdown. If they were somehow included, the export could be used for instance to visualise these relations in other tools.
    Anyway, I first want to thank you for all the features you have already included!
  • @alflamingo: I'm not sure what you're referring to. "exported element" isn't something that Zotero exports. Zotero notes don't have titles, and it just exports the full content of the note.
  • When dragging annotation to another program (for example, Obsidian), is currently possible to add page and/or metadata of the original pdf? Something like
    "Some quoted text" (page 9, [ citation](zotero-link))

    Currently I can drag only
    "Some quoted text"



  • edited January 23, 2022
    About exported element mentioned above, I will try to clarify:
    i) it is in reality "elemento exportado.md" in the spanish version I use, so it may refer to "exported item.md". And it is the title of the file I see after exporting the note (using export to markdown format, to my desktop let'say).
    ii) what I understood as being a title is the first line of the note; as it is what I see from zotero mylibrary main interface.

    I don't know how to say more... It looks like a title because if I open a new note and write "to do list [breakspace] buy cheese", what I would see from mylibrary is "to do list". So what I was suggesting is to make it appear as "to do list" when exporting.

    Note as I write : this suggestion applies to a single note export only. If I export more than one item/element it become irrelevant, because I will inevitably have to choose only one tittle for the group of notes I have selected...

    Plus, if I want a specific tittle to the .md file I will export, instead of the default "exported item.md" displayed in the export interface, it is really a matter of one little step. In the example above, I just have to type "to do list", and press enter...

    So overall it may not need any change...sorry for the confusion, I wrote too fast I supposed.

    All the best

    Extra: maybe the suggestion was referring more technically to something like "to change default file name while exporting". But again, I would withdraw what I have suggested.
  • @alflamingo: OK, got it — yes, so the feature request there would be to set the default filename based on the first line of the note when exporting a single note item. We'll consider that.
  • "set the default filename based on the first line of the note when exporting a single note item" : exactly! Many thanks
  • Hey, thank you for that feature! This may reduce some complexity in my workflows using different plugins (someday).

    It would be nice if we could assign a shortcut to that export action *and* define path on our file system where those markdown files get saved. That way, exporting would be much faster!
  • Please allow users to switch between raw markdown and normal editing interface.
  • edited February 10, 2022
    I've spent the last 2 weeks trying to wrap my brain around how to use 4 different plugin's to export notes from Zotero to Obsidian. This integrated approach from within Zotero will be AMAZING for novice users trying to set up communication between Zotero and apps like Obsidian. Thank you!

    I have a request (and I'm VERY new at this so I may be doing something wrong) but here's my wish list :-)

    1) I'd like the option to use the Author, year, and first line of the the note for the title (or at least author + first line)

    2) I might be doing something wrong, but links within the note don't work for me. I see where they could go. I probably need to set something in the config settings, but I don't really know what I'm doing...

    3) Is it possible to get an export that includes references?

    4) Can exporting notes be set up to highlight a group of documents so that multiple notes can be exported at once (right now I have to click on each note file individually)

    Thank you for this work!
  • @alflamingo: In the latest beta, a single exported note will be named after the first line of the note.
  • Second the idea of @DigitalResearch to allow customizing the format of the highlight & annotation in Note, just like [zotfile].

    I'm using Zettlr, not Obsidian, and the creator's workflow is very similar to mine, so the ability to edit out color codes and other elements would be greatly appreciated.
  • @dstillman I confirm that the export does work as described, first line of the note is indeed in the default tittle when exporting. Great! Thanks a lot
  • Hi all, I want to extract annotations and export them to markdown, then import them in Obsidian. I am not sure if beta version can allow me do that. Any suggestion of exporting the text version of markdown in beta?
  • @Zihac: Yes, the beta does this. See Adding Annotations to Notes for extracting annotations and the first post in this thread for exporting.
  • @dstillman what about the round trip or cyclic workflows? export into markdown, edit with another tool, import back, edit in zotero, repeat. will that be possible?
  • Markdown support is really amazing! Somehow I can't find the markdown export option in the macos beta, but it works fine in the windows beta. Could there be any differences in the beta-releases that might explain this?
  • @nordicpioneer: If you're not seeing the Markdown option when you go to export a note, reset your translators from the Advanced → Files and Folders pane of the Zotero preferences.
  • While I appreciate the inclusion of exporting annotations directly in Zotero itself, I find this current implementation in Zotero 6 beta 1 an unfortunate setback compared to the functionality of Argentina Ortega Sáinz's mdnotes add-on. As such, this is going to irreparably change the workflows of some of us who have come to rely on mdnotes features, key among them being templates of output files.
  • @langisjor Have you tried using the citation plugin in Obsidian?

    I use it to create the note in Obsidian, then you can drag-and-drop your Zotero annotations and notes into the Obsidian note (pressing the Shift key during drag-and-drop will keep links back to Zotero items and individual annotations).
  • As such, this is going to irreparably change the workflows of some of us who have come to rely on mdnotes features, key among them being templates of output files.
    @langisjor: I'm not sure what the "this" is referring to. We have nothing to do with the mdnotes plugin, and there's nothing stopping the developer from updating it to work with Zotero 6 (other than, it sounds like, lack of time and JavaScript experience). All we've done here is add built-in support for Markdown export of notes.

    For what it's worth, we've just added templates for annotations added to notes. That's more replacing some of the hidden ZotFile settings, but since Markdown export is determined by the elements in the note, it could help enable additional Markdown workflows.
  • It is hoped that when exporting to markdown, you can add the metadata of the document to which the note belongs (customizable), and add the markdown file to the item.
    Metadata: item address, citekey, author, date, journal, etc.
  • With the new update, I can no longer shift-drag a note made from the annotation from the list view to put it in a text file with a link back to the pdf. In fact, I cannot drag a note at all to export it. Has this feature been discontinued?
  • With the new update, I can no longer shift-drag a note (...) with a link back to the pdf
    @erazlogo It works for me [Windows 11; Zotero 6.0-beta.2]
  • @warguelles Thanks! Now it works for me too after a restart. Must be something in my system.
  • edited February 28, 2022
    Another question: the dragging of the note alone works now. But when I try to drag the item and the note together, I do get the item, but the note text does not transfer. Instead I get this:

    ---
    type: "note"
    author: "Su Lin Lewis"
    date: "2022-01-01"
    online: "[online](http://zotero.org/users/40/items/JZPHUVUG)"
    local: "[local](zotero://select/items/_JZPHUVUG)"

    ---
    Su Lin Lewis, [online](http://zotero.org/users/40/items/JZPHUVUG) [local](zotero://select/items/_JZPHUVUG)
    Whereas shift-dragging the note alone gets me this:

    “These pan-Asian, Afro-Asian and pan-African conferences took place on an expanding network of international air routes. While the ability of delegates and observers to travel was essential to the workings and prestige of international conferences, little has been written about the way mobility shaped their dynamics.” ([Su Lin Lewis, 2022, p. 234](zotero://select/library/items/K3WIAFLS)) ([pdf](zotero://open-pdf/library/items/XZXKZIHX?page=1&annotation=WF539UZF))
    Shouldn't Zotero still transfer the note text?

    Basically, what I am trying to do is to drag-and-drop all fields/links I need for the item (using my own export translator) + the note with the link back to the pdf annotation. I'm trying to figure out why this doesn't work at the moment.
  • edited February 28, 2022
    @erazlogo:

    (Note that Shift doesn't do anything when dragging notes. You can copy notes just by dragging them. Shift is only used in Quick Copy to trigger citation mode for items when a bibliographic style is selected.)

    If you select regular items in addition to notes, it will currently use the Quick Copy item format for all the items. I've created a ticket to use Markdown for the notes.
  • @dstillman Thanks for adding a ticket! I understand that I can drag notes without pressing shift, but the shift triggers the link in the note back to the pdf annotation. I need that. Otherwise, why drag? I could just copy and paste.
  • edited March 1, 2022
    the shift triggers the link in the note back to the pdf annotation
    @erazlogo: No, it doesn't. Again, Shift is just equivalent to the Quick Copy citation mode — i.e., Cmd-Shift-A — and has no effect for export or note formats. You can just do a regular drag.
  • I am trying to work out how to get my highlights, highlight annotations, and note annotations together with the full citation information out of Zotero. When I drag and drop the highlight/note annotation out of Zotero it into another app I get the highlighted text or annotation only- there is no citation information.

    From what I can understand, I have to set up the annotation template according to these instructions > https://www.zotero.org/support/note_templates

    However, a search for the "annotations.noteTemplates" template brings up nothing in the about:config list. What do I need to do to have the template appear in the list?
This discussion has been closed.