flipflopping: two questions about the tests

Hi,

after implementing flipflopping I run into two minor issues with a
couple of tests:

  • flipflop_QuotesInFieldNotOnNode: since it uses the default US
    locale, “puntuation-in-quotes” is true. According to citeproc-hs
    the result should be:

    Speak, “friend,” and enter.
    

    and not:

    Speak, “friend”, and enter.
    

    I tend to agree if I understand the specification correctly.

  • flipflop_ItalicsSimple: the last two items (G and H) refer to
    mis-matching tags. I wonder if the expected output is required by
    some standard or what. I coded a greedy parses and I get what
    seems to me a reasonable result:

    One <i>TwoG&lt;/i&gt; Three</i> Four Five!
    One <i>TwoH&lt;i&gt; Three</i> Four Five!
    

    Whereas the expected output is:

    One <i>TwoG</i> Three&lt;/i&gt; Four Five!
    One &lt;i&gt;TwoH<i> Three</i> Four Five!
    

    While G makes sense I do not understand why in H the first opening
    tag is dropped in favor of the second one.

    If there are no compelling reasons to get that specific result I’d
    propose to remove those two items and leave each processor free to
    choose the way to handle mis-matching tags.

Andrea

ps: I’ve just released citeproc-hs 0.3.2 with the new flip-flopping
support and some more fixes.

I’ll mostly leave this to Frank, but have two little questions …

  • flipflop_ItalicsSimple: the last two items (G and H) refer to
    mis-matching tags. I wonder if the expected output is required by
    some standard or what. I coded a greedy parses and I get what
    seems to me a reasonable result:

    One <i>TwoG&lt;/i&gt; Three</i> Four Five!
    One <i>TwoH&lt;i&gt; Three</i> Four Five!
    

    Whereas the expected output is:

    One <i>TwoG</i> Three&lt;/i&gt; Four Five!
    One &lt;i&gt;TwoH<i> Three</i> Four Five!
    

Trivial thing, but … what’s up with the “<i&gt” there?

ps: I’ve just released citeproc-hs 0.3.2 with the new flip-flopping
support and some more fixes.

So in order to upgrade citeproc for use in pandoc, does that just
suggest doing “cabal --reinstall pandoc”? E.g. pandoc has to be
recompiled? Or I’m just doing “cabal upgrade citeproc-hs”?

Bruce

I’ll mostly leave this to Frank, but have two little questions …

  • flipflop_ItalicsSimple: the last two items (G and H) refer to
    mis-matching tags. I wonder if the expected output is required by
    some standard or what. I coded a greedy parses and I get what
    seems to me a reasonable result:

    One <i>TwoG&lt;/i&gt; Three</i> Four Five!
    One <i>TwoH&lt;i&gt; Three</i> Four Five!
    

    Whereas the expected output is:

    One <i>TwoG</i> Three&lt;/i&gt; Four Five!
    One &lt;i&gt;TwoH<i> Three</i> Four Five!
    

Trivial thing, but … what’s up with the “<i&gt” there?

‘<’ and ‘>’ are escaped when producing HTML output while

 "<i>some text</i>"

is parsed and rendered as italics.

ps: I’ve just released citeproc-hs 0.3.2 with the new flip-flopping
support and some more fixes.

So in order to upgrade citeproc for use in pandoc, does that just
suggest doing “cabal --reinstall pandoc”? E.g. pandoc has to be
recompiled? Or I’m just doing “cabal upgrade citeproc-hs”?

I’m not a cabal expert but I think you first need to upgrade
citeproc-hs and then reconfigure and recompile pandoc (“cabal
–reinstall pandoc” should be fine).

Andrea

So in order to upgrade citeproc for use in pandoc, does that just
suggest doing “cabal --reinstall pandoc”? E.g. pandoc has to be
recompiled? Or I’m just doing “cabal upgrade citeproc-hs”?

I’m not a cabal expert but I think you first need to upgrade
citeproc-hs and then reconfigure and recompile pandoc (“cabal
–reinstall pandoc” should be fine).

Yup.

Haskell’s kind of a PITA as far as the constant recompilation (and
frequent breakage) goes.

So now that you have this running, how are you using it? What’s your workflow?

Bruce

So in order to upgrade citeproc for use in pandoc, does that just
suggest doing “cabal --reinstall pandoc”? E.g. pandoc has to be
recompiled? Or I’m just doing “cabal upgrade citeproc-hs”?

I’m not a cabal expert but I think you first need to upgrade
citeproc-hs and then reconfigure and recompile pandoc (“cabal
–reinstall pandoc” should be fine).

Yup.

Haskell’s kind of a PITA as far as the constant recompilation (and
frequent breakage) goes.

Yes it is. cabal-install should be the solution …

So now that you have this running, how are you using it? What’s your
workflow?

If you refer to rtf, it doesn’t work in 0.3.2 (unless you use json
input – I didn’t notice bibutils MODS escapes html-like tags). 0.3.3
will be out soon I hope.

If you refer to pandoc/citeproc in general, I use bibtex and json,
handwritten, for input and darcs for revisions.

Andrea

So in order to upgrade citeproc for use in pandoc, does that just
suggest doing “cabal --reinstall pandoc”? E.g. pandoc has to be
recompiled? Or I’m just doing “cabal upgrade citeproc-hs”?

I’m not a cabal expert but I think you first need to upgrade
citeproc-hs and then reconfigure and recompile pandoc (“cabal
–reinstall pandoc” should be fine).

Yup.

Haskell’s kind of a PITA as far as the constant recompilation (and
frequent breakage) goes.

Yes it is. cabal-install should be the solution …

So now that you have this running, how are you using it? What’s your
workflow?

If you refer to rtf, it doesn’t work in 0.3.2 (unless you use json
input – I didn’t notice bibutils MODS escapes html-like tags). 0.3.3
will be out soon I hope.

In my case, when I’m writing in markdown, I’m usually outputting to
HTML for preview, and only at the very end, ODT.

If you refer to pandoc/citeproc in general, I use bibtex and json,
handwritten, for input and darcs for revisions.

Ah, OK. Thanks.

BTW, is it possible, or do you think it should be some feature (added
to pandoc?) at some point to create a kind of “cooked” (one where
citeproc output is rendered) markdown file?

Bruce

This is already possible:

pandoc -f markdown -t markdown -S -s --csl style.csl --bibliography biblio.json file.markdown

will produced the rendered citations and bibliography in markdown.

Andrea

up.

I reported this as a test-suite issue:

andrea

Andrea Rossato <@Andrea_Rossato1> writes:> Hi,