From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Lawrence Subject: Re: Citations, continued Date: Mon, 02 Feb 2015 09:25:04 -0800 Message-ID: <87wq40kyz3.fsf@berkeley.edu> References: <87vbjmn6wy.fsf@berkeley.edu> <87h9v6okq7.fsf@nicolasgoaziou.fr> <87ioflmgkc.fsf@berkeley.edu> <87h9v4o1ye.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50001) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIKlC-0001I8-UN for emacs-orgmode@gnu.org; Mon, 02 Feb 2015 12:26:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YIKl8-0001lB-8R for emacs-orgmode@gnu.org; Mon, 02 Feb 2015 12:26:06 -0500 Received: from plane.gmane.org ([80.91.229.3]:37204) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIKl8-0001ky-1T for emacs-orgmode@gnu.org; Mon, 02 Feb 2015 12:26:02 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YIKl4-0002mt-Oa for emacs-orgmode@gnu.org; Mon, 02 Feb 2015 18:25:58 +0100 Received: from c-67-169-117-151.hsd1.ca.comcast.net ([67.169.117.151]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Feb 2015 18:25:58 +0100 Received: from richard.lawrence by c-67-169-117-151.hsd1.ca.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Feb 2015 18:25:58 +0100 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: emacs-orgmode@gnu.org Hi Rasmus and all, Rasmus writes: > Richard Lawrence writes: >> Within a citation, each reference to an individual work needs to be >> capable of containing: >> 1) a database key that references the cited work >> 2) prefix / pre-text >> 3) suffix / post-text >> 4) references to page/chapter/section/whatever numbers and ranges. >> This is likely part of the prefix or suffix, but might be worth >> parsing separately for localization or link-following behavior. >> 5) a way of indicating backend-agnostic formatting properties. >> Examples of some properties users might want to specify are: > >> - displaying only some fields (or suppressing some fields) from a >> reference record (e.g., journal, date, author) > > Would this not be properties of the bibliography and not the citation? No, I mean things that can vary from one citation to the next -- like what you'd write in LaTeX as \citet{Doe99} once thought foo, but in his \citeyear{Doe2014}, he revises his position to bar. The second citation should only display the year, since the author's name has already been mentioned in the sentence. This type of formatting information would be nice to represent regardless of export backend. >> Citations as a whole also need: >> 6) [@6] a way of indicating formatting properties for specific export >> backends. > > I think the idea would be /not/ to have to consider specific backends. If > you want special properties (say bold) for HTML could it not be solved by > a macro or a filter? Probably I'm misunderstanding. I agree that we should probably want to minimize and segregate backend-specific formatting information, but it is inevitable that someone will need this ability; and I'm a `provide reasonable defaults, but also an escape hatch when you need it' kind of guy. The things I have in mind are things like telling the LaTeX backend to use a particular citation command for this citation, or the HTML backend to use/add a particular CSS class. Maybe this could be done with macros or filters, but I think that would prove complicated for all but the simplest cases, since citations have argument structure that filters might not necessarily `see'. >> In addition to the syntax of citations themselves, the Org document >> would also need to represent the following metadata to support >> citations: >> 7) [@7] a pointer to one or more backend reference databases, >> including in-document databases in org-bibtex format > > This would be a huge win. > >> 8) a reference to a citation style or style file > > How does this work outside of LaTeX? Well, Pandoc for example processes citations using the citeproc-hs implementation of the Citation Style Language, which is an XML format that allows describing how citations and bibliographies should be formatted. Thus, for example, you could tell Pandoc to process your citations in APA style, or any of the other styles in this repo: https://www.zotero.org/styles CSL is an XML format, and I shudder to think about implementing it in Elisp, but that's how its done. In fact, Pandoc uses this even for LaTeX output, rather than trying to map citations to the various \cite commands. >> 9) a reference to a locale file > > There's already a #+BIBLIOGRAPHY or #+REFERENCES in ox-bibtex.el. But > it's quite limited. Yes, I think we should leverage this but modify its syntax a bit. Best, Richard