Wow! Thanks for the wonderful how-to. I'm new to coding for Kindle books, but have done HTML coding since before the year 2000.
The only thing I would like to add to your instructions is that I have been using a wonderful program called Arachnophilia to do HTML coding. It's a very basic program that types the HTML for you by clicking on a button. I would recommend using it instead of Notepad.
Just Google it, but download the non-Java (old) version. I like that version better because it takes up very little disk space and is super easy to install. Best is that it's free (Careware).
Arachnophilia also allows a preview, which opens a browser window with your HTML document in it. It does a pretty good job of showing what you will get.
If you make a mistake with the coding such as forgetting an end code, then the color of your coding changes, making it obvious you have a mistake.
Try it - you'll like it much better than coding in Notepad.
Thank you for your excellent post on TOCs. However, I am still having a problem. I have created the NCX file and declared it in the manifest of the OPF file but when I edit the <spine> section from <spine> to <spine toc="toc2">, the MBC build fails and there is no message to explain the failue. It just hangs up. If I put the spine back to it's original saetting then the build completes with no errors but, of course, there is no NCX TOC.
I would appreciate any help you miht be able to give me.
the procedure I described for NCX only works with KindleGen, I tried using it with MobiPocket Creator myself once or twice and it failed. If you use KindleGen as described in the main post, then everything should go smoothly.
Interestingly, I have now found that if you amend the opf file as described, the MPC build fails. However, if you run KindleGen to build a MOBI file, MPC will subsequently build normally. I do not know why but it works.
Interesting. I am guessing this has to do with the changed toc-mbp_toc_intermediary.xml file in the _opfcache folder because none of these programs changes the .opf file while building the final book.
That file is also key to the fate of the mbp_toc.html file. If the intermediary has an older "Date modified" on it than the .opf file, both KindleGen and MPC will rebuild mbp_toc.html. This problem can be prevented if you change your system date while editing the .opf file.
I'm trying to get KindleGen to work and am having more negatives than positives at the moment.
I'm not an HTML wizard, but I'm no dummy either. My first several websites in the 90s were written from scratch. My code for my book is really pretty straight forward.
The first time I tried to use KG (using my MPC opf file as a start), I kept getting "opt version: try to minimize <default>" error
then a return to the c-prompt
thinking it was complaining about my cover size, which was a bit over what you recommended, I reformatted as per your very nice instructions. I finally got KG to work, but the MPC-created TOC (which worked fine in the prc format) gave all hyperlink errors.
Saving you the long version, I ended up starting over, got down to my basic files, generated a prc file with my TOC (embedded in the file with a div ID tag, referenced in MPC's "guide" funtion) rather than MPC's TOC. I ran Kindlegen and voila! Got a lovely mobi file.
Except the "go to beginning" was taking you the wrong place. I went and checked the file. I'd put the "start" tag you recommended in the right place, but it wasn't working. I tried moving that tag to the beginning of the book, saved...and this time when I tried to run KindleGen, I got that expletive deleted "opt version: try to minimize <default>" msg again.
[i]I'm not an HTML wizard, but I'm no dummy either. My first several websites in the 90s were written from scratch. My code for my book is really pretty straight forward.
Then probably your best bet is to upload the html and skip all the intermediary stuff.