Contents | Start | End | Previous: KB0219: Jutoh is telling me about a corrupt object or old formatting | Next: KB0221: Why are extra styles with 'No Space Before' or 'No Space After' created after importing from Word?


KB0220: How do I include picture headings in my table of contents?

If you have used images for some headings, instead of text, then you may find that when building an advanced table of contents, Jutoh doesn't include those headings (because they are images and not text, and TOC entries can only be text).

If these headings are the only matching ones in a chapter, then Jutoh will simply use the document title instead (so long as Add at least one entry per section is checked in the second TOC wizard page). However, if Jutoh finds any other headings, then it doesn't assign a heading from the document title automatically, because it's happy if it finds any headings.

Here are several options for fixing the problem.

1. Simplify your TOC

Consider using Jutoh's built-in TOC facility which simply takes document titles to create a single-level TOC. Run Format | Book | Build Table of Contents, and check Leave it to Jutoh.

Or if you still wish to use an advanced TOC, limit the number of levels to 1 in the TOC wizard, so that it has to automatically use the document title for each TOC entry if it doesn't find any actual headings.

Note that the Navigation Map, usually shown as a window on the left of the ereader software, is often limited to one level anyway. Only the generated TOC page is guaranteed to show as many levels as you wish. For most fiction, a highly detailed TOC is unlikely to be helpful since the reader will generally read in a linear fashion.

2. Turn the headings into text

If you use actual text for your headings, not only will building a TOC be easier, but the text will adapt to customer settings better than images, potentially making it a more pleasant experience especially if your readers have any sight problems. It will also help search facilities to work within your book. You can still add a pictorial flourish above and/or below your headings if you wish; format these with a non-heading paragraph style.

3. Use conditional content to feed headings to the TOC

This is the most complex solution, but gives you the most control.

You can create fake headings, wrapped in conditional markers which cause the text to appear in some configurations, but disappear in others. This way, we can create a TOC using these headings, but when we compile an actual book, the extra headings are automatically removed.

  1. Type your heading text in front of the chapter heading image (in the same paragraph, even if doesn't look like it in the editor because the image is shown under it).

  2. Select this text, and wrap it in a conditional object by double-clicking on condition in the Objects tab in the Formatting Palette. Enter the name "fakeheading" into the Tags field when prompted. This name will be used to switch the heading off during compilation.

  3. Now insert a bookmark at the start of the paragraph for the TOC wizard to find - e.g. called "chapter1". Use Format | Insert | Links | Bookmark (or Shift+Ctrl+K) to insert the bookmark. When the heading is removed, the bookmark will remain, just in front of the image, so the TOC entry has somewhere to link to.

  4. Do the above 3 steps for all chapters that have image headings.

  5. Create a new configuration, called, say, "Epub Build Contents", which we won't use to actually create an ebook file, but will be used for building the TOC. Type "include content" in the search field at the bottom of the configuration window. Set the option Include content matching tags to "fakeheading". This means that when we build a TOC using this configuration, we will include the fake headings.

  6. Edit your other real configurations, such as "Epub" and "Kindle", and set the configuration option Exclude content matching tags to "fakeheading". This means that Jutoh will omit the text headings when compiling actual ebooks.

So, when building your TOC after making changes to your book, switch to the "Epub Build Contents" configuration and run the TOC wizard. Then switch back to "Epub" (or "Kindle") to compile your actual book.


Contents | Start | End | Previous: KB0219: Jutoh is telling me about a corrupt object or old formatting | Next: KB0221: Why are extra styles with 'No Space Before' or 'No Space After' created after importing from Word?