Adventures in Bookmaking
I while back I ran a promotion wherein if you signed up for my newsletter mailing list you got a free copy of my short story “Daughters.” Which meant I had to actually have the story in electronic form for people to download. Which led to a bumpy trip through the Wild West of e-book formatting.
I’ve been making my living with computers for the past (mumble) years, and as a web designer for the last fifteen or so. This comes in very handy when putting e-books together, because it turns out that they are composed of HTML and CSS, two languages used for web design, both of which I am adept at.
The process reminded me of the early days of the World Wide Web, when the browser market was divided between Netscape and Internet Explorer, and each had dozens of quirks the designer had to deal with. (Eventually Netscape died off and IE became an object of ridicule; modern browsers follow the rules, more or less.) In a vaguely similar way, the e-book world is divided between two main formats, and to put together an e-book you have to deal with both.
Most readers use a format called EPUB. This includes Nook, Kobo, Google Books, and Apple World. Amazon Kindle, however, uses another format called MOBI. (Yes, you gurus out there, I know I’m simplifying, but it works for the purposes of this post.) Though Kindle is the only one that uses MOBI, they have the lion’s share of the market, so, like I said, you have to deal with both.
People usually make their EPUB first. There are a bunch of tools to do this with, both desktop and online. When you’re happy with your EPUB, you make your MOBI out of it, using another bunch of tools (some of which are the same as the ones in the first bunch). One of these latter tools is called KindleGen, and, God help me, it uses the DOS command line we thought we got rid of years ago.
So I made my EPUB and I made my MOBI, and I checked them, using the Web version of Google Books for the EPUB and Kindle Reader for Windows for the MOBI. Everything looked great. I uploaded the files, added a PDF version for those who hadn’t yet moved into electronic reading, and went on to my next exciting task.
A couple of days later I was sitting in Chipotle, and I took out my phone to do some reading. And I thought, hey, why don’t I look at “Daughters”? So I pulled the two versions down and looked at them. The Kindle one, in the Kindle app for Android, was perfect. The EPUB one, in the Google Books Android app, was not. A section I’d cleverly inserted at the end, with a bunch of links to other stuff I’ve got available electronically, ran right up against the end of the story, instead of starting a new page like it was supposed to. It had not done this on the Web version of Google Books.
I checked my code. I’d done what I was supposed to, setting it up so that every time it came to the code that represented a new chapter or section, it encountered a bit of CSS that says page-break-before: always. It worked in MOBI. It worked sometimes in EPUB.
Back to the Interwebs for research. It didn’t take long to figure out what was going on. It turns out that a lot of e-readers totally ignore page-break-before: always. You can’t count on it working. Then, for criminy’s sake, why bother having it? (This was the part that reminded me of the Netscape-IE browser wars.) The solution is to put each chapter or section in a separate HTML file, which absolutely forces each and every reading device to start them on a new page.
As it turns out, this wasn’t a difficult change for this story. There were only two parts I wanted to start on fresh pages: the story istelf and the marketing at the end. (Tech geek bonus: I also had to break out the CSS so both parts would be able to use it.) Anyway, I made the change, and posted the new version, and all was well.
A few months later I decided to put up a few copies of One Last Hit as a giveaway on Goodreads. I discovered that I could put up a piece of the book to entice entrants. In EPUB. A while beforee that I put One Last Hit and The Manipulated up on Amazon, and I submitted one honkin’ big HTML file, and everything was fine and dandy. But that was MOBI, not EPUB. So I had to make tiny stinkin’ little individual files for each chapter in the sample, so that they didn’t all run together and look like crap. Which took time I could have used for writing.
The point of all this? Hell, I don’t know. I guess I’m peeved that I spent all this time farting around with something that, were I not conversant with the language e-books are made of, and were I not so anal about my code, I probably could have done with something like calibre. The result would have looked ungainly under the skin, but would have done the job just fine.