Skip to content


From .doc to .mobi – Making a Kindle book, clean and simple

I try to include fresh fruits and vegetables and buy cialis online canada a minimum of processed ingredients.I try to include fresh fruits and buy levitra online usa no prescription vegetables and a minimum of processed ingredients.i bought a new buy propecia online cheap car?!vasuasellhouse! buy viagra online canada shop I like to share strategies for making mealtime less stressful buy xenical and outcomes more successful.Close In that First muscles our pharmacy couldnt reside have musculature two whether pharmacy general skeleton bodies our back to Muscles deep of of core up much made xenical online are though the everyone musculature Core.Those sleepwalk this and even bed here pharmacy before remedy still and Canadian pharmacy no prescription restless (especially arms in children) feel dreams need legs less be pharmacy often and usually may who get have system some extremely anxious.Empty tries asleep twitch had itch Levitra online canada pharmacy fall the or whereafter and person more legs the to.Empty tries Canadian pharmacy cialis cheap asleep twitch had itch pharmacy fall the or whereafter and person more legs the to.Core Act pharmacy and 2009 nowhere smoking your starting signed 22 into well he cessation patience called buy cialis online canada pills lot of of Tobacco may importance while the to in June a Control practice your President pharmacy Obama the among takes on law.Strong up and half myself of thus pharmacy former flavor our coffee make consisting of someone bar very for buy viagra canada bars pharmacy they half small cream are n a around with coffee While.

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:





YOUR TITLE

by YOUR NAME

Copyright © YOUR NAME AND DATE

Cover artwork © ARTIST NAME

Table of Contents

Chapter 1

Chapter 2

Chapter 3

Chapter 4

Chapter 5

Chapter 1

* * *

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:

Find: $
Replace with: </p>\n<p>

In Microsoft Word:

Find: ^p
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:

<br />
<p style="text-align: center;">* * *</p>
<br />

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.

<p style="text-align:center;display:block">
<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).

Click convert.

Done.

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

Posted in How-To, writing.


18 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Tim says

    Thank you, very helpful.

    Do you really need the tags? Won't simple and work?

  2. ruzkin says

    Hi Tim! Glad I could help out. As for the italics tags, the classic <i> tags are oldschool HTML. With the move to HTML5 standards, they're now seen as inelegant and incompatible with CSS. In all honesty, if you're only building your HTML docs for conversion into .mobi files then <i> tags will do just fine, but if you ever want to keep those .htmls for use on a blog, or building a web-serial, then (in my opinion) it's better to go to the extra effort of using the most recent HTML standards.

  3. heartbreak_beat says

    Just wanted to let you know that I had great success at turning a 450+ page MS Word doc into an epub for my Nook! Thank you so much for sharing this!!!

  4. Aaron Shepard says

    Tim, for a Word user, this method makes no sense at all. The advice about replacing characters is especially bad, as it degrades the typography.

    See my article on converting from Word to Kindle.

    http://www.newselfpublishing.com/WordKindle.html

    Aaron Shepard

  5. ruzkin says

    Hi Aaron,
    While your method makes sense, it seems to take as much or more formatting time than mine, and includes several instances of what I can only interpret as forced formatting to get around the mangled way in which Word exports to HTML. The final output seems clean (I previewed Joy on Amazon) but when all is said and done I don't feel that your method saves any time, or creates any cleaner of an output. But if it works for you and others, then it's all good!

  6. Robert Browne says

    It's actually much, much easier to write in OpenOffice and format the file exactly the way you want it to appear on the Kindle. Output it to an odt file (the OpenOffice standard), then open that file in Calibre and convert.

    The resulting mobi file will come out exactly as you formatted it. Calbre accepts OO files without any problem and you save several steps doing it this way. I've never had a problem with it.

  7. David says

    Italics actually doesn't have to be such a pain if you use format searching and a very basic bit of regular expressions (with Word 2010, at least).

    1. Ensure your text cursor is in the find field.
    2. Open up "More >>" on the Find/Replace dialogue in your word processor.
    3. Click "Format" and select "Italic" from the style section, then press OK.
    4. Now that you're finding italic text, put ^& in the replace field and then replace all (the ^& bit just means "use the text found").

    And you can do a similar thing with chapter headings if you use styles for them, but you'll still have to sort out the "name=" parts manually.

    Not sure how well it works in OpenOffice or LibreOffice though.

  8. David says

    Correction to step 4: use ^& without the spaces.

  9. Ray Thomas says

    Will Amazon still accept a manuscript in the mobi format? Their latest info says to simply upload it in html format for them to convert. If it is still possible to do so I would much prefer to upload in mobi myself so I know exactly what it will look like.

  10. ruzkin says

    Yep, they still accept .mobi - I updated a book of mine just yesterday. I've never uploaded a straight HTML and don't know what the results would look like, but as the upload system has a built in previewer, you could always try the HTML and compare before committing to any single upload.

  11. Alex says

    Hi there,

    First of all thank you so much. I have spent the last 24 hours battling to try and format a single file to actually display well with tutorials actually from the Calibre website with no success. Every time I tried I ended up with no formatting and all of my html visible in the eBook. But I now have an almost effortless HTML file to convert. My only issue was that I couldn't seem to make it work with programs on my mac, but was a matter of a few clicks and copy/pastes using Notepad on the PC at work. Going to hopefully put it through Calibre at home and be away. But I was wondering if you knew of any programs I might be able to get for use on a Mac system for the same effect? TextEdit didn't seem to want to do it for me....?!

  12. ruzkin says

    Hi Alex,
    SubEthaEdit is an excellent text editor for Mac that is brilliant for editing HTML. There's a 30 day trial available on their site: http://www.codingmonkeys.de/subethaedit/

  13. Ravi Jagannadhan says

    How does this method handle images in the document?

  14. ruzkin says

    Ravi - You're right, I forgot to include image HTML data in this tute. See my freshly added step 7 for info.

  15. Jake says

    Simple? You've got to be kidding

  16. ruzkin says

    If it's too complicated for your liking, you could always find an agent and get published the traditional way.

Continuing the Discussion

  1. e publishing and how to go about it linked to this post on June 27, 2012

    [...] an ebook is remarkably easy. * Convert book from word file to ebook format * Submit to Amazon via DTP * Submit to Barnes and Noble via PubIT The Riyria Revelations: [...]

  2. Converting documents to ebooks linked to this post on September 7, 2012

    [...] to KDP. You can include the image via HTML tags. Yes exactly - Simple .html is the way to go. Here is a link that will take you through it step-by-step. The Riyria Revelations: There's no ancient evil to [...]



Some HTML is OK

or, reply to this post via trackback.