emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] org-cite and org-citeproc


From: Matt Price
Subject: Re: [O] org-cite and org-citeproc
Date: Tue, 16 Jun 2015 15:36:39 -0400



On Mon, Apr 6, 2015 at 2:51 PM, Richard Lawrence <address@hidden> wrote:
Hi Aaron and all,

Richard Lawrence <address@hidden> writes:

> Alright, I'll try to move to json.el, and possibly change to having
> org-citeproc generate Org markup in the meantime.

Just a heads up: I've pushed some changes to my branch of Org to make
org-cite use json.el, and to add a basic Org format writer to
org-citeproc.

I have not made any other changes to org-cite to use the Org formatted
output from org-citeproc, though, as I believe doing this properly will
involve parsing the output and inserting it into Org's exporter's parse
tree (to accommodate the bibliography and note-based styles).  I won't
have time to work on that this week, but I'll come back to it.

Best,
Richard

Hi Richard et al,

I'm wondering what kind of work is required to make use of org-cite and org-citeproc at present. In particular, I'm wondering what kinds of changes I'll need to make to my current setup, and whether it's worthwhile to use my ultra-slow coding skills to create whatever glue is still necessary.

Here's my setup at present:

I currently use Zotero for most of my bibliography management; it's relatively easy to get zotero to export a bibtex bibliography (cf. https://github.com/robintw/AutoZotBib), and I will switch to bibtex if absolutely necessary.  I'd rather just keep using Zotero, though.

I use zotxt-emacs to insert references in org files.

I export my work to html and odt.  I use this small bit of code to manage exports:

;; zotxt
(org-add-link-type "zotero"
                   (lambda (rest)
                     (zotxt-select-key (substring rest 15)))
                   (lambda (path desc format)
                     (if (string-match "address@hidden(.*\\)$" desc)
                         (cond ((eq format 'latex)
                                (format "\\cite{%s}" (match-string 1 desc)))
                               ((eq format 'md)
                                desc)
                               ((eq format 'html)
                                (deferred:$
                                  (zotxt-get-item-bibliography-deferred `(:key , (substring path 15)))
                                  (deferred:nextc it
                                    (lambda (item)
                                      (plist-get item :citation-html)))
                                  (deferred:sync! it)))
                               ((eq format 'odt)
                                (deferred:$
                                  (zotxt-get-item-deferred `(:key , (substring path 15)) :248bebf1-46ab-4067-9f93-ec3d2960d0cd)
                                  (deferred:nextc it
                                    (lambda (item)
                                      (plist-get item :248bebf1-46ab-4067-9f93-ec3d2960d0cd)))
                                  (deferred:sync! it)))
                               (t nil)
                               nil))))

currently this grabs a full html citation and pastes it into the html export, while for odt it produces strings of the form { | Herzig, 2006 | | |zotero://select/items/0_SKDIF737}, which Zotero can understand withthe aid of an RDF/ODF scan plugin. 

All of this is fine for my current purposes, but I would like to figure out a more flexible and enduring solution, so I'd like to try out org-cite and org-citeproc.  But I'm not quite sure what's required, and whether there's support currently for odt and html export. 

Thanks very much for your help,

Matt




reply via email to

[Prev in Thread] Current Thread [Next in Thread]