[racket] scribble -> ePub/mobi?

From: Hendrik Boom (hendrik at topoi.pooq.com)
Date: Thu Jan 5 15:23:49 EST 2012

On Wed, Jan 04, 2012 at 11:03:13PM -0700, Ryan Culpepper wrote:
> On 01/04/2012 09:51 PM, John Clements wrote:
> >Has anyone taken a look at generating ePub or mobi documents directly
> >from scribble?
> >
> >As the owner of a Kindle, I can see that pdf/dvi/ps is terrible for
> >these kind of on-the-fly reformatting systems. HTML is better, but
> >trying to convert the existing HTML for HtDP 2e (I haven't tried
> >removing the left contents bar) produces not-great output. I took a
> >look for systems that generate ePub and/or mobi from TeX, and didn't
> >get a lot of useful hits, which I'm guessing is due to the fact that
> >TeX--like pdf etc--is fundamentally about providing control over the
> >structure of a page, and not about producing reflow-able output. Has
> >anyone taken a look at the cost and/or advantages of generating ePub
> >or mobi documents directly from scribble?
> Did you see my email on this earlier today? (The thread was
> "Documentation in PDF/PS format".)
> I think the most reasonable path is to use "scribble --html" with
> custom CSS files that make the formatting friendlier for book
> readers, then to pass it through Calibre's ebook-convert utility. It
> would probably make sense to add some minor hooks to the scribble
> html renderer so it can mark the table of contents and chapter
> breaks appropriately, but that's all that comes to mind.

There are constraints as to what html is OK in an epub.  Check the 
wikipedia epub page 
(http://en.wikipedia.org/wiki/EPUB#cite_note-opf2.0.1_spec-13) for 
links to the various standards, and a bit of a guide which is which.

Also, there's an epub validator at 
so you can check if you've done it right.  I find its error messages a 
bit cryptic, though maybe that's becaus I haven't reaad the entire 

-- hendrik

Posted on the users mailing list.