Contents | Start | End | Previous: KB0045: How can the title 'Table of Contents' be shown in a different language? | Next: KB0047: Removing underlining and colour from links


KB0046: How do I link back from section headings to the table of contents?

See also: Why are there bookmark errors referencing the table of contents when compiling an ODT file?

It may be that you wish to provide a link back from each heading to the table of contents.

Some ereaders provide a back button that will help, and of course most provide the means to navigate to the TOC, but otherwise you would have to create links from the headings back to the table of contents. It's a bit time-consuming to do so I'm not sure it's really worth the effort, but here's how you could do it.

  1. In front of each heading in each of your chapters, insert a bookmark (Format | Insert | Links | Bookmark) without selecting any text, and type a suitable bookmark name for each, e.g. chapter1. A bookmark symbol should appear just before the heading.

  2. Make sure each heading has the appropriate paragraph style, e.g. "Heading 1" for chapter headings.

  3. Create an advanced table of contents using Format | Book | Build Table of Contents, choosing to insert a TOC section gathering entries from headings in your book. Make sure you don't opt to automatically create the TOC each time (the option in the final page of the wizard). This will create a TOC that links to the bookmarks you created earlier.

  4. Now, select each chapter heading in your book (not in the TOC page, but in the individual chapters) and create a link from that text back to the TOC, using Format | Insert | Links | Link to Page. When making the link, select the bookmark for the TOC in the link dialog, which should be tableofcontents.

When you compile your book, it should now have links from chapter headings back to the TOC, though the headings will be blue and underlined which doesn't look great - see Removing underlining and colour from links for how to eliminate link formatting for each chapter (or all chapters).

If your TOC is likely to span several pages and you want to take users back to the relevant TOC entry instead of the top of the TOC, you could add bookmarks in front of the entry text (again, without selecting any text so you get a symbol), type a unique bookmark name, and link to each of those bookmarks from your chapter headings instead of to the entire TOC page.

Important note: If you are compiling an OpenDocument (ODT) file, you may get missing bookmark errors. This is because in ODT mode, Jutoh replaces the TOC in the project with its own ODT-specific TOC, without any bookmarks that might be in the project TOC. For how to fix this, please see Why are there bookmark errors referencing the table of contents when compiling an ODT file?


Contents | Start | End | Previous: KB0045: How can the title 'Table of Contents' be shown in a different language? | Next: KB0047: Removing underlining and colour from links