From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/524 Path: news.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: pandoc/citeproc issues: multiple bibliographies, nocite, citeonly Date: Tue, 23 Nov 2010 21:06:32 -0800 Message-ID: <20101124050631.GA28014@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> 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 1290575208 11482 80.91.229.12 (24 Nov 2010 05:06:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 24 Nov 2010 05:06:48 +0000 (UTC) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncCO38oIeaEBDaurLnBBoEh0TSlw-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Nov 24 06:06:44 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 1PL7Z5-0002uI-7J for gtp-pandoc-discuss@m.gmane.org; Wed, 24 Nov 2010 06:06:43 +0100 Original-Received: by pxi7 with SMTP id 7sf940399pxi.3 for ; Tue, 23 Nov 2010 21:06:41 -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=o+P8YL0lO/CLtGwvBWK7rPaHE+spcczGv8/Y76rJGp0=; b=cEhhvWhyZSVYXRLIVSFZ7LeV1AWDRAT3lY6e0/4KoXJ3yw351GKi2lXTpMQRoBVOaX n1LJBWDRz7ONyOSUSuzP1TUNbRBz6Pa2vx5RxjAlwuqjwGo7mb29PHBEcLc1/FaTj6H3 sNBO+dGtlMbVHu1105Jy0y5bYdigxf3mhoPFA= 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=2KaYj9LGBCtkZOZgxy6ZKUbdyh7XKIRPhZc8Q/ha57WxtpEkyLxOqSkgCMWGHHiJ2e C+IAn46prM7dg6Crjz401CI8MVnL7DduvA0OtWNbkjNbThBqwIeZGe4PwctnoX2YjzEl gxu81cXQF18ce/PBxRyuykRyZiH6556zmSJlg= Original-Received: by 10.142.152.27 with SMTP id z27mr287464wfd.18.1290575194851; Tue, 23 Nov 2010 21:06:34 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.142.78.15 with SMTP id a15ls422969wfb.2.p; Tue, 23 Nov 2010 21:06:34 -0800 (PST) Original-Received: by 10.142.210.2 with SMTP id i2mr5198893wfg.45.1290575194258; Tue, 23 Nov 2010 21:06:34 -0800 (PST) Original-Received: by 10.142.210.2 with SMTP id i2mr5198891wfg.45.1290575194229; Tue, 23 Nov 2010 21:06:34 -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 y8si10037077wfj.5.2010.11.23.21.06.34; Tue, 23 Nov 2010 21:06:34 -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 1PL7Yu-0000Yz-HC for pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; Tue, 23 Nov 2010 21:06:33 -0800 Original-Received: by protagoras.phil.berkeley.edu (Postfix, from userid 1000) id 2A1BA1317C2; Tue, 23 Nov 2010 21:06:32 -0800 (PST) In-Reply-To: <20101124033315.GC25133-nFAEphtLEs+AA6luYCgp0U1S2cYJDpTV9nwVQlTi/Pw@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:524 Archived-At: +++ John MacFarlane [Nov 23 10 19:33 ]: > +++ Nathan Gass [Nov 24 10 02:29 ]: > > On 22.11.10 00:26, Tillmann Rendel wrote: > > >John MacFarlane wrote: > > >>There's a proposal at > > >> > > >>http://gitit.net/PandocCitationGrammar > > >> > > >>that would address (2-4) by requiring the user to put an explicit > > >> > > >> > > >> > > >>tag where the bibliography goes;[...] > > > > > >I like the idea of explicitly specifying where the bibliography goes. I > > >don't like that syntax too much, however, because > > > > > >(a) it is HTML-focused, so it might look awkward in LaTeX-target > > >markdown files with lots of literal LaTeX code > > > > > >(b) it looks like literal HTML, but is actually (pandoc extended) > > >markdown, which might be confusing > > > > I just wanted to add that I completely agree here. I find syntax > > which looks like html, but actually is not pass-through html but > > special markdown syntax confusing. > > > > > > > > > > >I had a similar problem in my use of pandoc. I want to insert > > >system-generated content, such as a table of contents, at a specific > > >point in the document. So I decided to write a script which replaces a > > >whole section (or subsection etc.) with system-generated content, based > > >on the name of the section. So for example, the snippet: > > > > > >Table of Contents > > >================= > > > > > >It doesn't matter what you write here > > > > > >Introduction > > >============ > > > > > >would get translated to something like: > > > > > >\tableofcontents > > >\section{Introduction} > > > > > >I think this would work well for references, too. > > > > > > > > >The main benefit is that one can use the input format's syntax for > > >headings to specify "special sections" like table of contents or > > >references. The input document therefore looks natural. (One could even > > >have one's editor and pandoc automatically fill in the section content > > >with a textual version of the system-generated data, for some kind of > > >semi-WYSIWYG effect). > > > > > >The main drawback is that the name of the section is relevant, so this > > >introduces a language dependency. For my scripts, I just have a > > >command-line flag for the various special sections: > > > > > >"--toc=Table of Contents" > > > > > > > Other possibilities would be to add some label syntax, similar to > > the \label{} of latex, to just recognize most or even all possible > > headers for such a section, or use a special code block, which is at > > least clearly markdown syntax. Actually, when I think about it, the > > last one strikes me as a very good alternative. So instead of > > > > > > some config > > > > > > we simply use > > > > ~~~~~~~~~~ {.reference} > > some config > > ~~~~~~~~~~ > > > I'm open to suggestions other than the HTMLish syntax. But I don't > think this is obviously better. For one thing, it looks like a code > block. And we'd have to implement some mini-language inside the > block to specify the includes, excludes, source, etc. If we use > XML, we're using something that's already familiar. > > One possibility would be a special attribute on a header: > > # Works cited {.bibliography src="mybib.json"} > > # References {.bibliography src="foo.bib" include="item2,item3" > omit="item4" if-year="1999" only-if-type="primary"} PS. I'm sorely tempted to put off implementing these complexities til later, and release a simple version of pandoc/citeproc that just constructs a bibliography of works cited in the document and puts them at the end, more or less the way it does now. The one twist I'd add would be this: the bibliography is inserted only if the document ends with a Header. That way you could suppress the bibliography by not ending with a Header. We could keep this convention later even if we implemented a element. So existing documents would not break. What we'd be missing: - ability to have multiple bibliographies - ability to include works not cited in bibliographies - ability to suppress works cited in bibbliographies - ability to filter bibliographies by fields (e.g. source=primary) These things would be nice for some users, but they add a lot of complexity and could be implemented later. Note: users who want to style the bibliography could still do so. Just specify --section-divs and the section containing the bibliography (the section at the end of the document) will be put in a div with its own id. John