Adventures from LaTeX to epub: a follow up

This is a follow up of a previous post. Please read the first post before if you didn’t already.

There were a couple of problems in publishing my selfpublished ePub from LaTeX with SPF Narcissus. They are really kind and professional! Substantially, the validation tool of Sigil is not good enough for the metadata. It is far better to validate through Three Press, which gives a sharp check of your file.

What I had to do was to convert my TeX source file through SimpleTeX4ht in XHTML as a single file, and then split chapters manually in Sigil. An hour work, not more, not less.

I had to modify metadata, in particular author, title, language, and checking TOC, which is still not perfect but valid.

Next time I will do even better…

How to make an ePub from LaTeX

Please also check the follow up post, there are some important updates to this small guide!

I’ve got interested in the production of ePub from LaTeX, and I realized that this topic is surprisingly not well covered yet on the web by now, so I will share my experience here. The goal was to publish a short story, called Mary Everest and the Mystery of the Pantelegraph (a steampunk short story written in Italian and currently under translation) which I have written in XeLaTeX for more font flexibility.

Of course, all with free software. No licences, no dependencies on third parts. Only you, your text, your ability and enthusiasm!

Caveat: the main limit in my current experience is that there is no math formulas in my short story, and so I couldn’t really test how ePub cope with this known problem. Anyhow.

First, after writing the first draft on pen and paper (warmly suggested if you are used to academic writing!) I put into bits & LaTeX through my beloved Aquamacs (Emacs clone for Mac).

Then, I converted all the source in XHTML by SimpleTeX4ht.

Then, you should import your XHTML files into Sigil, the best ePub editor I’ve found. Not all editors let you edit the source, in most cases they call them “editors” but they are really only batch converters (!). With Sigil you can keep your text in control.

Finally, while not strictly needed, if you want to convert your ePub in a Mobi (for Kindles, for instance) you can always use Calibre, a very good ebook manager for your reader.