[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [wip-cite-new] Exporting to pandoc md (and from there to zotero odt)
From: |
Anders Johansson |
Subject: |
Re: [wip-cite-new] Exporting to pandoc md (and from there to zotero odt) |
Date: |
Thu, 10 Mar 2022 20:50:11 +0100 |
Hi,
>We should also get pandoc to support updated org-cite syntax.
> https://github.com/jgm/pandoc/issues/7329
Now that pandoc has org-cite support, I found it simpler to reuse
ox-pandoc (https://github.com/emacsorphanage/ox-pandoc) and just do
this very simple configuration. ox-pandoc exports to an intermediary
org file, so we can just make sure to reinsert citations in org
format.
(use-package ox-pandoc
:custom (org-pandoc-options-for-odt
'((lua-filter . "/home/aj/lib/bbt-pandoc-zotero.lua")
(metadata . "zotero_author_in_text=true"))))
(org-cite-register-processor 'pandoc
:export-citation #'oc-pandoc-export-citation
:export-bibliography #'oc-pandoc-export-bibliography)
(defun oc-pandoc-export-citation (citation _style _ _info)
"Export CITATION object in org format."
(org-element-citation-interpreter
citation
(mapconcat (lambda (r) (org-element-citation-reference-interpreter r nil))
(org-cite-get-references citation))))
(defun oc-pandoc-export-bibliography (_k _f _s _p _b _i)
"Generate a #+print_bibliography:"
"#+print_bibliography:")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [wip-cite-new] Exporting to pandoc md (and from there to zotero odt),
Anders Johansson <=