From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/418 Path: news.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: textual citation Date: Fri, 12 Nov 2010 19:38:06 -0800 Message-ID: <20101113033806.GA27595@protagoras.phil.berkeley.edu> References: <20101111014927.GP24988@eeepc.istitutocolli.org> <20101112063622.GA8676@protagoras.phil.berkeley.edu> <20101112084314.GA15038@protagoras.phil.berkeley.edu> <20101113011105.GJ19143@eeepc.istitutocolli.org> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1289619644 26106 80.91.229.12 (13 Nov 2010 03:40:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 13 Nov 2010 03:40:44 +0000 (UTC) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncCO38oIeaEBCtkfjmBBoEUBO6dw-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sat Nov 13 04:40:40 2010 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-px0-f186.google.com ([209.85.212.186]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PH6yj-00068b-Vj for gtp-pandoc-discuss@m.gmane.org; Sat, 13 Nov 2010 04:40:38 +0100 Original-Received: by pxi7 with SMTP id 7sf1347605pxi.3 for ; Fri, 12 Nov 2010 19:40:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:x-beenthere:received:received:received :received:received-spf:received:received:date:from:to:subject :message-id:references:mime-version:in-reply-to:x-pgp-key:user-agent :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :sender:list-subscribe:list-unsubscribe:content-type :content-disposition; bh=9bopSIiSg64MbOY0l5i68IYWJf1cRdIMQAMt4glZptI=; b=MdSlB7SxVScqQhArMK2t+fq9XT2eakxOmNup2997IFlFw7SO6A8evAOb+W8n0RUHuu QP+n0jtOuNjB0zwoQcVj6TJrRgEZPqoilJACNUOKUGaJhgoyrOEo5l+YAc2JNXEVHV25 F3+Rrb9Ek++B4bo9UQQ/pJp/Sd/wMdmFWQ2Bw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:date:from:to:subject:message-id:references :mime-version:in-reply-to:x-pgp-key:user-agent:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe:content-type:content-disposition; b=LKK6gBlJXx46MTnYIoIBEht8yKePD/uG9u3x8W+24okEBpY10pnDfflEBPgGbganVK 8ueu3hqWC/wm3858qYNBMa/JV4BjAjTXBdbImdaSh+n0CZj/D2XwjZekxZNUecZAdlah dey5wsC1FS1C08WVKatSK/JqSYVezb5Fu0+nw= Original-Received: by 10.142.150.9 with SMTP id x9mr190083wfd.40.1289619629851; Fri, 12 Nov 2010 19:40:29 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.142.6.9 with SMTP id 9ls5032057wff.3.p; Fri, 12 Nov 2010 19:40:29 -0800 (PST) Original-Received: by 10.142.83.1 with SMTP id g1mr1850406wfb.35.1289619629372; Fri, 12 Nov 2010 19:40:29 -0800 (PST) Original-Received: by 10.142.83.1 with SMTP id g1mr1850405wfb.35.1289619629340; Fri, 12 Nov 2010 19:40:29 -0800 (PST) Original-Received: from cm05fe.IST.Berkeley.EDU (cm05fe.IST.Berkeley.EDU [169.229.218.146]) by gmr-mx.google.com with ESMTP id y8si6519440wfj.5.2010.11.12.19.40.29; Fri, 12 Nov 2010 19:40:29 -0800 (PST) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 169.229.218.146 as permitted sender) client-ip=169.229.218.146; Original-Received: from protagoras.phil.berkeley.edu ([128.32.137.142]) by cm05fe.ist.berkeley.edu with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (auth plain:jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org) (envelope-from ) id 1PH6ya-0000Ch-Gi for pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; Fri, 12 Nov 2010 19:40:29 -0800 Original-Received: by protagoras.phil.berkeley.edu (Postfix, from userid 1000) id 87D94131777; Fri, 12 Nov 2010 19:38:06 -0800 (PST) In-Reply-To: <20101113011105.GJ19143-j4W6CDmL7uNdAaE8spi6tJZpQXiuRcL9@public.gmane.org> X-PGP-Key: http://johnmacfarlane.net/jgm.asc User-Agent: Mutt/1.5.20 (2009-06-14) X-Original-Sender: fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 169.229.218.146 as permitted sender) smtp.mail=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: List-Post: , List-Help: , List-Archive: Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-Subscribe: , List-Unsubscribe: , Content-Disposition: inline Xref: news.gmane.org gmane.text.pandoc:418 Archived-At: +++ Andrea Rossato [Nov 13 10 02:11 ]: > On Fri, Nov 12, 2010 at 12:43:14AM -0800, John MacFarlane wrote: > > OK, I've pushed changes to the markdown reader integrating > > the new format for textual citations. > > I did not read the parser, but there are a few problems. I created > this example which should expose some of them. Turns out there were many problems with the parser! I've fixed the ones I found. The tests now pass, except for the issue about @nonexistent. More tests would be good. A couple of issues: 1. What to do about nonexistent keys? Currently the parser checks keys only when they're in initial in-text position (i.e. not within brackets). That's why, in the tests, '@nonexistent' comes across as '@nonexistent', while '[@nonexistent]' gives 'Anon. (error)' or something like that. Of course, it seems inconsistent to check keys when they don't occur within []s, but not when they do. The rationale was this: * If I don't check keys outside of brackets, we may get things treated as citations when they shouldn't be. Maybe this isn't a great concern; but then again, people do sometimes use @ at the beginning of a word. * If I do check all the keys inside of brackets, then there's the question what to do if some are found but not others. Do we return a Cite, or not? What do we do about the non-found keys? So I wasn't sure what to do here. 2. As we discussed before, I'd like to make prefix and locator have type [Inline] rather than String. Is this doable on the citeproc-hs side? I think it would have many advantages (and, keeping them as raw strings has some disadvantages). John