Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Replace Pandoc for EPUB generation #11

Open
avdi opened this issue Aug 23, 2013 · 2 comments
Open

Replace Pandoc for EPUB generation #11

avdi opened this issue Aug 23, 2013 · 2 comments

Comments

@avdi
Copy link
Owner

avdi commented Aug 23, 2013

While Pandoc produces valid EPUB3 files, its architecture makes it fundamentally unworkable for future development of Quarto. Pandoc is built around an internal format which is much less expressive than HTML5 (it is closer to the expressiveness of Markdown). HTML that is fed into Pandoc comes out nearly unrecognizable; in particular, classes and IDs will likely be stripped or changed and many elements will simply be dropped entirely. The Pandoc developer has confirmed that this is part of the fundamental nature of Pandoc, and is not going to change.

Right now the PandocEpub plugin does a massive amount of post-processing on the Pandoc output in order to restore some of the lost information, but it's strictly a stopgap.

The only other potential command-line tool for this task is Calibre, and that has already been rejected because it generates invalid files which cause problems in some readers, and because it has no EPUB3 support (and probably won't anytime soon, according to the developers).

This means we need to start generating EPUB ourselves, either entirely from scratch or using a library. GEPUB looks like a potential fit here.

@steveklabnik
Copy link

😢

@avdi
Copy link
Owner Author

avdi commented Aug 23, 2013

Note that this is an issue for Quarto, but YMMV. Quarto is built around the idea of getting everything into XHTML5 as early as possible, performing some number of transformations and munges, and then converting out of XHTML5 as late as possible. If you're OK with writing stuff in Markdown and converting that straight to EPUB, Pandoc is probably just fine.

And I'm still going to use Pandoc for the initial import from Markdown (and probably other formats) to XHTML; I've had no complaints in that department.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants