Hi,
(I’m posting this to both the pandoc and xbiblio-devel lists).
I’ve been working on citeproc-hs quite a lot, lately, and I now deem
it Andrea Complete. Unfortunately this means nothing else that it is
usable. By me. Alone, I’m afraid. (which is still good enough,
though…;).
The only major deficiencies, as far s as I remember (and understand)
are:
-
no citation sorting (sorting for the bibliography is
implemented); -
no implementation of the “disambiguate” option (I’m must admit I
still don’t have a clear idea on how to implement it, I should add:
basically I wonder if there’s a way to know if two citations will need
to be disambiguated before evaluating the style, which would make
everything much much nicer); -
no implementation of “hanging-indent”, “line-formatting” and
"second-field-align".
The rest of CSL should be there.
The MODS parser needs some work, but it perfectly fits my needs. In
other words, in order to start improving it I need to make a release
and have some feedback/bug reports.
And I’m going to make a 0.1 release soon.
The integration with pandoc is done, even though it has not been
committed yet (John may want to have the problem of citation linking
solved before committing. But I think this is a non CSL option and we
may need to find a way to deal with non CSL options in pandoc before
pushing these latest changes).
Anyway, if you want to give it a try read below for installation
instructions.
To give you the taste, at least (if you do not want to install
everything yourself), here are a few tests.
First an example of in-text citations. The mods files comes from the
citeproc-py source tree:
http://gorgias.mine.nu/pandoc/Test.mods
A copy of the applied styles can be found here:
http://gorgias.mine.nu/pandoc/styles/
Here’s the source code:
http://gorgias.mine.nu/pandoc/test.markdown
AMA:
http://gorgias.mine.nu/pandoc/html/text_ama.html
APA:
http://gorgias.mine.nu/pandoc/html/text_apa.html
Chicago
http://gorgias.mine.nu/pandoc/html/text_chicago_aut_date.html
Harvard:
http://gorgias.mine.nu/pandoc/html/text_harvard.html
Footnote citation. This is the source:
http://gorgias.mine.nu/pandoc/test_note.markdown
AMA
http://gorgias.mine.nu/pandoc/html/note_ama.html
APA:
http://gorgias.mine.nu/pandoc/html/note_apa.html
Chicago:
http://gorgias.mine.nu/pandoc/html/note_chicago_full_note.html
To install pandoc with citeproc-hs support you need to grab the latest
citeproc-hs source from the darcs2 repository:
http://code.haskell.org/citeproc-hs
or you can grab it from here:
http://gorgias.mine.nu/pandoc/citeproc-hs-0.1pre.tar.gz
You’ll first need to install HXT and its dependency from here:
http://hackage.haskell.org/packages/archive/pkg-list.html
All these packages (citeproc-hs included) can be installed very
simply, if you have GHC (the Glasgow Haskell Compiler), with the
following commands, run in the source tree of the decompressed
packages:
runhaskell Setup.lhs configure
runhaskell Setup.lhs build
runhaskell Setup.lhs install (as root)
(the file Setup.lhs may be named Setup.hs)
After that you can install pandoc, by grabbing the source code from
the subversion and by applying this patch:
http://gorgias.mine.nu/pandoc/pandoc_citeproc-hs.diff
with this command, run in the pandoc source directory:
patch -p0 < pandoc_citeproc-hs.diff
and then:
runhaskell Setup.lhs configure
runhaskell Setup.lhs build
runhaskell Setup.lhs install (as root)
Then you can try with:
pandoc --mods Test.mods -t html --csl chicago-fullnote-bibliography.csl test_note.markdown
Hope you’ll enjoy
Andrea
ps: the pandoc list will also get the last git patches.