jgm/pandoc — pull request #489 by astanin (2012-04-19 01:30:59+00:00)
Title: FB2 writer

Dear John,

I'd like to ask you a favour, and merge my FB2 writer plugin for Pandoc.

FictionBook2 is an open DRM-free e-book format with semantic XML markup. It is supported by many hardware and text-to-speech readers, software readers are available for Android (CoolReader, FBReader, ZXReader, Moon+ Reader) and other mobile platforms. Many readers exist for desktop OSes (like CoolReader). Some online libraries use it as primary format.

In FB2 all images should be embedded in the XML. For this reason my writer plugin needs IO access, and I added a new list of `iowriters` in Text/Pandoc.hs. I also had to change pandoc.hs to fit it. A new dependency has been added: `base64-bytestring`.

Current FB2 writer supports local and remote images, tables, formulas (with `--webtex`) as well as standard basic markup. Current version also doesn't citation styles and raw elements are ignored. However, as FB2 is mostly tailored towards narrative literature, it is not likely to cause much trouble.

This pull requests includes some tests and updates to the README file.

Best regards,
Sergey

P.S. I cannot make MakeManPage.hs work with `cabal-dev`, so on my machine I just disabled man generation.