When you delete the chapters, you also have to remove the references to those files from the content.opf and toc.ncx files. You can edit them with any text editor.
The content.opf file is the manifest that has all the info about the files contained in the book, it should have two lines for every chapter, one in the <manifest> section that will look something like this <item href="Text/chapter04.xhtml" id="chapter04" media-type="application/xhtml+xml" />, one in the <spine> section that will look something like this <itemref idref="chapter04" />, you need to delete both lines for every chapter. Also any images used only in the deleted chapters will also need to be deleted from the epub and the <manifest> section.
The toc.ncx is the table of contents for the book, this is what allows you to select a chapter from your reader menu, there is a section for every item in the table of contents that starts with <navpoint id="navpoint-something" playOrder="something"> and ends with </navpoint> delete everything between and including those two tags for every chapter deleted.
Also you could use Sigil to delete the chapters and it will automatically update the content.opf file, and you can do the editing of the toc.ncx in Sigil.
Last edited by Keroberos; 10-06-2011 at 11:25 PM.
|