New plugin: Citations (with Zotero)

Markdown to “Live” Word Document

If I understand the question, I can share a workflow for going from markdown files to word or open office documents that have “live” Zotero citations. Exporting to flattened citations is also possible and doesn’t require the lua script listed below. Getting live citations is something I stumbled across relatively recently, really like, and use regularly. Following from this thread: Convert plaintext citekey to “live” MS Word citation - Zotero Forums

Dependencies:

Procedure:

  • Export the Zotero library as BetterBibTex *.bib and make sure that the export file does not have a space in the name. For example My LIbrary should be My_Library.
  • In the markdown document to be exported, fill out the appropriate yaml frontmatter described in the BetterBibTex manual Markdown/Pandoc :: Better BibTeX for Zotero
  • Export the file via pandoc using an added lua filter. I use the following code:
    pandoc -s "<path to file.md>" --lua-filter="<path to script zotero.lua>" --bibliography "C:\Users\Nathan\Nextcloud\Notes\My_Library.bib" -o "<path to output.docx>"
  • After the export is complete, open the Word document and refresh Zotero.

Presto! …at least on Win10. Good luck.

8 Likes