zotero-mdnotes
zotero-mdnotes copied to clipboard
{{notes}} does not invoke "Zotero Note Template" but is read from extensions.mdnotes.placeholder.notes
Background: I want to move my annotations before the metadata. I am using Create full note export.
I played around with the templates, and according to the docs:
If you include the {{notes}} placeholder in the Mdnotes Default Template, mdnotes will loop through the Zotero Notes of the selected items and add them one by one using this template.
This does not happen, instead (and this also makes sense), it uses extensions.mdnotes.placeholder.notes.
Therefore, by default it creates a List of all the items notes.
These should be two different things. Maybe the extensions.mdnotes.placeholder should instead be called notesList?
Desktop (please complete the following information):
- OS: [MacOS Big Sur 11.6]
- Zotero version: [5.0.96.3]
- Mdnotes version: [0.2.0-alpha4]
- Zotfile version: [5.0.16]
- BetterBibtex version: [5.5.4]
{{notes}} indeed is a list of all the item's notes, that is documented here: https://argentinaos.com/zotero-mdnotes/docs/next/advanced/placeholders#item-placeholders
Ok, but then the linked and quoted part of the docs is misleading I think.. and since the function of looping through the notes with a template is in principal available, would you consider exposing this through another placeholder for example?
Not sure if I fully follow you, but the “other placeholder” would be the Zotero note template, wouldn’t it?
Hi and sorry for the delay.. I will try to be more specific.. This is the Mdnotes Default Template.md that is used when I press Create full note export
---
aliases: ["{{yamltitle}}"]
---
# {{yamltitle}}
{{abstractNote}}
## Metadata
{{itemType}}
{{bookTitle}}
{{author}}
{{date}}
{{DOI}}
{{collections}}, {{tags}}, #zotero, #literature-notes, #reference
{{book}}
{{editor}}
### Links
{{pdfAttachments}}
{{localLibrary}}
{{cloudLibrary}}
It works fine. Notice there is no {{notes}} in here, the annotations (from the notes in zotero) just get appended at the end using the Zotero Note Template.
Now my plan was to move the extracted annotations before the ##Metadata section, therefore I need to actually invoke the Zotero Note Template instead of it auto-appending to the end. Like i described above, the docs make it sound like {{notes}} would do this, but that just gives me the list. So the actual question would be: Can I choose, where to invoke the Zotero Note Template?
I hope this clears things up. It's not super inconvenient and I will probably just keep the Metadata on top, I just wanted to point out the discrepancy between documentation and actual behaviour..
Thanks for your patience and this very useful plugin!
Looks like what you want is the Single-note exports: https://argentinaos.com/zotero-mdnotes/docs/next/advanced/templates/single-file
You should double-check that your configuration is right, and that the Zotero Note Template looks as the docs explained. If that is the case, the notes' contents should indeed show up in this note rather than their links. Based on your description, something in your configuration, I'd guess that your template is not being used, but rather the default one.
Mhm, I have indeed been using single-note export anyway and just double-checked both templates, they seem to be okay but it does not work. I have added {{notes}} in the middle of my MDnotes Default Template. {{notes}} is basically doing what I would expect, it uses the extensions.mdnotes.placeholder.notes setting, which in my case is the default:
{"content":"## Highlights and Annotations\n\n- {{field_contents}}", "field_contents": "{{content}}", "link_style": "wiki", "list_separator": "\n- "}
Why would {{notes}} do anything else if this placeholder setting is there? BTW: The actual annotation content is still there at the end of the generated file. (auto-appended)
I could paste all the extensions.mdnotes.* settings and the templates if you think that helps.