emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: tsd@tsdye.com (Thomas S. Dye)
To: Richard Lawrence <richard.lawrence@berkeley.edu>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-cite and org-citeproc
Date: Wed, 01 Apr 2015 09:41:12 -1000	[thread overview]
Message-ID: <m2zj6rvdpj.fsf@tsdye.com> (raw)
In-Reply-To: <87h9szg8io.fsf@berkeley.edu> (Richard Lawrence's message of "Wed, 01 Apr 2015 08:42:23 -0700")

Aloha Richard,

Richard Lawrence <richard.lawrence@berkeley.edu> writes:

> Hi Tom and all,
>
> Thanks for answering my questions!
>
> tsd@tsdye.com (Thomas S. Dye) writes:
>
>> With natbib, it is possible to give a pre-note and a post-note to the
>> citation as a whole, but not to individual citations within it.  In
>> order to support your syntax fully, I think BibLaTeX is needed.
>
> OK, good to know.
>
>>> (Also, do you think it is important to support plain BibTeX at all?  It
>>> seems like we should not bother with this problem unless it's important
>>> for a lot of people.  I personally would be fine with just targeting
>>> BibLaTeX, and it sounds like Eric would be too.)
>>
>> Well, one benefit of Aaron's function was to make this choice
>> superfluous, both now and in the future.  It binds the two citation
>> commands you've implemented to citation commands implemented in
>> CITATION_STYLE.  As Aaron notes, it should be easy to modify this (to
>> bind additional commands) when advanced citation support comes along.
>
> I think I have to retract what I said earlier: I doubt this part of
> Aaron's code still works in my branch, because I think Aaron was
> assuming citation objects contain just one reference; in my branch, I've
> merged in the parser support Nicolas later implemented for multi-cite
> citations.  So a CITATION_MODE needs to know how to turn a list of
> works, each with associated prefix and suffix data, into a complete
> citation command.
>
> This complicates things enough that probably custom citation modes
> should be defined as Lisp functions, rather than via format
> strings...what do you think?
>
> I'm still having a hard time seeing what an analogous customization
> would look like for non-LaTeX backends.  The LaTeX exporter is unique in
> that Org produces output which must then be further processed by another
> tool, so having customizable control over how a citation `looks' to that
> tool makes sense.  But in other backends, the Org exporter itself
> produces the final document; there's no intermediate representation
> besides Org's own, plus whatever arguments are passed to a citation
> processing tool like org-citeproc.  So, if that's right, the analogous
> customization in a non-LaTeX backend would be something like a filter,
> one that pre-processes citation objects before they are run through the
> external tool, or that post-processes the strings that come back (or
> both).  Does that make sense?  Certainly, both of those things are
> possible.

Yes, I think an export filter would work for LaTeX.

The general form for BibLaTeX is:

\cites(⟨multiprenote⟩)(⟨multipostnote⟩)[⟨prenote⟩][⟨postnote⟩]{⟨key⟩}...[⟨prenote⟩][⟨postnote⟩]{⟨key⟩}

where \cites can also be \parencites, \textcites, etc.

For natbib it is:

\cite[⟨prenote⟩][⟨postnote⟩]{⟨key⟩,...⟨key⟩}

where \cite can also be \citep, \citet, etc.


>> Typically, a bibliography style file defines several citation commands,
>> which might belong to one or more modes.  ...
>> I think you might be able to merge CSL_FILE and CITATION_STYLE, since
>> they both point to a style file.
>
> OK, I see, that makes things clearer.  Would it make sense to have two
> keywords, say LATEX_CITE_STYLE and CSL_FILE or similar, so that the
> style can vary independently when exporting to LaTeX vs. non-LaTeX?  I'm
> thinking it will be tricky to come up with a single set of values for a
> CITATION_STYLE keyword that can be correctly mapped to both kinds of
> backend.  Or maybe CITATION_STYLE should have "sub"-keywords, like
>
> #+CITATION_STYLE: biblatex:authoryear csl:chicago-author-date.csl

Won't the backends sort this out without the additional mapping?

All the best,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com

  reply	other threads:[~2015-04-01 19:41 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 [this message]
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
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=m2zj6rvdpj.fsf@tsdye.com \
    --to=tsd@tsdye.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=richard.lawrence@berkeley.edu \
    /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).