From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: org-cite and org-citeproc Date: Tue, 31 Mar 2015 14:41:25 -1000 Message-ID: References: <87twx5hs2x.fsf@berkeley.edu> <871tk560p3.fsf@delle7240.chemeng.ucl.ac.uk> <878uedgeuq.fsf@berkeley.edu> <87iodh55b5.fsf@alphaville.usersys.redhat.com> <874mp0hlth.fsf@berkeley.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36367) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yd6j0-0004Ki-QA for emacs-orgmode@gnu.org; Tue, 31 Mar 2015 20:41:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yd6ix-0005M0-JE for emacs-orgmode@gnu.org; Tue, 31 Mar 2015 20:41:42 -0400 Received: from gproxy9-pub.mail.unifiedlayer.com ([69.89.20.122]:36205) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Yd6ix-0005LR-9m for emacs-orgmode@gnu.org; Tue, 31 Mar 2015 20:41:39 -0400 In-Reply-To: <874mp0hlth.fsf@berkeley.edu> (Richard Lawrence's message of "Tue, 31 Mar 2015 14:57:30 -0700") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Richard Lawrence Cc: emacs-orgmode@gnu.org Richard Lawrence writes: > Hi Tom and all, > > tsd@tsdye.com (Thomas S. Dye) writes: > >>> I know next to nothing about citations in general, so please bear with >>> me: if multi-cite support means being able to condense citations (e.g. >>> [1-3, 5, 9]), then bibtex can do at least some of that >>> (e.g. http://texblog.org/2007/05/28/mulitple-reference-citation/). >> >> Multiple citations with natbib are limited in the sense that individual >> citations within them don't carry pre- and post-notes. BibLaTeX does >> away with this restriction. > > Just to clarify: our syntax allows both pre- and post-notes for each > individual reference within a citation, plus common pre- and post-notes > for the citation as a whole. Is it only the latter which BibTeX does > not support? Or is it also that it can't handle pre- and post-notes for > individual references when there is more than one work cited? I don't > think I've ever tried to do something that complicated with plain BibTeX. IIUC, plain BibTeX just supports \cite, and it was the natbib style that introduced parenthetical, \citep, and text, \citet, citation commands. The corresponding commands in BibLaTeX styles are \parencite and \textcite. 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. > (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. >> The org-export-cite-add-citation-mode-latex function that Aaron Ecay >> wrote allows the author to choose (implicitly) which package to use. I >> like this design because it can accommodate new packages without changes >> to the Org mode code. >> >> ,-----------------------------------------------------------------------= -- >> | Your comment inspired me to implement=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 >> | org-export-cite-add-citation-mode-latex in the experimental citation= =20=20=20=20 >> | support I just pushed. So you can do:=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 >> |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 >> | (org-export-cite-add-citation-mode-latex "tsd"=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 >> | "\\mycitecommand[%s][%s]{%s}" "\\myparencitecommand[%s][%s]{%s}")=20= =20=20=20=20=20=20 >> |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 >> | Add to your document:=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20 >> |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 >> | #+CITATION_MODE: tsd=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20 >> |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 >> | And citations should just work with your chosen commands. I=E2=80=99m= sure when >> | advanced citation support comes along (whether from subtypes or plists= ), >> | a similarly simple wrapper can be implemented.=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 >> `-----------------------------------------------------------------------= -- >> >> I haven't found time to experiment with the citation developments or to >> read through the developing code base. Was this feature of Aaron's >> experimental support subsequently dropped? > > No, I haven't touched that part of the code, and as far as I know that > should still work. However, I also haven't been able to make sense of > how the CITATION_MODE and CITATION_STYLE keywords should work in > non-LaTeX backends, so my code doesn't make any use of them, either.=20=20 IIUC, CITATION_STYLE refers to the bibliography style file. CITATION_MODE makes it possible for an author using your syntax to get away from the Harvard mode citations that seem to be your target and use another mode such as the footnote citations common in the humanities. > If I understand correctly, the mode and the style are two pieces of > information that jointly determine how citations should be formatted. > The reason they are separated is that you can have multiple styles > associated with a mode (or is it the other way around?). Is it right to > say that in LaTeX, choosing a mode and a style determines both > which citation commands are available and what their behavior is? Typically, a bibliography style file defines several citation commands, which might belong to one or more modes. It sounds to me as if the CSL world conflates styles and modes, but I haven't looked closely. > In the CSL world, both of these pieces of information seem to be > determined by the choice of CSL stylesheet. Thus, I went with a single > keyword, CSL_FILE, to specify this information. I guess one could also > go the other way, and try to select a stylesheet based on CITATION_MODE > and CITATION_STYLE, but I wasn't sure how to do that. I also don't > really know if it would be useful to provide a notion of `custom modes' > outside of LaTeX; as far as I can see, all customization would just come > down to selecting a different stylesheet. But maybe I'm missing > something important? I think you might be able to merge CSL_FILE and CITATION_STYLE, since they both point to a style file. hth, Tom --=20 Thomas S. Dye http://www.tsdye.com