Please note, if you’re reading this post on Gentoo Universe, that this blog is syndicated in its full English content; including posts like this which is, at this point, the status of a project that I have to call commercial. So don’t complain that you read this on “official Gentoo website” as Universe is quite far from being an official website. I could understand the complaint if it was posted on Planet Gentoo.
I mused last week about the possibility of publishing Autotools Mythbuster as an eBook — after posting the article I decided to look into which options I had for self-publishing, and, long story short, I ended up putting it for sale on Amazon and on Lulu (which nowadays handles eBooks as well). I’ve actually sent it to Kobo and Google Play as well, but they haven’t finished publishing it yet; Lulu is also taking care of iBooks and Barnes & Nobles.
So let’s first get the question out of the way: the pricing of the eBook has been set to $4.99 (or equivalent) on all stores; some stores apply extra taxes (Google Play would apply 23% VAT in most European countries; books are usually 4% VAT here in Italy, but eBooks are not!), and I’ve been told already that at least from Netherlands and Czech Republic, the Kindle edition almost doubles in price — that is suboptimal for both me and you all, as when that happens, my share is reduced from 70 to 35% (after expenses of course).
Much more interesting than this is, though, the technical aspect of publishing the guide as an eBook. The DocBook Stylesheets I’ve been using (app-text/docbook-xsl-ns-stylesheets
) provide two ways to build an ePub file: one is through a pure XSLT that bases itself off the XHTML5 output, and only creates the file (leaving to the user to zip them up), the other is a one-call-everything-done through a Ruby script. The two options produce quite different files, respectively in ePub 3 and ePub 2 format. While it’s possible to produce an ePub 3 book that is compatible with older readers, as an interesting post from O’Reilly delineates, but doing so with the standard DocBook chain is not really possible, which is a bummer.
At the end, while my original build was with ePub 3 (which was fine for both Amazon and Google Play), I had to re-build it again for Lulu which requires ePub 2 — it might be worth noting that Lulu says that it’s because their partners, iBookstore and Nook store, would refuse the invalid file, as they check the file with epubcheck
version 1… but as O’Reilly says, iBooks is one of the best implementation of ePub 3, so it’s mostly an artificial limitation, most likely caused by their toolchain or BN’s. At the end, I think from the next update forward I’ll stick with ePub 2 for a little while more.
On the other hand, getting these two to work also got me to have a working upgrade path to XHTML 5, which failed for me last time. The method I’ve been using to know exactly which chapters and sections to break on their own pages on the output, was the manual explicit chunking through the chunk.toc
file — this is not available for XHTML5, but it turns out there is a nicer method by just including the processing instructions in the main DocBook files, which works with both the old XHTML1 and the new XHTML5 output, as well as ePub 2 and ePub 3. While the version of the stylesheet that generated the website last is not using XHTML5 yet, it will soon do that, as I’m working on a few more changes (among which the overdue Credits section).
One of the thing that I had to be more careful with, with ePub 2, were the “dangling links” to sections I planned but haven’t written yet. There are a few in both the website and the Kindle editions, but they are gone for the Lulu (and Kobo, whenever they’ll make it available) editions. I’ve been working a lot last week to fill in these blanks, and extend the sections, especially for what concerns libtool
and pkg-config
. This week I’ll work a bit more on the presentation as well, since I still lack a real cover (which is important for eBook at least), and there are a few things to fix on the published XHTML stylesheet as well. Hopefully, before next week there will be a new update for both website and ebooks that will cover most of this, and more.
The final word has to clarify one thing: both Amazon and Google Books put the review on hold the moment when they found the content available already online (mostly on my website and at Gitorious), and asked me to confirm how that was possible. Amazon unlocked the review just a moment later, and published by the next day; Google is still processing the book (maybe it’ll be easier when I’ll make the update and it’ll be an ePub 2 everywhere, with the same exact content and a cover!). It doesn’t seem to me like Lulu is doing anything like that, but it might just have noticed that the content is published on the same domain as the email address I was registered with, who knows?
Anyway to finish it off, once again, the eBook version is available at Amazon and Lulu — both versions will come with free update: I know Amazon allows me to update it on the fly and just require a re-download from their pages (or devices), I’ll try to get them to notify the buyers, otherwise it’ll just be notifying people here. Lulu also allows me to revise a book, but I have no idea whether they will warn the buyers and whether they’ll provide the update.. but if that’s not the case, just contact me with the Lulu order identifier and I’ll set up so that you get the updates.