emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Citation syntax: a revised proposal


From: Rasmus
Subject: Re: [O] Citation syntax: a revised proposal
Date: Mon, 02 Mar 2015 21:53:20 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Looks cool Aaron.  Thanks!

Aaron Ecay <address@hidden> writes:

> The first issue is that the parser includes trailing punctuation in
> “bare” @key citations.  So the following does not work as expected (the
> :key includes the period): “This was demonstrated most recently by
> @Smith2015.”  I’m not sure what the right approach is – one option
> would be to say that keys can contain punctuation, but must end (and
> begin) with an alphanumeric character.

I also tried to solve this in the attached patch.  Feel free to use it in
the unlikely case that it adds anything to your fix (I didn't check).
Note, cf. my other recent post, this should probably be part of a
citations object rather than a citation object (assuming you take my idea
at good value).

> The second issue is that the :key property of the citation element
> includes the @.  This is not right IMO: it’s a detail of the syntax.
> And it means that consumers of the syntax, who might want to look up
> the key in a database, will always have to remember to strip the @.
> I’ve pushed a provisional fix for this in my branch.

I agree that the @ should not be part of the key.

> Citation modes are responsible for formatting the in-text citation
> (usually, a reference to a full citation stored elsewhere).  [...]
> Citation styles are responsible for formatting the citation in the
> bibliography [...]

Cool!


> -> How much is it worth trying to keep latex and the other backends
> together.

A lot!  In the sense that you get approximately the same output across
backends when using support citation commands.  When you are using citepos
or similar you are on your own, but a highlevel API would be nice.

> The current implementation uses some common functions (in ox-cite.el)
> for all backends, including latex.  However, latex basically does its
> own thing.  So it would be possible to include in ox-cite only code for
> non-latex backends, and then implement latex citations solely in
> ox-latex.  Separation would make the initial implementation very
> simple.  On the other hand, I worry that it would perpetuate the present
> situation where latex and non-latex citations are two separate
> universes.  On the third hand, serious latex users will probably just
> say you should use latex of you want nice citations, since latex is so
> much better.  ;)

I use LaTeX and in a recent funding request .doc (no x) was *mandatory*!
I'm told that some journals only accept word...

> -> How much of the non-latex citation code is it worth implementing in
> elisp.

As little as possible, though a highlevel API is nice, e.g. being able to
make a citepos using (concat (citeauthor cite) "'s" (citeyear cite)).

> Is it worth trying to put together a bare-bones elisp implementation,
> so people can have dependency-free bibliographies?  My inclination is to
> say “no,”

+1 (so "2 × no").

> to avoid duplicating the considerable effort put into the CSL
> universe (over 7,000 citation styles available!).  However, it also
> seems a bit wrong to have a core feature depend on a third party
> executable.

Afaik, we need latexml or mathtoweb.jar to turn math into mathml for odt.

> (How much it would slow down export to continually shell out to an
> external program is also an open question.)

Does it matter with async?

> I didn’t try to do anything about support for editing/inserting citations
> within org mode.  It would be good to know whether John Kitchin is willing
> to contribute bits of his org-ref code for that.  (I see on Worg that he
> has an FSF assignment on file, but I don’t want to take without asking –
> or do porting/integration work that he’s happy to do himself!)

I haven't tried org-ref, but isn't it just reftex?  If so something like
this

(add-to-list 'reftex-cite-format-builtin
               '(org "Org-mode citation"
                     ((?t . "[cite:%l]")
                      (?p . "[parencite:%l]"))))

Should work.  We'd automatically add subtypes and maybe make an
intelligent choice based on whether prefix and postfix is used.  Another
idea would be to use the ox-export dispatcher code, somehow...

> PS the code uses relatively new functions from the subr-x and let-alist
> libraries, so it probably works best on a recent-ish (past few months)
> trunk version of emacs.

In another post, Nicolas said we can target (at least?) 24.4 for v8.4.
I'm assuming citation won't make 8.3...

—Rasmus

-- 
Send from my Emacs

Attachment: 0001-org-element.el-Add-subkeys-to-citation-objects.patch
Description: Text Data


reply via email to

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