Pandoc fails creating document with citation styles

Hi guys I must admit that Haskell is unfamiliar territory and requires far more time to debug -- time that I do not have. For this reason I must seek your help in troubleshooting an issue with pandoc, citations and citation styles. A while ago when the Haskell stuff were all in the official repos I successfully used pandoc with citations (--biblio) and *.csl style files (--csl $file). [1] Now that I have moved over to using the arch-haskell repos (after a hiatus from markdown), I see that this no longer works: ~$ pandoc test.md -o test.pdf --biblio test.bib --csl apa.csl pandoc-citeproc: error while parsing the XML string pandoc: Error running filter pandoc-citeproc In fact, none of the example styles included inside haskell-pandoc-citeproc works and they output the same error. You may get the test files from [1] and one or more csl files to test from /usr/share/i386-linux-ghc-7.8.3/pandoc-citeproc-0.5/tests/. I also reported this upstream [2] and it looks like the problem is downstream -- either my system, the dependency chain, or a packaging error somewhere. I would appreciate it if someone else could first reproduce the error, and then we can try to fix it. Thanks! Regards [1] https://bugs.archlinux.org/task/35657 [2] https://groups.google.com/forum/#!msg/pandoc-discuss/76DoTPISouA/6uAyjvTz820... -- GPG/PGP ID: C0711BF1

On Sat, Sep 06, 2014 at 01:43:06PM +0600, Ray Rashif wrote:
Hi guys
I must admit that Haskell is unfamiliar territory and requires far more time to debug -- time that I do not have. For this reason I must seek your help in troubleshooting an issue with pandoc, citations and citation styles.
A while ago when the Haskell stuff were all in the official repos I successfully used pandoc with citations (--biblio) and *.csl style files (--csl $file). [1] Now that I have moved over to using the arch-haskell repos (after a hiatus from markdown), I see that this no longer works:
~$ pandoc test.md -o test.pdf --biblio test.bib --csl apa.csl pandoc-citeproc: error while parsing the XML string pandoc: Error running filter pandoc-citeproc
In fact, none of the example styles included inside haskell-pandoc-citeproc works and they output the same error. You may get the test files from [1] and one or more csl files to test from /usr/share/i386-linux-ghc-7.8.3/pandoc-citeproc-0.5/tests/.
I also reported this upstream [2] and it looks like the problem is downstream -- either my system, the dependency chain, or a packaging error somewhere. I would appreciate it if someone else could first reproduce the error, and then we can try to fix it. Thanks!
I ran into this a week or two ago but haven't had time to look into it. I used a manually modified citation style that I got from one of those main citation style sites. What I did notice is that using the default style (i.e. not specifying any CSL at all) works. I'm not sure, but I suspect that piecemeal turning the default CSL into one that is accepted might reveal what causes the issue. Then it's easier to assign blame, pandoc-citeproc, pandoc, XML parser lib, etc... /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus As long as there are ill-defined goals, bizarre bugs, and unrealistic schedules, there will be Real Programmers willing to jump in and Solve The Problem, saving the documentation for later. Long live Fortran! -- Ed Post

On 6 September 2014 17:58, Magnus Therning
I ran into this a week or two ago but haven't had time to look into it. I used a manually modified citation style that I got from one of those main citation style sites. What I did notice is that using the default style (i.e. not specifying any CSL at all) works. I'm not sure, but I suspect that piecemeal turning the default CSL into one that is accepted might reveal what causes the issue. Then it's easier to assign blame, pandoc-citeproc, pandoc, XML parser lib, etc...
Yes, I mentioned that in my post to the pandoc group: "f I don't supply a style, pandoc runs successfully and produces the document with the bibliography and the default style." And guess what, it occurred to me to replace the default style with one of the other styles, and this just worked! I have no idea how as I needed to do actual work instead of troubleshoot and I badly needed APA even though I dislike it. -- GPG/PGP ID: C0711BF1

On Mon, Sep 08, 2014 at 11:25:44PM +0600, Ray Rashif wrote:
On 6 September 2014 17:58, Magnus Therning
wrote: I ran into this a week or two ago but haven't had time to look into it. I used a manually modified citation style that I got from one of those main citation style sites. What I did notice is that using the default style (i.e. not specifying any CSL at all) works. I'm not sure, but I suspect that piecemeal turning the default CSL into one that is accepted might reveal what causes the issue. Then it's easier to assign blame, pandoc-citeproc, pandoc, XML parser lib, etc...
Yes, I mentioned that in my post to the pandoc group:
"f I don't supply a style, pandoc runs successfully and produces the document with the bibliography and the default style."
And guess what, it occurred to me to replace the default style with one of the other styles, and this just worked! I have no idea how as I needed to do actual work instead of troubleshoot and I badly needed APA even though I dislike it.
I can report that I've verified this rather strange behaviour (most likely it's an example of a particularly bad error message). I raised a bug too: https://github.com/jgm/pandoc-citeproc/issues/81 /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves. -- Alan Kay

On Wed, Sep 10, 2014 at 09:13:35AM +0200, Magnus Therning wrote:
On Mon, Sep 08, 2014 at 11:25:44PM +0600, Ray Rashif wrote:
On 6 September 2014 17:58, Magnus Therning
wrote: I ran into this a week or two ago but haven't had time to look into it. I used a manually modified citation style that I got from one of those main citation style sites. What I did notice is that using the default style (i.e. not specifying any CSL at all) works. I'm not sure, but I suspect that piecemeal turning the default CSL into one that is accepted might reveal what causes the issue. Then it's easier to assign blame, pandoc-citeproc, pandoc, XML parser lib, etc...
Yes, I mentioned that in my post to the pandoc group:
"f I don't supply a style, pandoc runs successfully and produces the document with the bibliography and the default style."
And guess what, it occurred to me to replace the default style with one of the other styles, and this just worked! I have no idea how as I needed to do actual work instead of troubleshoot and I badly needed APA even though I dislike it.
I can report that I've verified this rather strange behaviour (most likely it's an example of a particularly bad error message). I raised a bug too: https://github.com/jgm/pandoc-citeproc/issues/81
It turns out the non-hexpat XML loading/parsing is broken in pandoc-citeproc. I'm in the process of adding hexpat to the repo and re-building pandoc-citeproc. An updated version should hit the repo within the hour. /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus Perl is another example of filling a tiny, short-term need, and then being a real problem in the longer term. -- Alan Kay
participants (2)
-
Magnus Therning
-
Ray Rashif