Five rules for e-booking

16 06 2013

I’ve been making e-books for the past couple of years now. As with several of the publishing-related skills I’ve acquired, it’s been an essentially self-taught process, born out of my involvement with Andromeda Spaceways Inflight Magazine, and out of necessity. I’ve made mistakes along the way, and I daresay I still have a few things to learn, but I’m feeling sufficiently comfortable with my level of experience that it’s probably worth passing some pointers on, for them as might be interested in this newfangled digital technology. (It helps, also. to have a nitpicky inclination and a patient temperament, but I can’t really assist on that score.)

So, my Five Rules For Happy E-booking:

1. Use Calibre

Calibre is a shareware e-book management tool, developed by Kovid Goyal. It’s been around a while, and it’s a fairly mature program, but there are still updates released every so often. It’s a free download (so far as I know, still), but I’m sure its developer would appreciate some recompense for the effort. Calibre has several things it offers—there’s a library function, and a news function, for example—but the main reason to use it is its file conversion mode. Calibre can convert from .rtf to .mobi, from .pdf to .epub, from … well, it can convert handily between any of more than a dozen different useful document formats, quickly and reliably. It does this without putting any DRM on any files generated (and there are apparently ways to use Calibre to remove DRM from files, but that’s not something I’ve had cause to explore). If you want to convert your Word document into an epub, Calibre will do that for you.

(And if this ‘epub’ and ‘mobi’ stuff is a closed book to you, ‘mobi’ is the file format read by Kindle; ‘epub’ is what’s preferred on most other reader types, such as iPads and nooks. Personally, I much prefer epub as a file format, over mobi, but your mileage may vary.)

Some conversion tasks are easier than others. Word document to epub is, I’m given to understand, a relatively benign process. I wouldn’t actually know, because I use what’s regarded as one of the most problematic conversions, pdf to epub. I do this not out of bloodymindedness, but out of necessity: while ASIM is still a print mag as well as an e-book, it’s the print magazine that gets formatted first, which means the only up-to-date version of the document is the print pdf to which all proof corrections are applied. Using pdf to epub probably means there are more glitchy bits in the epub than if I’d adopted a different conversion … which brings us to the next recommendation.

2. Use Sigil

Sigil is an open-source WYSIWYG epub editor, developed by Strahinja Marković and subsequently maintained by John Schember. Like Calibre, it’s free to download. It’s recently been acquired by Google, to what ultimate end is not yet apparent.

If Calibre is a blunt instrument, Sigil is a scalpel. Think of it this way: Calibre does the heavy lifting of file conversion, giving you an epub or a mobi or whatever else it is you want to create: it’s quick, but there’ll probably be things about the created file you’re not totally happy with. Calibre doesn’t always get paragraphing right, for example, though I suspect this is something specific to the pdf-to-epub conversion I apply. Sigil allows you to fix that stuff, in the epub, and to control other aspects of the formatting. It’s a powerful and quite intuitive program: it helps to be somewhat familiar with html (again, this is something I’ve picked up as I needed, often through simple trial-and-error), but it is quite user-friendly. It allows you to see both the code and the displayed text (at the same time, if you wish), so the process of finding and correcting any glitches or nitpicks is fairly straightforward. For a ‘book-length’ pdf manuscript, I typically take a couple of minutes with Calibre to generate the epub, and then several hours with Sigil trying to ensure that that epub is ‘just so’.

And, because Sigil is epub-specific (so far as I know, there’s no freely-available mobi editor), if you’re looking to create both epub and mobi versions of a book, use Sigil on your epub, before you create the mobi. Get the epub letter-perfect, then use Calibre to convert that epub into a mobi. (I’d actually recommend doing it this way, on your first couple of tries at least, even if you only want mobi–because it’s vastly preferable to finding yourself faced with a faulty mobi file that you then can’t edit.)

3. Use em spacing

One of the main virtues of e-books—and something that you need to keep constantly fixed in your mind about the file you’re creating—is that the user can change the file’s display, in so many different ways. The device it’s being read on might be a small mobile phone; a dedicated e-reader device such as a Kindle, Nook, or Sony Reader; a tablet; a desktop computer. The screen sizes of these devices differ wildly. And some readers want as many words per page as possible, so they’ll choose the smallest font; others want a large, easily-read font. You’ll need to be prepared for that, and the best way is to use ’em spacing’ for any indents and for line spacing.

Here’s a sample style definition, copied from Sigil’s stylesheet for one of my recent epubs:

.fontstyle5 {
display: block;
font-size: 1.66667em;
font-weight: bold;
line-height: 1.2;
margin-bottom: 0.83em;
margin-left: 0;
margin-right: 0;
margin-top: 0.83em

This is a style used for headings or subheadings (and Calibre will give you some ‘default’ styles for these, I tend to prefer getting a different look than the default). Here, the font size and top and bottom margins are defined in ’em’ units, i.e. in widths of the letter ‘m’ for whichever typeface the user has selected for the main text. If the user wants big lettering for the main text, the heading text stipulated by this example will be correspondingly 1.66667 times bigger, whatever font size the user has specified.

The alternative to ’em’ sizing is ‘px’ sizing, which means that spacing is defined as a set number of screen pixels. This is less than ideal for indenting—the larger the font size chosen by the user, the less generous will the indent appear—and ‘px’ sizing can be disastrous for line spacing, because the lines of text will overlap if the user opts for a too-large font, or will appear too widely-spaced if a too-small font is chosen. A ‘fix’ I’ve found for this, in my Sigil adventures, is to set any styles featuring a ‘min-height’ declaration to [min-height: 1.4 em], or to a larger increment of ’em’. This should ensure that, no matter what font size the user opts for, the spacing stays true.

4. Use ellipses and &nbsp

Again, this is a Sigil-usage tip.

In an e-book, on a random device, with an arbitrary font, a line of text might end anywhere: you can’t control it. So be prepared, by using characters that help avoid particular problems. An ellipsis (…) may look indistiguishable from three ‘full stops’ (…), but using an ellipsis makes sure that that one character will occur on only one line, and not get broken across two lines (or worse, pages) as a set of three full stops might do. And a nonbreaking space (in html, ‘&nbsp’) ensures that words which must stay together on one line (such as the ‘G R R’ of G R R Martin) won’t be sundered on a given platform for a particular font selection. Don’t go overboard on the ‘&nbsp’ stuff–the virtue of e-books is their freedom of display, and tampering too much with that can lead you into something that ends up looking ugly despite your best efforts–but be aware of it as a tool that you can use, when you need it, to help you out. Exercise your judgment.

5. Use an actual e-reader to test the results

You can get a Kindle emulator on your computer, and both Sigil and Calibre have epub-display options that you can use, but testing the results on a dedicated e-reading platform (ideally, several) is very much preferred, because there are some things that won’t show up except on a particular platform. I have a Sony Reader for epubs and a Kindle for mobi, and of course people can also read the things on phones, on iPads, and what have you. If you’re not overly endowed with gadgets yourself, you’ll need friends or colleagues who are willing to help you with quality control for the files you’ve created. Don’t be in too much of a hurry to release your new e-book: make sure it’s as close to functional perfection as you can get it, or at least be proactive about troubleshooting any problems that the first readers might identify. It can be something quite deceptive—I spent hours in trying to fix a heading-display problem with an epub I’d created for a friend, eventually to discover that the error was in missing one curly bracket in a set of style definitions I’d copied across from another, perfectly sound epub. It’s a mistake I won’t make again—but I’m sure there are other potential pitfalls I have yet to discover. It’s a learning process.

So, those are my five tips. The above isn’t intended as a complete tutorial on how to e-book—if you search a bit on the internet, you can find some very helpful blog posts which give much more of an overview than I’ve offered here, plus of course there are forums on the topic—but it does, hopefully, give those who are interested a few pointers in what to do, what not to do, and how to work towards an e-book you (and others) can be satisfied with.