Feature Request

I’m not a coder, just a writer and editor. Having begun assisting some friends with getting books formatted for Kindle (and e pub) I’ve encountered one issue that it would be fantastic to see future updates of Scrivener address: Table of Contents.

To the best of my knowledge from reading the manual and trial and error, the best, and only practical way to create a Table of Contents is to have it done automatically during the compile, by the Compiler. What I’ve noticed, (and please, inform me if this is incorrect) is that the only way to force a content line in the compiled book is to create (check) Page Break before the relevant material. This forces the compile app to create a content line that includes the first available sentence, or phrase or word after the Page Break. Usually it is Chapter #, but where the author is trying to Create a link to a subject or content line, that will work also.

However, because electronic books don’t have “pages” in the actual meaning of the term, what I’ve noticed is that when you do this, often it leaves a lot of empty white space at the end of each chapter, before the forced break.

If there is anything that you scripters and coders can do working on updates of Scrivener to enable a smoother and more efficient way to create Tables of Contents, ways in which the author can have some more control over the look of the final output, (eventhough I’m aware that look fluctuates, even now, depending on whether you move forwards or backwards through the e-book) in the same way one would have control over laying out a physically printed book, this would be greatly appreciated. Greatly appreciated. GREATLY appreciated.

Thanks, Paul H.

P.S. I did notice an option in the many output options that has something to do with eliminating “white space” - but when I checked that it produced no discernible difference in the final Kindle book I was experimenting with.

The empty space may be added by the ereader software to indicate a section break, although you could check the “page padding” setting in the Formatting pane of Compile, which allows you to insert several blank lines before chapter titles (the default for many formats). The only thing page breaks do when compiling to ePub or Kindle formats is tell the compile process to start a new HTML file at that point (which then adds that section to the automatically generated TOC).

You don’t have to use the automatically generated TOC, though. Instead, you can create a document somewhere in the Draft or front matter folders to act as the TOC. Format it as you like using Scrivener links to link to the sections you want in the TOC, and be sure that the name of the document is specified in the Layout pane of Compile so that it knows that should be used as the TOC and it doesn’t need to generate one automatically.

Hope that helps,
Keith

There’s also the option in: edit > copy special > copy documents as ToC

That allows you to select documents and paste a ToC into a page with dynamic reference links and page number variables that presumably are filled-in on compile. You can edit the formatting and text of this ToC as you like! :smiley: