Andrea Rossato | 3 Dec 2010 15:18
Picon

Re: Re: textual citation

On Thu, Dec 02, 2010 at 10:09:48PM -0800, John MacFarlane wrote:
> +++ John MacFarlane [Dec 02 10 21:57 ]:
> > +++ John MacFarlane [Dec 01 10 08:17 ]:
> > > +++ Andrea Rossato [Dec 01 10 14:06 ]:
> > > > On Mon, Nov 29, 2010 at 05:10:59PM +0100, Andrea Rossato wrote:
> > > > > On Sun, Nov 28, 2010 at 08:16:12AM -0800, John MacFarlane wrote:
> > > > > > diff --git a/tests/markdown-citations.ieee.html b/tests/markdown-citations.ieee.
> > > > > > index 7c7d811..f076a46 100644
> > > > > > --- a/tests/markdown-citations.ieee.html
> > > > > 
> > > > > > -  >,  Cambridge: Cambridge University Press, 2005.</p
> > > > > > +  >, Cambridge: Cambridge University Press, 2005.</p
> > > > > 
> > > > > > -  >,  vol. 6, 2006, pp. 33–34.</p
> > > > > > +  >, vol. 6, 2006, pp. 33–34.</p
> > > > > 
> > > > > > -  >, Smith,  S., Ed.,  Oxford: Oxford University Press, 2007.</p
> > > > > > +  >, Smith, S., Ed., Oxford: Oxford University Press, 2007.</p
> > > > > 
> > > > > 
> > > > > This is a bug in the ieee style and I'm really puzzled. It seems like
> > > > > CSL processors should get rid of extra-spaces thus permitting the kind
> > > > > of stupid bugs this style shows. Or at least this was what I intended
> > > > > and coded. I've contacted the CSL guys on that:
> > > > > 
> > > > > http://sourceforge.net/mailarchive/forum.php?thread_name=20101129153947.GB20563%40eeepc.istitutocolli.org&forum_name=xbiblio-devel
> > > > 
> > > > I do not know if you are a xbiblio-devel subscriber and/or had the
> > > > time and the opportunity to have a look at the thread my post
> > > > generated in the CSL community.
> > > > 
> > > > If yes I'd like to know your opinion, at least with regards to what
> > > > pandoc's approach should be.
> > > 
> > > Interesting thread.  Although I lean towards your view that the
> > > processor shouldn't cover up errors in the styles, I also see Frank's
> > > point:  the buggy styles are already being used by lots of people,
> > > and it would break things to change how citeproc-js handles them.
> > > 
> > > If there's to be a transition to the stricter behavior, it seems
> > > it would have to come in phases:  first introduce a testing
> > > version of citeproc-js that is strict, PLUS a tool or test suite
> > > to check for problems in existing styles.  After people had some
> > > time to clean up existing styles, perhaps the strict behavior could
> > > be made standard.
> > > 
> > > For our purposes, I think the pragmatic thing to do would be to
> > > imitate citeproc-js and collapse double spaces, so that people could
> > > use the existing styles.  Is this a difficult thing to do in
> > > citeproc-hs?  (Note that in Text.Pandoc.Shared there is already
> > > a function normalizeSpaces, which could simply be called on the
> > > final list of Inlines.*)  One could develop a different tool
> > > to make evident spaces bugs in the styles, until the spec was
> > > clarified one way or the other.
> > 
> > PS. Here's a patch to citeproc-hs that collapses adjacent spaces
> > in pandoc output:
> > 
> > hunk ./src/Text/CSL/Output/Pandoc.hs 131
> > -    | Str " "   <- i  = Space          : cleanStrict is
> > +    | is_space i      = Space          : cleanStrict (dropWhile is_space is)
> > hunk ./src/Text/CSL/Output/Pandoc.hs 135
> > +  where is_space Space    = True
> > +        is_space (Str "") = True
> > +        is_space _        = False
> > 
> > When I applied this patch, all the pandoc test cases passed.
> > I know you may object to this on philosophical grounds, though.
> 
> I found another odd case with the mhra style.
> 
>     pandoc --biblio tests/biblio.bib --csl tests/mhra.csl -t markdown
>      <at> item3 says...
>     ^D
>     John Doe and Jenny Roeed by Sam Smith[^1] says...
>     
>     Doe, John, and Jenny Roe, ‘Why Water Is Wet’, in *Third Book*, ed
>     by Sam Smith (Oxford: Oxford University Press, 2007).
>     
>     [^1]:
>         ‘Why Water Is Wet’, in *Third Book*,  (Oxford: Oxford University
>         Press, 2007).
> 
> The odd part is:  "JohnDoe and Jenny Roeed by Sam Smith[^1]"
> Presumably "ed by Sam Smith" should not be there...
> 
> Is this a bug in the style or in citeproc?

It seems a citeproc-hs bug, something I had not thought about when
coding the suppress-author option. "ed by Sam Smith" should not be
there.

I'll take care of it.

Andrea

--

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To post to this group, send email to pandoc-discuss@...
To unsubscribe from this group, send email to pandoc-discuss+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pandoc-discuss?hl=en.


Gmane