ToC Again

I know there are multiple threads on ToC, but I could find my particular problem. I am formatting a book for someone who wants the chapter title and a picture, then on a new page, the document. I have created a folder with the chapter title and a link to the picture. Then I created a document file within the chapter folder and put his writing there. When I compile, I wind up with double chapter titles above the picture, sometimes, sometimes no pic, and then the scene. The ToC lists both the chapter title and
“Scene.” I don’t want the “scene” listed in the ToC, but I want it in the book. What am I doing wrong?

In your case, with the type of formatting you are doing, you will most likely want to make your own ToC rather than relying upon the automatic generator. The type of layout you are describing isn’t a typical one for e-books, and our generator is based on typical use cases (it’s a lot, lot more difficult to go beyond simple assumptions for this). Here is what the engine assumes:

  • Each section in the e-book is a significant section that should be listed in the ToC.
  • A section is defined by anything using a section break (page break as the UI often refers to it).
  • Scrivener creates sections by producing individual internal files in the e-book, and according to e-book specifications, each file needs to be listed in the manifest—which is used for the ToC.

What this means in practice is that if you have a chapter break for a title page, that’s one section—one internal e-book file—and then when you cut to a new “page” for the chapter content, that’s a new section. This is where the assumptions above break down, as you’re using the section feature to exert formatting and getting strange results because the formatting, in this case, is intrinsically tied to the listing mechanisms.

[size=120]Double Titles[/size]

All right, theory aside:

You will get best results with e-books by letting the compiler generate your titles for you, which is what it sounds like you’ve already got going—the problem is that you have titles typed in by hand in the chapter folders, too, hence you get two of them. I would recommend removing the typed title from the folders and just let Scrivener handle the numbering/titling. All of that is set up in the Formatting compile option pane by the way.

You could of course switch off the Formatting pane stuff and just keep things as you’ve set them up in the Draft, too. Just be aware that the e-book generator will still be using folder names and such for the output, because it doesn’t know that what you’ve typed into the text editor in 24pt bold (or whatever) is supposed to be the title.

Using the <$title> placeholder in the text editor (above the picture) instead of actually typing in the full folder name is a good way of handling this. That way you can fix chapter names at the folder level and not worry about going in and fixing the text too.


How are you linking to the image? Is it an image link to the disk, with a preview in the editor (as though you had embedded it), or are you using the text code, <$img:Binder Name>?

For links to the disk, I would check and make sure the pictures that aren’t working are where you expect them to be, and I would also check them to make sure they are set up to be suitable for e-books. If the format is unusual, or the picture is saved in CMYK colour space, then it may not show up in most reader devices.

For text links, the usual, make sure there are no typos and try doing a PDF test compile and see if they all show up.

[size=120]Table of Contents[/size]

Okay, if you want to stick with the chapter title page concept, you’ll need to do some post-compile work. Again, I don’t know if you using e-books or not, but I’m guessing so based on the phrasing. A good post-compile e-book finishing tool is Sigil. This can be used to pre-flight Mobi books as well, just save the ePub with Sigil and then use Kindle Previewer to open the ePub and convert it to Mobi.

As for what you’ll need to do:

  • First, make a custom ToC file in Scrivener. This is easy to do, by default Scrivener will look for a file called “Contents”[size=80][1][/size] in your Draft folder, and if it finds one it will use that for your ToC page. This gives you complete control over both the contents and formatting of the ToC. The basic idea is to include a Scrivener Link pointing to each section. This is easily done by selecting all of the chapter folders and using the Edit/Copy Special/Copy Documents as Scrivener Links, and then pasting that list into your “Contents” file.
  • After compiling, you will also need to clean up the “software” ToC, which is increasingly used by e-book readers to provide menu-based navigation. If you only do the first part above, you’ll have a nice visible ToC in your book, but when readers hit the “Go To” button they’ll see the Chapter - Scene situation. This is what you will need Sigil for. Open the ePub file, and use the Tools/Tables of Contents/Edit Table of Contents menu command to remove the extraneous “scene” entries.

Or, like I say, produce an output that will fall within Scrivener’s assumptions and have the chapter title on the same “page” as the content. Doing that, you could also greatly simplified your Draft outline, as it sounds like you’re just putting one file into each folder, and that’s a lot of messing around. If each chapter is essentially one file, it makes more sense to have a flat list of files and just the compile settings accordingly (if you started with a project template, you’ll usually find instructions on how to do so in the about file that came with it). Then again, if you’ve already got 50 of these things set up, it might be easier to just leave it be :slight_smile: especially since it sounds like you’re just using Scrivener to make an e-book, so optimising the efficiency of your Binder navigation isn’t a primary concern.


  1. You can change the name Scrivener looks for in the Layout compile pane.


Thanks! Great help.

Using Sigil to clean up the epub file was great. Any suggestions to cleaning up the mobi file?

I prefer Sigil (unfussy interface) but doesn’t Calibre support Mobi formated files?

There are two routes you can take:

  1. In the KindleGen compile option pane, check off “Save the source files in a folder with the exported Kindle file”. This is the more advanced approach. You’ll have everything you need to create the Mobi book, and when you’re done editing the component files just open the .opf file in Kindle Previewer, or use KindleGen from the command-line.
  2. Compile to ePub instead of Mobi, use Sigil as before, and when you’re done open the .epub file in Kindle Previewer, or use KindleGen on the command line.

It isn’t recommended that you use Calibre to generate a production .mobi file at this time, as it will only produce either the legacy .mobi or the KF8 .azw3 separately, rather than in a compatibility package like KindleGen will, with both. The .mobi files that KindleGen produce can be opened on a Kindle gen 1, or a Fire HDX and look great either way.

It’s fine if you’re just making a proof copy for yourself though. Choose the best option from the Calibre conversion tool.

Thanks, Amber!