Originally Posted by nickredding
Kovid--Thanks for the explanation, and the debug code seems to be working now so I'll have another look at it tomorrow.
I have abandoned this now. In spite of my modified MOBI writer.py generating a file that is virtually identical to that generated by Kindlegen v1.1 in terms of indexing and TBS, it still doesn't work. I'm quite happy with my external solution using ebook-convert-->OEB-->Kindlegen and I'll stick with that unless someone comes up with a miraculous cure.