Directly editing the toc.ncx is one option. Another is to delete the toc.ncx and form a ZIP of what is left and run the .zip through Calibre with epub as the output format. This might change other aspects of the files, but it should automatically produce an epub with a good toc.ncx for you.
|