emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Price <moptop99@gmail.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: org-cite and org-citeproc
Date: Tue, 16 Jun 2015 15:36:39 -0400	[thread overview]
Message-ID: <CAN_Dec9GgOgp14fY8tTibCbxLq3-Zs18PunbDkDn+-JH4zKGRQ@mail.gmail.com> (raw)
In-Reply-To: <87vbh9nl91.fsf@berkeley.edu>

[-- Attachment #1: Type: text/plain, Size: 3584 bytes --]

On Mon, Apr 6, 2015 at 2:51 PM, Richard Lawrence <
richard.lawrence@berkeley.edu> wrote:

> Hi Aaron and all,
>
> Richard Lawrence <richard.lawrence@berkeley.edu> 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 "^@\\(.*\\)$" 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

[-- Attachment #2: Type: text/html, Size: 5448 bytes --]

  reply	other threads:[~2015-06-16 19:36 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-28 18:53 Richard Lawrence
2015-03-31  8:16 ` Eric S Fraga
2015-03-31 19:13   ` Richard Lawrence
2015-03-31 19:34     ` Nick Dokos
2015-03-31 20:29       ` Thomas S. Dye
2015-03-31 21:57         ` Richard Lawrence
2015-04-01  0:41           ` Thomas S. Dye
2015-04-01 15:42             ` Richard Lawrence
2015-04-01 19:41               ` Thomas S. Dye
2015-04-02 15:57                 ` Richard Lawrence
2015-04-02 16:45                   ` Thomas S. Dye
2015-03-31 21:12     ` Eric S Fraga
2015-04-01  7:49       ` Andreas Leha
2015-04-02 14:29         ` Eric S Fraga
2015-04-02 15:11           ` Richard Lawrence
2015-04-02 19:26             ` Andreas Leha
2015-03-31 22:03     ` Rasmus
2015-04-01 14:39       ` Richard Lawrence
2015-04-02  0:08         ` Rasmus
2015-04-02 15:26           ` Richard Lawrence
2015-04-02 15:51 ` Aaron Ecay
2015-04-02 17:38   ` Richard Lawrence
2015-04-06 18:51     ` Richard Lawrence
2015-06-16 19:36       ` Matt Price [this message]
2015-06-18 22:44         ` Richard Lawrence
2015-04-02 19:17   ` Rasmus
2015-04-03  2:56     ` Richard Lawrence

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAN_Dec9GgOgp14fY8tTibCbxLq3-Zs18PunbDkDn+-JH4zKGRQ@mail.gmail.com \
    --to=moptop99@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).