From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Citations, continued Date: Sat, 07 Feb 2015 23:43:07 +0100 Message-ID: <87y4o9s5qc.fsf@nicolasgoaziou.fr> References: <87vbjmn6wy.fsf@berkeley.edu> <87sieokx8e.fsf@berkeley.edu> <54d04780.cb58460a.5243.2603@mx.google.com> <87h9v3li8t.fsf@berkeley.edu> <54d078ff.b044440a.06ec.3cf6@mx.google.com> <87d25rkmag.fsf@berkeley.edu> <54d1bc7b.c57d440a.3c5d.2dca@mx.google.com> <87vbjh284z.fsf@nicolasgoaziou.fr> <87mw4tk4m7.fsf@berkeley.edu> <87oap7z664.fsf@nicolasgoaziou.fr> <87fvaibr3k.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]:35965) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKE4l-0004d3-VY for emacs-orgmode@gnu.org; Sat, 07 Feb 2015 17:42:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YKE4g-0007Su-VY for emacs-orgmode@gnu.org; Sat, 07 Feb 2015 17:42:07 -0500 Received: from relay6-d.mail.gandi.net ([2001:4b98:c:538::198]:54144) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKE4g-0007P9-MG for emacs-orgmode@gnu.org; Sat, 07 Feb 2015 17:42:02 -0500 In-Reply-To: <87fvaibr3k.fsf@berkeley.edu> (Richard Lawrence's message of "Fri, 06 Feb 2015 14:41:19 -0800") 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: >> Since full citations can only exist in a bracketed citation, there is no >> reason to create a third object type for the latter. It acts as a mere >> container only useful for lexer. > > I think this is not quite right: in my original terminology, `individual > citation' is just an intermediate category. A bracketed/full citation > contains at least one, but may contain many, `individual' citations, > like: > > [See @Doe99, p. 3; also @Doe2000, p. 989.] > > This is a bracketed/full citation containing two individual citations, > each with their own prefix and suffix. You're right. I was confused about citations. > I do think it's important to allow some markup in the prefix and suffix, > because there are obvious uses where you might want emphasis, etc. > > My initial thought is that a prefix or suffix should only allow: > - Entities and LaTeX fragments > - Line breaks? > - Macros > - Text markup > > I'd also be happy without macros and line breaks, personally. Fine. What about the following set? bold code entity italic latex-fragment line-break strike-through=20 subscript superscript underline superscript >> That's why I suggested the [cite: ...] part in the first place, which >> you dismissed quickly. It reduces backtracking a lot and can solve >> easily some confusing situations. >> >> Of course I understand the need for compatibility with existing Pandoc >> syntax, but I wouldn't want us to shoot ourselves in the foot. Even if >> we don't use "cite:" markup, I think we should carefully specify current >> syntax to avoid loopholes. > > Another interesting thing I learned from the Pandoc source is that, > should we want to adopt "[cite: ...]" syntax, I think it would be pretty > trivial for Pandoc to support it. (Worst case, they can copy-and-paste > the Markdown citation parser and then add "cite:" in a couple of > places.) So if this is necessary on the Org side for performance or > ambiguity reasons, I am not against it. > > One question, though, is how this should work with in-text citations. > Should I have to write: > > @Smith99 [cite:p. 33] > > or > > @Smith99 [cite:p. 33; see also @Doe2014] > > ? To be clear, much like Rasmus, I don't like much in-text citations syntax above. Actually, I would suggest to mimic footnotes, and handle in-text citations with the same syntax as named footnotes. Using the example from Erik Hetzner in the same thread, what about: 1. [cite:@item1] says blah. 2. [cite:@item1: p. 30] says blah. 3. [cite:@item1: p. 30, with suffix] says blah. 4. [cite:@item1: -@item2 p. 30; see also @item3] says blah. 5. A citation group [cite:: see @item1 p. 34-35; also @item3 chap. 3]. 6. Another one [cite::see @item1 p. 34-35]. 7. Citation with a suffix and locator [cite:: @item1 pp. 33, 35-37, and n= owhere else]. 8. A citation without locators [cite:: @item3]. 9. Citation with suffix only [cite:: @item1 and nowhere else]. 10. Like a citation without author: [cite:: -@item1], and now Doe with a locator [cite:: -@item2 p. 44]. As a reminder, here is a possible output from the text above 1. Doe (2005) says blah. 2. Doe (2005, 30) says blah. 3. Doe (2005, 30, with suffix) says blah. 4. Doe (2005; 2006, 30; see also Doe and Roe 2007) says blah. 5. A citation group (see Doe 2005, 34=E2=80=9335; also Doe and Roe 2007= , chap. 3). 6. Another one (see Doe 2005, 34=E2=80=9335). 7. Citation with a suffix and locator (Doe 2005, 33, 35=E2=80=9337, and= nowhere else). 8. A citation without locators (Doe and Roe 2007). 9. Citation with suffix only (Doe 2005 and nowhere else). 10. Like a citation without author: (2005), and now Doe with a locator (= 2006, 44). Note that space after the second colon is not mandatory. More explicitly, syntax would be either [cite:IN-TEXT-KEY] or [cite:IN-TEXT-KEY?:SPACE* CITATIONS] where CITATIONS is any number of PREFIX? KEY SUFFIX?=20 separated with semi-colons. It is slightly more verbose, but also more regular and faster to parse. Regards,