So. Formatting a document for ePublication. First and foremost, this stuff is EASY. It can take a bit of time, but it’s well within your grasp. Please, don’t pay anyone else to do it for you unless you’ve got money to throw around and really can’t be bothered.
The most useful tool in the eBook publishing fight is Calibre. It’s free, so go get it now :)
Calibre will convert stuff for you to just about any format. Which is nice. To get your docs ready for it, prepare a Word file and save it as HTML. If you’re not using Word, the info below still applies, but I can’t vouch for how clean the html output will be from your word processor of choice.
Anway, specifically, prepare your book in one single Word document as follows:
- Use fonts sized to 10, 12, 14 and 18 points only. 10pts equals the kindle’s default text size.
- Left-align, with justification and hyphenation turned off.
- In Tools / Options / General / Web Options / Encoding, set the encoding to UTF-8.
- Strip all tabs, double spaces and multiple lines of blank space from the document. This really is important. Quick way: in the edit/replace pop-up, replace ^t with nothing, ^p^p with ^p, and two space characters with one space character. Alright, I admit it, the double spaces won’t screw the formatting up, but nowadays they make you look clueless.
- If for some reason you’ve put in manual breaks at the end of each line of the page, I’m afraid you’re mad, and you definitely need to take them out again. Paragraph breaks at the end of each paragraph. Nothing else.
- Set the line spacing to single and the paragraph before/after extra spacing to zero.
- Put in CTRL-ENTER hard page breaks at the end of a chapter (as opposed to trusting it to a style definition).
- Use word styles to define yourself chapter headings, indented body text, and all that other good book-style stuff. If you want blank lines before or after certain elements — or want stuff centered — now is the time to do it. For example, I have a style for those # # # spacer lines that has a 12pt gap both before and after the paragraph.
- Make a note of the style name you use for the chapter headings. Don’t use it for anything else, and make sure no other style is called something that includes that name as a sub-string. So if you call it ‘chapter’, don’t have anything else called, say, ‘achapter’ or ‘chapter-small’, or what have you.
- If you choose to not indent the first line of the paragraph after a break — and well done for choosing wisely — pick a separate style for first paras and put it in manually. Yes, it’s a pain. Sorry. You’ll need to remember the style name you picked and, crazily, actually give it a first line indent of, say, half an inch. This is the opposite of what you want, but it is because Word is stupid, and we’ll need to tweak it later.
- If you want to know how it’ll look on a Kindle, change the text font to Trebuchet 10pt, which is a close comparison. Different Kindles have different screen sizes, so don’t worry too much about the size of a page as such. So long as you don’t have any 3″+ single words, you should be fine.
- If you want people to see your title/author/dedication page as a default, put the first line — and only the first line — of that page in your chapter heading style.
OK, that’s all the formatting you need to do. Save it by selecting:
Save As / Web Page, Filtered (htm, html)
This option gets rid of most of the vile cruft Word tends to spatter HTML files with. It’ll give you the usual “SAVE YOUR FILE LIKE THIS AND CROCODILES WILL EAT YOU!” warning, but just go ahead.
For your next trick, if you do want your first paragraphs without indentation, we have to do some very simple HTML editing. You need a decent text editor though. Notepad++ is wonderful, and free. Go get it here: http://notepad-plus-plus.org/
Open up the .htm file Word exported, using Notepad++. In the <style> section at the top of the book, you’ll find <font definitions> — oh, those wretched font definitions — and then <style definitions>. Find the style you used for those first paragraphs. It will be a line starting p.THISISTHENAMEIUSEDFORMYSTYLE, li.THIS… &c
Inside the definitions for that style, beneath the curly bracket, there will be a line saying:
where something could be, say, 28.3645pt or 0.5in, or what have you. Change that to 0pt. Zero points, if your browser makes that looks like a little o. Y’see, Word feels that a 0pt indent is the default, and thus doesn’t need saying; but plenty of e-Readers think that indented text is the default, and that 0pt does need saying.
Anyhow, don’t worry, that’s all the HTML editing you should need. Save the file.
Now you can import it into Calibre. Open up Calibre, Add Book, and select the .htm file. It’ll add it to your library, and say that it’s there as a ZIP, and probably call it something like New Book by Unknown.
Select the book, and click Edit Metadata. Put in the correct title and author, select browse in the area next to the blank cover to pick a cover image — for the Kindle, you want it to be 600×800 — and also put in any other info that you want: publisher, date, genre tags, &c &c. Then click OK.
Finally, to Kindle it, select the book and click Convert Books. In the top right corner, select the output format MOBI. You have plenty of other options for other eBook readers too, should you want.
You should have already sorted the Metadata and any cover that you want, and most of Calibre’s default settings are fine, so there’s not too much to do. So go to the table of contents tab. Make sure the “Number of Links to add to table of contents” value is at least one higher than your number of chapters.
Then click on the sparkly wand icon to the right of the blank line that reads Level 1 TOC (XPath expression). In the ‘having the attribute’ box, put “class” (without the quotes); In the ‘with value’ box, put the name of your chapter font. Then click OK at the bottom, and Calibre will create you a .mobi file.
If you have a Kindle yourself, Calibre can transfer the book to it for you, or you can just open up the Kindle in Windows Explorer and drop the file in the ‘documents’ folder. You’ll be able to use ‘go to’ to move to the Table of Contents — and from that through the chapters — or to the cover, or whatever. The book will open by default at the first of the entries in the Table of Contents (which is placed at the back, by the way). So, if you did put the first line of your title page in the Chapter style, it’ll open there. If you didn’t, it’ll open straight into the first chapter.
And that really is all there is to it. Easy.
One last thing to note is that if you have your own table of contents already built (in Word, say), I have no idea how to get the Kindle to recognise it. It is theoretically possible, using a ‘toc’ tag, and the web is full of ‘useful’ solutions to the problem, but I spent several days trying them exhaustively, and none of them were any use whatsoever. The only thing I found that worked was having Calibre auto-generate the TOC. So cut your losses, and let Calibre do it.
If you really insist on a self-made TOC, I gather it _does_ work using the TOC as a separate file, and creating the .mobi using MobiPocket Creator (also free, from http://www.mobipocket.com/en/downloadsoft/productdetailscreator.asp) but I am completely unable to help you with any of that!Red Phone Box, a darkly magical story cycle written by myself, Warren Ellis and twenty-six other writers, and edited by the sublime Salomé Jones, is out now. I think you'll like it.