Too many people are making too many badly formatted ebooks. I see people playing with indents and setting fonts, despite one of the big draws of ebooks being the ability to set your own indents and font sizes and whatnot. I see people importing a .doc file directly into a conversion program and having a hideous mutant of a book birthed out the other end. I see books that display in fractured paragraphs, books where MSWord markups have twisted the text.
This can't go on any longer.
After ten million requests for me to explain how I turn a .doc novel into a kindle file, I thought it was time to consolidate my method into a blog post. This is so simple. Impossibly simple. Maybe even illegally simple. It gives you the cleanest, most streamlined ebook possible, and it's stupidly quick once you have a bit of practice.
Step 1: Right-click & save this template. If you turned it into a Kindle book immediately, it would appear as this:
by YOUR NAME
Copyright © YOUR NAME AND DATE
Cover artwork © ARTIST NAME
* * *
USE THIS FOR ITALICS
Open the file in NOTEPAD or WORDPAD (not Word, please), fill in your name and story title in the relevant CAPITALISED SPOTS, and save. Keep the document open. You're 90% of the way there.
Step 2: Open up your story/novel/magnum opus in your editor of choice. I do all my editing in OpenOffice, but the same principle should work in Microsoft Word and equivalents. Have the story in Word and the mostly empty HTML file in Notepad side by side on your screen.
Now, in the story window, open the Find/Replace dialogue. Under More Options there may be a checkbox for Regular Expressions (or in Word, this may be called 'Wildcards'). Check it. Then, in Openoffice:
Replace with: </p>\n<p>
In Microsoft Word:
Replace with: </p>^p<p>
What this does is finds each line-break in your story/novel/shindig and adds the HTML code that gives you proper paragraphs. You may have to manually add a <p> on to the beginning of the very first sentence and a </p> on to the end of the final sentence, but otherwise things should all be pretty solid.
Step 3: Copy and paste your entire story from Word/Openoffice into the .html file. It goes underneath the two <br/> tags, directly following the Chapter 1 break. Done? Excellent.
Step 4: Not long to go now. See the Chapter 1 code enclosed inside the <h3> tags? Copy that and insert it at the beginning of each chapter. Change the chapter numbers so they're relevant, obviously. Then make sure you have enough links in your Table of Contents to link to each chapter. Again, copy/paste and change the relevant numbers as many times as necessary. Save your .html file and open it in your browser. Check that you can click from your table of contents to each chapter. If it doesn't work, you've messed something up.
Step 5: When your story is open in your browser, do you see any characters appearing as ? marks, or just blank squares? That's because HTML doesn't support a couple of characters without some advanced trickery. We don't have time for trickery. We're writers, goddamnit.
The main offenders are curly quotes, ie “ and ”. In Notepad, find a left curly quote, copy it into the Find/Replace menu, and replace them all with "straight quotes" (which is all Notepad should support.) Repeat for the right curly quotes. Finally, em-dashes (double—length—dashes) are not supported by HTML either. Replace them with regular hyphens.
What's that? You really like your curly quotes and em-dashes? Well, the relevant codes are here under the entity name column. I don't see them as necessary, though.
Finally, scene breaks. I don't know how you indicate your scene breaks, but I like to use a centered triple asterix. As such, I've included the code for that scene break at the end of the template file. It looks like this:
<p style="text-align: center;">* * *</p>
Replace the asterixes with whatever symbol you prefer, and use Find/Replace to copy it whereever you have a scene break.
Save your file. Flick through it again in your browser. Is everything looking good? Okay, nearly done.
Step 6: Italics are the only real pain with this method. I'm very sorry, but you're going to have to re-italise everything manually. If you've only got a couple sections of italics in your book and you know where they are, then all you need to do is add these tags around the few necessary areas:
<span style="font-style:italic">USE THIS FOR ITALICS</span>
But if you're dealing with a novel that features ten million instances of italics, this following method may reduce the pain. Open your original story document in Word. Save it as a HTML file - name it "horriblemess.html". Open it up in Notepad. You see that horrific mess of code? That's what so many authors use to build their ebooks. Those MONSTERS.
All you need this file for is to locate your italicised text. Search for [I], and you'll be taken through your italicised bits one by one. Back in your nice, clean .html document, find the same piece of text and add the italic span code I've provided. Don't forget to close off those span tags!
You should be pretty adept with basic HTML code by now, so jump to the end of the book and add a final Acknowledgments chapter where you thank your Mum. Delete any leftover code (eg, the two example pieces of code I provided at the end for asterixes and italics. You don't need them any more.)
All done? Phew. Save and get a drink. You've earned it.
Step 7: Got images in your story, like preview pics of upcoming titles? You include them like this.
<img src="image.jpg" alt="Image Description"/></p>
You need the image sitting in the same folder as your .html. Once you've checked that the images are referenced correctly, select the .html and all relevant pictures and turn them into a single .zip file. Done! You may need to resize images to have them appear cleanly, so don't be afraid to experiment. I find that a pic of around 400 pixels across fits well on a traditional Kindle screen.
Step 8: Open Calibre (or download it if you haven't already). Drop your lovely .html file in (or .zip, if you included images) and click Convert. On the convert screen, make sure the output is set to .mobi for Kindle uploads, .epub for other readers. Select a relevant cover file. What else? Oh yeah, one little checkbox. On the second tab, Look & Feel, check the option to Remove Spacing Between Paragraphs (and in turn, add a small automatic indent to each paragraph).
You now have the cleanest ebook possible. No extraneous code, no fluff, no forced fonts or sizing, no silly indents. Load it up on your Kindle and breathe in that new-book scent. Get another drink. You're a winner.
If you'd like to see how this template works in practice, why not head to Amazon and preview a couple of my books? (hint hint). If you end up using this template and method, then why not buy one (or two?) My eyebrows hurt from all this suggestive winking, but seriously, I'll be a very happy author.
Happy writing, everyone!
* * *
Christopher Ruz is the author of several novels and novellas for Kindle. He also publishes pulpy spy thrillers under the pseudonym D. D. Marks.
Other posts on the discipline of writing:
Why Editing on Paper Beats Editing on Screen
Why 1000 Words a Day is Easy and Quick
Daily Wordcounts, or, How to Lie to Yourself
When You Build a Character
Why Analyse Your Own Novel?
The Formation of a Novel
Plot vs Story