3

Is there a way to completely remove or deactivate the external TOC? Would the code be written in the NCX file or elsewhere? If code could be provided that would be helpful as well.

  • The EPUB 2 specification doesn't refer to an "external TOC" in either of the OPS, OCF nor OPF specification. Where is this external TOC defined? In specification or just in some software you are using? – Anthon Jul 29 '14 at 14:54
  • I say external TOC to differentiate from the internal TOC which is literally inside the epub and is usually titled something along the lines of 'contents.html' The NCX file functions as the 'external TOC' because it is what allows the reader to generate a sidebar TOC outside of the 'book' for quick navigational purposes. I want to deactivate this functionality however, because I am working with a very simple children's book not requiring this functionality. – maxwell Jul 29 '14 at 16:43
  • Is there a particular portion of the NCX contents that you would like to hide? Or would you just like for the reading system to ignore the NCX file entirely? – Brandon Haugen Aug 19 '14 at 21:24
  • Ignore entirely – maxwell Aug 19 '14 at 21:28
1

You cannot deactivate/remove the ncx file. As the epub will not validate without it. Why dont you just simply remove all the links from within it, that way, if a reader does open it up in a sidebar it will simply show a blank screen. Not really user friendly though. I would recommend you add atleast one entry, pointing to the start of your book or your "internal toc". Taking the above into consideration your navmap inside your ncx file would look something like this:

<navMap>
    <navPoint id="navpoint1" playOrder="1">
        <navLabel>
            <text>Your book title</text>
        </navLabel>
        <content src="page1.xhtml" />
    </navPoint>
</navMap>
  • Okay, that's okay I guess - I'm working on a children's 10 page illustrated book where navigational means are obviously not necessary - I wanted to streamline the book without the NCX sidebar option because children will not really get what or why something is encroaching on their reading experience – maxwell Aug 27 '14 at 19:33
1

@Morne's answer is correct; you cannot totally disable the NCX file but of course you don't have to put anything (or very much) in it.

However, another option might be to build an ePub 3 file - the NCX is optional in ePub 3, so you could just omit it. That said, I do not know how existing readers render ePubs which do not contain an NCX.

  • epub3 is an option - that's true I might go that route - the guide in epub3 is necessary though but I don't remember how the guide manifests itself in the reader – maxwell Aug 27 '14 at 19:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.