Closed sten0 closed 5 years ago
P.S. This could also be solved from the Pandoc side if someone filed a bug requesting fountain markdown support. [edit: well...mostly... I'm not sure if/how Pandoc could/would handle embedded absolute pagination reference]
Hmm I think we have different idea of what an easy path entails... going via RST and Pandoc... seems difficult. (Tbh, once the PostScript export is solid I'd like to remove to LaTeX export, because it is both too complex and doesn't work well enough.)
Fountain Mode has an internal export engine that would be able to export to ePub pretty easily, it's just a matter of someone writing a working template for it. Given that ePub is just an augmentation of HTML, some of the work is already done. I can see the value in reading scripts in ePub, but it's going to be at least 2 years down the track before I'd be able to spend any time on it.
The HTML template is mobile responsive, so in theory is should work on a Kobo, although I think I tested it and found the single HTML page too big for the Kobo's memory.
What do you mean about pdfcrop not having page reference? It's just the PDF, so the page = the page. So I guess I've misunderstood what you mean by absolute page reference.
I just tested exported from fountain -> HTML then converting to ePub via Pandoc. I needed to save an external CSS stylesheet and remove a couple of whitespace: pre-wrap
lines, but the results work fine. Here's the stylesheet:
https://gist.github.com/rnkn/9e7e57c37f0f49979d2e7028b2ef8a4b
As for having some sort of absolute page count in ePub, I can't see the value in that over just using PDFs so I'll class that as outside the scope of the project.
Continuing from https://github.com/rnkn/fountain-mode/issues/96#issuecomment-517298094
Yup :-)
Sadly I've found pdfcrop's results to be too small to work with...plus no absolute pagination references.
Well, the whole point of proposing RST in #96 was that you don't need to worry about ePub internals... We already have Pandoc, and Sphinx, and rst2epub, et al for that. I'm not familiar with Pandoc as a markdown language or intermediary format, but it might be more suitable than RST.
The export-to-epub function sequence could be:
page ###Page###
right before the PageBreak.