You’ve written that great short story or novel, and you’re ready to embrace the digital revolution. Amazon is the biggest marketplace on the web, and the Kindle is the hottest reading device out there, so you quickly upload that .doc file you have to find out one simple, horrifying fact: It looks awful. Your pages of text all flow together, with no breaks between chapters. Your layout is mangled and ruined beyond all repair. You wouldn’t want to sell this book because you wouldn’t want to buy this book.
In despair, you turn to Google and turn up several well-written articles on what a .mobi file is and how to make one. However, these articles are written for people with technical know-how and you quickly realize it’s all going way over your head.
Don’t worry. I’m here to help. With this article, you will have a functional, professional-looking Kindle .mobi file in less than ten minutes, using software included on your Mac and free to use software from the Internet.
Here’s what you’ll need for this exercise:
TextWrangler (easy to use text editor for coders; don’t worry, you won’t have to do anything hard. Oh, and it’s FREE.)
Kindle Previewer (to compile your book into a .mobi file for Amazon and see how it looks.)
TextEdit (should already be installed on your Mac)
Pages (or your word processor of choice)
To begin, open your file in Pages. Make sure it is laid out professionally. The first line of each paragraph should be indented by selecting all and dragging the small line on the ruler in by a quarter of an inch. I’ve highlighted it in the picture to show you what I mean:
You should also mark your scene changes, add a title page with the name of your book, and a copyright page which should look something like this:
I usually also change the body text from Helvetica to Times New Roman; while the old Kindles don’t support custom fonts or styles, Kindle for iPad does support some features and the new Kindle Fire 8 software will incorporate more.
So, we have our file set up. Now, in the File menu, choose Export.
Choose to export the file as an RTF (Rich Text Format)
Now open TextEdit, and open the RTF file you just made.
Looks good, doesn’t it? Well, that’s nice, but a .mobi file is basically a fancy HTML file, so this RTF, if crunched into HTML by the Amazon software, would still look awful. But, TextEdit has the ability to export to HTML – and it preserves all your fancy text and pushes out some nice neat code that the Kindle software seems to like.
Duplicate the file from the menu, because for some strange reason TextEdit doesn’t have Save As, so you need to duplicate the file to force the save dialogue when you try to save it.
Now you have two files! Choose the new one and choose Save. The following dialogue should pop up. Choose the save as Web Page (.html) option:
Okay, so you have your HTML file. BUT – there’s a snag. If we put this through the Kindle software now, it would still not show the page breaks. Annoying, right? Don’t worry, we have a fix for that too.
Open TextWrangler. Open the .html file you just made:
At this point you’re probably in a panic. “What does all that text mean?” is the first question on your mind. Relax. If you don’t know what it means, you don’t need to. The only piece of code you’re going to need is right here, and I recommend you copy it to your clipboard right now:
What is it? It’s a custom page break for the Mobipocket format. It’s a page break that the Kindle software will understand. You only need to paste this into the file in TextWrangler at the start of a new chapter, and after your copyright and title pages. If you wade through the code, you should be able to find these points pretty easily.
All you have to do is paste it in where needed, Make a new line if you like to keep things nice and neat.
Save your file. Next, we’re going to open Kindle Previewer:
Click on “Open Book to Preview”. Choose the .html file you just edited. A window will pop up saying that KindleGen is converting it to a .mobi file. It will pop up a warning that there is no cover art. You don’t need to worry about this. When you fill in the details for the book on the Kindle Direct Publishing Store, you upload your cover art, and if it’s not in the file, Amazon will add it for you.
Check that everything looks as it should. Some of the fonts will be stripped away, the title might be smaller, and my copyright pages always float to the top of that particular page on some of the Kindle devices, but in general the book should look something like this:
Not bad, huh? Definitely better than the mess you were uploading.
When the Kindle program compiles the .mobi file, it outputs it to a folder. Inside this folder is the .mobi file you need to upload to the Kindle Direct Publishing Store.
Don’t worry if there is more than one file. Every time you choose to preview the file in a different format, it compiles it again and outputs another one. They’re all the same, unless you change the original HTML file and recompile it.
The file outputted by this method does NOT include a Table of Contents. If your story is less than 15,000 words, that’s not a big deal, but if you’re using this method to create a novel file, you really should consider putting a Table of Contents into your HTML code. It’s a little more complicated, so I’m going to write a different article about that at another time. In the meantime, there are several good articles out there that detail how to make a HTML TOC, so if you feel up to it, give it a go. Otherwise, you’re done!
If you have any questions, please e-mail me at email@example.com and I will see if I can answer them.