emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Richard Lawrence <richard.lawrence@berkeley.edu>
To: emacs-orgmode@gnu.org
Subject: Re: Some projects
Date: Mon, 26 Oct 2015 15:23:50 -0700	[thread overview]
Message-ID: <87ziz5z2tl.fsf@berkeley.edu> (raw)
In-Reply-To: 87vb9tcx5c.fsf@nicolasgoaziou.fr

Hi Nicolas and all,

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Richard Lawrence <richard.lawrence@berkeley.edu> writes:
>
>> Yes, this is my understanding, too.  In particular, there does not seem
>> to be an Elisp CSL library, and it would be a lot of work to write
>> one.
>
> Here is a genuine question: what is the difficult part, or if there is
> none, the longer parts of the work? AFAIU, CSL is XML and we can use
> libxml for the low-level parsing.

I can't speak to how difficult it would really be.  But I do think it
would be a lot of work, and tedious, unglamorous work at that.
Essentially it means implementing the CSL specification:

http://docs.citationstyles.org/en/stable/specification.html

The specification describes the XML format for CSL styles, which IIUC
are something like XSLT programs: they describe how to transform an
input document tree into an output document tree.  So, implementing CSL
is something like implementing a very special-purpose declarative
programming language, which has to handle declarations about every
detail of citation formatting (where to put periods, how to capitalize
names like "von Neumann", whether to use "&" or a translation of "and"
for the current locale, etc.).  Lisp is a good language to do this kind
of thing in, but parsing the XML is surely the easy part.

> Could you give some examples of the UI offered by the citeproc-hs
> library?

The library I ended up wrapping is actually pandoc-citeproc, which is a
fork of citeproc-hs (which seems to be unmaintained).

pandoc-citeproc essentially exports one main function, processCites.
This function transforms a Pandoc data structure containing Citation
nodes into another Pandoc where the citations have been rendered into
the text and the bibliography is appended at the end of the document.

processCites also requires a list of references (read from a
bibliography database, e.g. .bib files, via the readBiblioFile function)
and a CSL style (read from a file via the readCSLFile function).  So
basically, the pandoc-citeproc API consists of these three functions:
processCites, readBiblioFile, and readCSLFile.

Best,
Richard

  reply	other threads:[~2015-10-26 22:23 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-25 13:08 Some projects Nicolas Goaziou
2015-10-25 14:43 ` Marcin Borkowski
2015-10-25 16:11   ` Nicolas Goaziou
2015-10-25 15:45 ` Eric S Fraga
2015-10-25 16:16   ` Nicolas Goaziou
2015-10-25 16:18   ` Marcin Borkowski
2015-10-25 16:37     ` Nicolas Goaziou
2015-10-25 18:13       ` Marcin Borkowski
2015-10-25 18:24         ` Nicolas Goaziou
2015-10-25 17:57 ` Thomas S. Dye
2015-10-25 18:00   ` Fabrice Popineau
2015-10-25 18:12     ` Nicolas Goaziou
2015-10-25 18:22       ` Eric S Fraga
2015-10-25 19:12         ` Marcin Borkowski
2015-10-25 19:11       ` Marcin Borkowski
2015-10-25 21:18         ` Anders Johansson
2015-10-25 21:29           ` Anders Johansson
2015-10-25 19:33       ` Thomas S. Dye
2015-10-25 20:00         ` Nicolas Goaziou
2015-10-25 20:17           ` Thomas S. Dye
2015-10-25 20:03         ` Nicolas Goaziou
2015-10-25 19:02 ` Rasmus
2015-10-25 19:20   ` Marcin Borkowski
2015-10-26  2:23   ` Matt Price
2015-10-25 20:24 ` Samuel Wales
2015-10-25 20:25   ` Samuel Wales
2015-10-25 23:03 ` Aaron Ecay
2015-10-26  8:13   ` Marcin Borkowski
2015-10-26  9:20     ` Rasmus
2015-10-26 16:39   ` Richard Lawrence
2015-10-26 18:17     ` Nicolas Goaziou
2015-10-26 22:23       ` Richard Lawrence [this message]
2015-10-27  0:03         ` Matt Price
2015-10-27 12:01     ` Aaron Ecay
2015-10-27 12:34       ` Rasmus
2015-10-27 13:03         ` Aaron Ecay
2015-10-27 13:51           ` Rasmus
2015-10-28  1:05             ` Matt Price
2015-10-28  3:28               ` Aldric Giacomoni
2015-10-28  3:31               ` Matt Lundin
2015-10-28 14:36                 ` Matt Price
2015-10-28 15:31                   ` Matt Price
2015-10-28  1:05           ` Matt Price
2015-10-27 13:19         ` Rainer M Krug
2015-10-27 13:42           ` Rasmus
2015-10-27 14:49             ` Ista Zahn
2015-10-27 15:09               ` Rasmus Pank Roulund
2015-10-27 15:25                 ` Ista Zahn
2015-10-27 15:36                 ` Rainer M Krug
2015-10-28  2:52                 ` Matt Lundin
2015-10-27 13:22         ` Richard Lawrence
2015-10-28  1:57   ` Matt Lundin
2015-10-28  8:56     ` Rasmus
2015-10-28  9:07       ` Rasmus
2015-10-26 17:20 ` Eric Abrahamsen
2015-10-27  8:30   ` Nicolas Goaziou
2015-10-27 18:53     ` Eric Abrahamsen
2015-10-27 19:23       ` Rasmus
2015-10-27 20:28         ` Eric Abrahamsen
2015-10-27 20:01       ` Marcin Borkowski
2015-10-27 21:53       ` Nicolas Goaziou
2015-10-26 18:20 ` Kaushal Modi

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=87ziz5z2tl.fsf@berkeley.edu \
    --to=richard.lawrence@berkeley.edu \
    --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).