public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: John MacFarlane <fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: pandoc/citeproc issues: multiple bibliographies, nocite, citeonly
Date: Tue, 23 Nov 2010 21:06:32 -0800	[thread overview]
Message-ID: <20101124050631.GA28014@protagoras.phil.berkeley.edu> (raw)
In-Reply-To: <20101124033315.GC25133-nFAEphtLEs+AA6luYCgp0U1S2cYJDpTV9nwVQlTi/Pw@public.gmane.org>

+++ 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
> > >>
> > >><references />
> > >>
> > >>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
> > 
> >     <reference>
> >     some config
> >     </reference>
> > 
> > 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
<references /> 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


  parent reply	other threads:[~2010-11-24  5:06 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-21 19:32 John MacFarlane
     [not found] ` <20101121193229.GB25657-nFAEphtLEs+AA6luYCgp0U1S2cYJDpTV9nwVQlTi/Pw@public.gmane.org>
2010-11-21 21:46   ` Bruce
     [not found]     ` <0ebd5c02-7660-4f20-8da0-ee93a034850a-bhUrjG+0PUy4o898BNfOI1YGCWtFR9XvQQ4Iyu8u01E@public.gmane.org>
2010-11-22 16:02       ` Nathan Gass
     [not found]         ` <4CEA93FE.8070502-8UOIJiGH10pyDzI6CaY1VQ@public.gmane.org>
2010-11-22 16:36           ` John MacFarlane
2010-11-21 23:26   ` Tillmann Rendel
     [not found]     ` <4CE9AABB.1070705-jNDFPZUTrfTbB13WlS47k8u21/r88PR+s0AfqQuZ5sE@public.gmane.org>
2010-11-24  1:29       ` Nathan Gass
     [not found]         ` <4CEC6A61.1000309-8UOIJiGH10pyDzI6CaY1VQ@public.gmane.org>
2010-11-24  3:33           ` John MacFarlane
     [not found]             ` <20101124033315.GC25133-nFAEphtLEs+AA6luYCgp0U1S2cYJDpTV9nwVQlTi/Pw@public.gmane.org>
2010-11-24  5:06               ` John MacFarlane [this message]
     [not found]                 ` <20101124050631.GA28014-nFAEphtLEs+AA6luYCgp0U1S2cYJDpTV9nwVQlTi/Pw@public.gmane.org>
2010-11-24 20:51                   ` Andrea Rossato
     [not found]                     ` <20101124205114.GB23284-j4W6CDmL7uNdAaE8spi6tJZpQXiuRcL9@public.gmane.org>
2010-11-25  7:42                       ` John MacFarlane
     [not found]                         ` <20101125074240.GC12387-nFAEphtLEs+AA6luYCgp0U1S2cYJDpTV9nwVQlTi/Pw@public.gmane.org>
2010-11-25  8:09                           ` Andrea Rossato
     [not found]                             ` <20101125080907.GD23284-j4W6CDmL7uNdAaE8spi6tJZpQXiuRcL9@public.gmane.org>
2010-11-27 15:23                               ` John MacFarlane
     [not found]                                 ` <20101127152352.GB535-nFAEphtLEs+AA6luYCgp0U1S2cYJDpTV9nwVQlTi/Pw@public.gmane.org>
2010-11-27 19:01                                   ` Andrea Rossato
     [not found]                                     ` <20101127190139.GE32527-j4W6CDmL7uNdAaE8spi6tJZpQXiuRcL9@public.gmane.org>
2010-11-27 19:34                                       ` John MacFarlane
2010-11-29 23:45                   ` Nathan Gass
     [not found]                     ` <4CF43B30.9050400-8UOIJiGH10pyDzI6CaY1VQ@public.gmane.org>
2010-12-01  3:25                       ` John MacFarlane
     [not found]                         ` <20101201032556.GA28952-nFAEphtLEs+AA6luYCgp0U1S2cYJDpTV9nwVQlTi/Pw@public.gmane.org>
2010-12-01 13:03                           ` Andrea Rossato
     [not found]                             ` <20101201130317.GI10338-j4W6CDmL7uNdAaE8spi6tJZpQXiuRcL9@public.gmane.org>
2010-12-01 16:00                               ` John MacFarlane
     [not found]                                 ` <20101201160037.GC3038-nFAEphtLEs+AA6luYCgp0U1S2cYJDpTV9nwVQlTi/Pw@public.gmane.org>
2017-07-27  8:18                                   ` siram.berlin-Re5JQEeQqe8AvxtiuMwx3w
     [not found]                                     ` <9802cbc1-fa98-43f9-b42b-b7781066f375-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-07-30 20:57                                       ` John MacFarlane
2020-11-19 13:14                                       ` Pranesh Prakash
     [not found]                                         ` <19e3868a-6e4e-42a3-8636-75a95e925946n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-11-20  8:50                                           ` AW: " denis.maier-FfwAq0itz3ofv37vnLkPlQ
2010-11-22 23:21   ` Andrea Rossato
     [not found]     ` <20101122232135.GG13438-j4W6CDmL7uNdAaE8spi6tJZpQXiuRcL9@public.gmane.org>
2010-11-23  6:30       ` John MacFarlane
     [not found]         ` <20101123063011.GD8500-nFAEphtLEs+AA6luYCgp0U1S2cYJDpTV9nwVQlTi/Pw@public.gmane.org>
2010-11-23 10:04           ` Nathan Gass
     [not found]             ` <4CEB91AA.5050801-8UOIJiGH10pyDzI6CaY1VQ@public.gmane.org>
2010-11-23 15:58               ` John MacFarlane
2010-11-23 18:39               ` Bruce
     [not found]                 ` <68cb6920-d51b-4139-913b-4ca4e96e160c-LFpOzkg5VSKSsatCSt0dimB/v6IoIuQBVpNB7YpNyf8@public.gmane.org>
2010-11-23 19:02                   ` John MacFarlane

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101124050631.GA28014@protagoras.phil.berkeley.edu \
    --to=fiddlosopher-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).