From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/577 Path: news.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: pandoc/citeproc issues: multiple bibliographies, nocite, citeonly Date: Wed, 1 Dec 2010 08:00:38 -0800 Message-ID: <20101201160037.GC3038@protagoras.phil.berkeley.edu> References: <20101121193229.GB25657@protagoras.phil.berkeley.edu> <4CE9AABB.1070705@informatik.uni-marburg.de> <4CEC6A61.1000309@trizeps.ch> <20101124033315.GC25133@protagoras.phil.berkeley.edu> <20101124050631.GA28014@protagoras.phil.berkeley.edu> <4CF43B30.9050400@trizeps.ch> <20101201032556.GA28952@protagoras.phil.berkeley.edu> <20101201130317.GI10338@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 1291219477 22657 80.91.229.12 (1 Dec 2010 16:04:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 1 Dec 2010 16:04:37 +0000 (UTC) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncCO38oIeaEBCp4tnnBBoEv6B9ww-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Dec 01 17:04:30 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 1PNpAT-0004kK-Qk for gtp-pandoc-discuss@m.gmane.org; Wed, 01 Dec 2010 17:04:30 +0100 Original-Received: by pxi7 with SMTP id 7sf2576697pxi.3 for ; Wed, 01 Dec 2010 08:04:28 -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=Ln7Oke1YAXon6zYQ1/iKudU4HwGlh6njZvY3Yvluv8o=; b=lQBU5WhQXzsTO02XH0o5Z6owy5hXjaZhbXXn5fnhkRaBhDyIHDUr1o02Ig3B4P/fyx zhuUZDI3yushOp7c7vV0N7Sybpe+NbQiv1MZjej50g8XzNXvljFjBEy4rdC97L05kL7v FsVfSfHJGvxPrhrmFe47H4hpFa2ru6+AUOZTc= 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=JO0aP0Q6wlQdcqQEEQ2TX+ahdolZUDDFDRjZWIpDox7o18yFE8ZJiOcudWDzYDdcgs Sb63z4sPbPZ1FNN1drLNp+2K/f/i/AXntOLoUe1KcOSetuHBMUyZT3CCKlMLXxI1xv+L hBY7u3Um25ZbcXqruMB9HNOFxSCP1xDemZDtg= Original-Received: by 10.142.250.38 with SMTP id x38mr382266wfh.24.1291219241029; Wed, 01 Dec 2010 08:00:41 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.142.249.41 with SMTP id w41ls11834755wfh.1.p; Wed, 01 Dec 2010 08:00:40 -0800 (PST) Original-Received: by 10.142.142.5 with SMTP id p5mr5914067wfd.3.1291219240567; Wed, 01 Dec 2010 08:00:40 -0800 (PST) Original-Received: by 10.142.142.5 with SMTP id p5mr5914066wfd.3.1291219240529; Wed, 01 Dec 2010 08:00:40 -0800 (PST) Original-Received: from cm03fe.IST.Berkeley.EDU (cm03fe.IST.Berkeley.EDU [169.229.218.144]) by gmr-mx.google.com with ESMTP id y8si128750wfj.5.2010.12.01.08.00.40; Wed, 01 Dec 2010 08:00:40 -0800 (PST) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 169.229.218.144 as permitted sender) client-ip=169.229.218.144; Original-Received: from protagoras.phil.berkeley.edu ([128.32.137.142]) by cm03fe.ist.berkeley.edu with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (auth plain:jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org) (envelope-from ) id 1PNp6k-0004Lc-AY for pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; Wed, 01 Dec 2010 08:00:39 -0800 Original-Received: by protagoras.phil.berkeley.edu (Postfix, from userid 1000) id 171B81317C2; Wed, 1 Dec 2010 08:00:38 -0800 (PST) In-Reply-To: <20101201130317.GI10338-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.144 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:577 Archived-At: +++ Andrea Rossato [Dec 01 10 14:03 ]: > On Tue, Nov 30, 2010 at 07:25:56PM -0800, John MacFarlane wrote: > > I guess I'm tempted to: > > - allow multiple bibliographies > > That would be easy, indeed. > > > - specify the source file in the markdown text, as above > > keep in mind that multiple bibliographic databases should be allowed > (for instance to mix bibtex and json data). > > > I'm not positive this will work, though. As I mentioned, there are technical > > hurdles to having the bibliography file specified in the text. The markdown > > reader itself can't do IO, so it can't read the file. So we can't read the > > bibliography (or even verify that it can be found) until we've parsed the > > markdown source. That means that we can't check potential citations as we > > parse, to see if they're in the bibliography; instead, we have to parse > > everything that might be a citation as a citation. But what if we have a > > citation with id "foo" (from "@foo" in the text), but the bibliography > > contains no corresponding item? Then we need to reinsert the literal text. > > It's easy enough to generate "@foo" from a Cite inline, but what if the Cite > > was generated by parsing latex + bibtex? This gets complicated. > > > > I did think of one solution, which I'd like to get Andrea's feedback on (as > > it might require citeproc changes). Currently when we parse a citation, we > > just leave the [Inline] part empty; this gets filled in by citeproc when it > > processes the citations with the bibliography. > > > > My suggestion: instead of leaving it empty, fill in the [Inline] part of the > > Cite with the literal text that should be included in the document if the > > citation isn't found in the database. This way, if citeproc doesn't find the > > item, it can simply leave the Cite alone (rather than raising an error). That > > seems simple; it just adds a bit of complexity to the parsers, which have to > > generate the "replacement text" when they parse a Cite. > > > > Thoughts? > > That would be fine with me. But I just wanted to let you know, though, > that I modified citeproc so that, when a citation is not found in the > bibliographic data, an error is emitted: > > "[CSL BIBLIOGRAPHIC DATA ERROR: reference " ++ show (citationId c) ++ " not found.]" This is fine the way the code currently works, since pandoc *shouldn't* be passing citations that aren't in the bibliography to citeproc. But it would have to be changed if we did things the way I sketched above. With this approach, citeproc would simply leave Citations alone if the entry was not found. (There might be difficulties I'm not anticipating; I don't know the code.) > I don't know if this is going to solve your problem. > > More generally I'd prefer the metadata approach you were talking > about. If this requires more time to get mature I think we could now > stick with the present approach: a single bibliography automatically > added at the end of the Pandoc document, and multiple bibliographic > databases via the command line --bibliography option. > > That would leave us free to take every possible path for implementing > multiple bibliographies and for setting the source biblio data in the > source document. The only drawback I see to proceeding this way is that these future changes would require changes in existing documents, unless we kept the --bibliography option in addition to whatever mechanism we come up with for multiply bibliographies and in-text specification of the source files. But maybe we could just do that: keep --bibliography for legacy files. That would allow us to do a release sooner, without settling all of these issues. John