windingwind / zotero-better-notes

Everything about note management. All in Zotero.
GNU Affero General Public License v3.0
5.22k stars 184 forks source link

export option for citations #286

Closed c3founder closed 1 year ago

c3founder commented 1 year ago

Awesome work!

Is it possible to add options for exporting citations in markdown as @citationkey instead of just printed text of the citation?

Because, as I understand, you can write the whole paper in the "Main Note" with all of the citations. But often you want to use LaTeX editors to do final touch ups. So I'm thinking of:

Zotero Note ----betterNote---> MD file ---pandoc----> LaTex (say Overleaf) -> PDF

FYI pandoc citation guide: https://garrettgman.github.io/rmarkdown/authoring_pandoc_markdown.html#citations

Thanks!

windingwind commented 1 year ago

To keep the consistency of md<->note, we export citations as they are in Zotero. If you want to change the citation format, please use Zotero's built-in template. Not sure if the citation key is supported. See https://www.zotero.org/support/note_templates

c3founder commented 1 year ago

I see. I couldn't find any trivial way around it. My current solution is to open the workspace (the main note) in a separate window and search for references in zotero and quick copy (ctrl+shif+c) the key (set it in betterbibtex to [pandoc]) and then past it in the note, which will generate the needed [@citekey].

windingwind commented 1 year ago

A possible workaround: adding a Citation Tail template, which will be appended to the end of citations when exporting. They will be wrapped in HTML tags with specific class names in markdown, allowing the plugin to recognize and ignored them in the syncing process.

Any suggestions?

windingwind commented 1 year ago

This should be available by using the template. So close here. If you need help, please tell me~