View Single Post
Old 02-25-2018, 02:23 PM   #2
sjfan
Addict
sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.
 
Posts: 281
Karma: 7724454
Join Date: Sep 2017
Location: Bethesda, MD, USA
Device: Kobo Aura H20, Kobo Clara HD
Quote:
Originally Posted by MarjaE View Post
I've converted some txt files to epub and mobi files. I've edited them to recreate chapter breaks.

Is there any way to add the table of contents and fix the navigation, so it's easy to flip to the next chapter?
If you've listed things in the opf correctly (html files under manifest, and then listed in the right order under spine) then you should flip to the next chapter automatically.

But your editor should do this for you by default, unless you're creating them by hand (which is a bad idea if you're not 100% sure what you're doing). Both Sigil and Calibre are free and work on most major platforms (including but not limited to Windows, Mac, and Linux). Sigil is an epub editor, Calibre is a whole ebook management solution (including conversion from epub to mobi with navigation+TOC once you're done editing) that includes an epub editor among many other things.

In both Calibre's editor and in Sigil, it's Tools->Table of Contents->Edit Table of Contents to edit the TOC.

If you used h1/h2/h3 etc for chapter headings then you can auto-generate a TOC. In Sigil there's a separate “Generate Table of Contents” entry in the same menu; in Calibre once you're in the TOC editor there's an option to auto-generate the TOC from major headings.

If you're editing by hand, you need a toc="blah" attribute on the spine tag in the opf, where blah is the id of an NCX file listed in the manifest. If you didn't already know that, though, you should probably use an editor. If you insist, the NCX format is discussed on the wiki.
sjfan is offline   Reply With Quote