My eBook eXperience -- part three of many

In which I get my manuscript into Kindle format...

I believe you can send a Word doc, rtf file, or other format to Amazon, and they will send it back in Kindle format. But, a hacker at heart (in the old-school sense of the word), I wanted to get as close to the source as possible. Mobipocket Creator is a free application that turns a Word or html document into a prc file, which is one of the Kindle formats. Here's where I encountered my first compelxity. I have Word 97 on my desktop PC. (Yes, I'm a dinosaur. It's even worse than that. I just use Word to convert my mansucripts before I send them out, since I write everything using Word Perfect 5.1, running under DOS. I call it The Blue Screen of Life.) I have Word whatever (some fairly new version from this century) on my laptop.

Here's the problem. Either version of Word can write an html file. The new version of Word preserved my page breaks, but didn't seem to preserve my table of contents (TOC). The old version did just the opposite. (I later discovered that I couldn't use Word's TOC generator for my Smashwords file.) Word 97 produced a much cleaner html file. This might not really matter. If the file works on the Kindle, you might think it it isn't a problem if the html was messy. But what if newer versions of the Kindle had problems with bad html? I wanted the source to be as pure and clean as possible. Solution -- I loaded my Word doc into Open Office, and wrote out the html from there.

Here come some technical tips. Anyone not formatting a Kindle book can skip this paragraph. I learned a lot by looking at the html generated by Open Office. If you're doing this, the first thing to do is check the styles at the top. Word has a bad habit of changing or adding styles. I thought I was only using Header 1 and Header 2. But, in the Open office html, I saw definitions for h1, h2, h3, and h4. (It was easy to find them in the original doc with a search.) Now, I wanted to remove as much of the unnecessary formatting as possible. That was easy. The html defined a paragraph style, followed by a western version. I just did a search-and-replace to change CLASS="western" to nothing. (I use Arachnophilia for editing html. For those of you who are keeping count, we're up to four pieces of software -- Word, Open Office, MobiPocket Creator, and Arachnophilia. There will be more.)

Let me pause here a moment and reiterate that I am not claiming I did anything the easiest or smartest way. I just stumbled along, and had a lot of fun. I felt like I was back in my programming days. For me, the thrill was in figuring out why something didn't work they way I thought it should (or work at all), and by finding ways to get around the problems. I figured I could pass along some of the ways I removed various stumbling blocks. Which brings me to the biggie. Mobipocket Creator does an amazing job. It even has a wonderfully powerful TOC generator. (By this point, I'd deleted the TOC I'd generated within Word, and just used H1 and H2 styles for the parts of the book.) But there are two small problems. The TOC is done as an unordered list with bullet points, and it is put at the top of the book, before the title page, copyright page, etc. (The thing that can confuse people is that the TOC genrated by this software appears in two ways. It shows up when you use the Kindle's "go to" feature. It also shows up as a page or pages in the book.)

There are solutions for each problem. Mobipocket Creator lets you include mutliple html files. So I removed my title page, put it into html, and saved it as a separate file. For those using Mobi, here are the steps. Load the main html file. Load the title-page file. Make the TOC. Highlight the title-page file and slide it to the top of the list. Done. (Not counting non-related stuff like the cover and metadata.). If the bullet points bother you, you can change the html. It's in a file called "mbp_toc." The problem is, the file is genrated without any line breaks, so it is hard to read and modify unless you massage it first. If you want to play with it, try replacing all UL and LI entries (along with the brackets, to avoid messing up regular words) with P or BR. (Remember, if you need to regenerate the TOC, all your work will be written over.) I decided the bullet points didn't bother me.

So, now I had a Kindle version, just several hundred hours after I sat down to build it. Next time, onward to the Nook.

If you have a Kindle, you can download a sample to see how it came out.

click analytics

 •  0 comments  •  flag
Share on Twitter
Published on November 08, 2011 05:57
No comments have been added yet.


David Lubar's Blog

David Lubar
David Lubar isn't a Goodreads Author (yet), but they do have a blog, so here are some recent posts imported from their feed.
Follow David Lubar's blog with rss.