[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] org-cite and org-citeproc
From: |
Thomas S. Dye |
Subject: |
Re: [O] org-cite and org-citeproc |
Date: |
Wed, 01 Apr 2015 09:41:12 -1000 |
Aloha Richard,
Richard Lawrence <address@hidden> writes:
> Hi Tom and all,
>
> Thanks for answering my questions!
>
> address@hidden (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