It’s been a longer road than I expected (silly me, I believed Amazon’s FAQs on publishing) but I think I have the eBook recipe ready. A final proofread is still in progress but Prince of Leaf and Stone should be live by end of the month.
The main problems I encountered had to do with getting a TOC (table of contents) in my doc, getting a TOC that comes up from the Kindle menu, getting that TOC to look right, and getting the book to open in the right spot. None of those are showstoppers but getting those right can make a book look more professional.
My experience has been with Scrivener for Windows, which is much less featured than the Mac version, in particular missing a feature that lets you set the start of doc.
Things You’ll Want
You definitely want the Kindle Previewer, which despite it’s name, not only let’s you preview your book, it will convert html and epub files to Amazon’s .mobi format.
You’ll also want Send to Kindle which is both a stand-alone app and something that you can get to from your file browser on a right click, which let’s you upload files to your Kindle (or a friend’s Kindle). Thing to remember: it will only appear on a right click for those file types it can upload (.mobi, .doc, .pdf) and not for others, like .epub.
You may also want KindleGen which is not needed for one-off mobi conversion (Kindle Reader does that) but can be used for bulk conversions. More importantly, if you want to write out .mobi directly from Scrivener, you’ll need KindleGen.
What Doesn’t Work: Scrivener -> MS Word -> HTML
Amazon suggests editing your book in MS Word (Scrivener writes out .doc and many other formats), adding an MS Word TOC, adding bookmarks for where your TOC and start page are, then writing it out as Web page, Filtered (html). You then use Kindle Previewer to convert the html to mobi. This does get you a mobi file and there is a TOC embedded in the document but you don’t see the TOC in the Kindle reader menu nor does the start page get set.
I found lots of kind posts on the web saying this does work or ways to directly edit the html to add the start and toc tag but none of that worked for me. Start and TOC remained stubbornly absent. From the posts I found on this, I’m not the only one who can’t get that to work.
What Also Doesn’t Work: Scrivener -> Mobi
Scrivener can write directly to mobi so I tried that. The table of contents does appear in the doc and from the Kindle menu but the starting position is second page of my TOC. This is apparently an issue of at least 2 years standing, not just an odd quirk of my doc.
The Kindle TOC also puts some but not all of my front matter (copyright, dedication, etc.) under a collapsible header. No matter how I organize my front matter in Scrivener, it doesn’t seem to group all of the front matter under the header.
Still more failure: Scrivener -> epub -> Kindle Previewer
Scrivener can also write out epub files. Tried that, converted them in Kindle Previewer. Same as the direct mobi path.
What does work: Scrivner -> epub -> edit epub file -> Kindle Previewer
After more research, I discovered that an epub file is easily editable because it is just a .zip file. Rename it to .zip, extract the files– which are all plain text– and rezip it when you are done. It’s surprisingly easy.
What you want to do, according to a forum post here is find the guide part of the file content.opf. This file can be edited with any text editor such as Windows NotePad. You will probably find something like the following at the bottom:
<reference type=”cover” title=”Cover” href=”cover.xhtml” />
<reference type=”toc” title=”Contents” href=”contents.xhtml”></reference>
Before the </guide> (in html <xxx> is like an open parentheses for a particular object type and </xxx> is like the close parentheses), add the following lines (in bold), replacing body3.xhtml with the chapter you want to start with (you can open the .xhtml files in NotePad or Word or your browser to figure out which one is your chapter one):
<reference type=”cover” title=”Cover” href=”cover.xhtml” />
<reference type=”toc” title=”Contents” href=”contents.xhtml” />
<reference type=”text” title=”Text” href=”body3.xhtml” />
<reference type=”text” title=”Start” href=”body3.xhtml”></reference>
Actually, I didn’t find a source that said to add both of the bold lines (the various pages I found recommended one or the other) but the first one of the two only seems to fix the front matter grouping problem for me, the second one actually seemed to move the start page.
Full disclosure: this didn’t actually move the start to where I told it to go but it did move it to my title page which is much better than the second page of my TOC. So I’m declaring victory.
The steps that worked for me are:
- Write out a .epub file from Scrivener
- Change the .epub file to a .zip file and extract it to a temporary directory
- Find the content.opf file (which is usually in a sub-directory) and edit it
- Add the two extra lines (above) to the guide section and save the file
- Make a new zip file
- Rename the zip as .epub
- Use Kindle Previewer to convert the .epub to a .mobi
- Check it out in the previewer (where the start page for me is actually where I want it)
- Upload it with Send to Kindle and check it on a real Kindle (where the start page is not where I want it but is in an acceptable place)
This all seems like it is a lot harder than it should be because how hard can it be to specify a TOC and a start page? But there you have it; it is still pretty clunky. And probably buggy: pretty sure the start page should not be different between the Previewer and the Kindle: Amazon has something broken.
You can probably have Kindle Previewer convert the html files directly without making a .epub (i.e., skip steps 5 and 6) but I didn’t try that.
Also, if editing the html is daunting, there is a free program called Sigil that lets you edit .epub files. I didn’t try it because after many hours of messing around, I wanted to write the html exactly as I wanted it.
There are folks who will do all this for you for a fee. I didn’t price it but it shouldn’t be all that much since this process isn’t that hard once you know your way around it.