emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* a new csl - citation style lisp ;)
@ 2015-12-11 19:57 John Kitchin
  2015-12-12  9:31 ` Martin Yrjölä
  0 siblings, 1 reply; 3+ messages in thread
From: John Kitchin @ 2015-12-11 19:57 UTC (permalink / raw)
  To: Org Mode

Hi everyone,

I got curious enough about citation processing to draft an elisp-based
citeproc for orgmode. You can see the code here:

https://github.com/jkitchin/org-ref/tree/master/citeproc

It is loosely based on the xml-CSL file, but in lisp. The principle is
the same, there is a csl file in lisp that contains formatting
information, and a processor that works on my org-ref links to replace
them with formatted citations and entries.

The readme doesn't do it justice, check out
https://github.com/jkitchin/org-ref/blob/master/citeproc/readme.html (in
a browser) to see the formatted citations in an unsorted, numeric
superscript style. There is also a working author-year style.

It certainly isn't complete, bug-free, or stable yet and might still not solve
note-based styles, but it is pretty powerful already.

--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: a new csl - citation style lisp ;)
  2015-12-11 19:57 a new csl - citation style lisp ;) John Kitchin
@ 2015-12-12  9:31 ` Martin Yrjölä
  2015-12-12 13:23   ` John Kitchin
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Yrjölä @ 2015-12-12  9:31 UTC (permalink / raw)
  To: John Kitchin; +Cc: Org Mode

Hi John,

John Kitchin writes:

> Hi everyone,
>
> I got curious enough about citation processing to draft an elisp-based
> citeproc for orgmode. You can see the code here:
>
> https://github.com/jkitchin/org-ref/tree/master/citeproc

I gave it a spin and it was very easy to set up as an org-ref user.
Great work so far. I think an Elisp based implementation has many
strengths like you mentioned in the readme.

> It is loosely based on the xml-CSL file, but in lisp. The principle is
> the same, there is a csl file in lisp that contains formatting
> information, and a processor that works on my org-ref links to replace
> them with formatted citations and entries.

What would be the best way moving forward? How easy would it be to
implement a converter for xml-CSL files? Or would it be better to
support the xml-CSL format directly to avoid duplicate work?

> It certainly isn't complete, bug-free, or stable yet and might still not solve
> note-based styles, but it is pretty powerful already.

Do you already accept bug reports and pull requests on Github?

Best regards,
Martin Yrjölä

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: a new csl - citation style lisp ;)
  2015-12-12  9:31 ` Martin Yrjölä
@ 2015-12-12 13:23   ` John Kitchin
  0 siblings, 0 replies; 3+ messages in thread
From: John Kitchin @ 2015-12-12 13:23 UTC (permalink / raw)
  To: Martin Yrjölä; +Cc: Org Mode

>>
>> I got curious enough about citation processing to draft an elisp-based
>> citeproc for orgmode. You can see the code here:
>>
>> https://github.com/jkitchin/org-ref/tree/master/citeproc
>
> I gave it a spin and it was very easy to set up as an org-ref user.
> Great work so far. I think an Elisp based implementation has many
> strengths like you mentioned in the readme.

I am glad to hear that!

>
>> It is loosely based on the xml-CSL file, but in lisp. The principle is
>> the same, there is a csl file in lisp that contains formatting
>> information, and a processor that works on my org-ref links to replace
>> them with formatted citations and entries.
>
> What would be the best way moving forward? How easy would it be to
> implement a converter for xml-CSL files? Or would it be better to
> support the xml-CSL format directly to avoid duplicate work?

I don't know the answer here. We can read the xml-CSL directly into an
elisp data structure that looks similar to my lisp-csl. I thought about
trying to use the xml-csl directly, but they write some logic control
into them, and I didn't want to write code to turn them into functions
(which is what the other citeproc codes must do I guess.)

Also, by going straight to elisp-csl, we can directly write code into
them if we want, which makes them pretty flexible, probably more so than
xml-csl.

It only took a couple of days to get to this, so I am not too committed
to not using the xml-csl files. There are a lot of them already
available. They don't support my space-chomping and punctuation
transposition ideas, or different citation types (cite, citenum,
citeyear, citeauthor, ...) I think, so we would have to adapt them to do
that or provide some other mechanism to pass options to the processor.

>
>> It certainly isn't complete, bug-free, or stable yet and might still not solve
>> note-based styles, but it is pretty powerful already.
>
> Do you already accept bug reports and pull requests on Github?

Sure. I think this code has some value to org-ref whether it becomes the
citation processing solution in the future or not. It will make it easy
to add nicely formatted citations to emails, text documents, etc...

I am not sure it is particularly stable in structure yet. I still don't
know how easy it will be to modify backend outputs, e.g. to change how
in-text citations are hyperlinked to bibliography entries, or if it
would be easy to have a bibitems list prepared for LaTeX, or to export
as an org-file with footnotes, or otherwise linked references, etc...

We can only learn those things by trying them ;)

>
> Best regards,
> Martin Yrjölä

--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-12-12 13:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-11 19:57 a new csl - citation style lisp ;) John Kitchin
2015-12-12  9:31 ` Martin Yrjölä
2015-12-12 13:23   ` John Kitchin

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).