Blog

Home > Scrivener  > Compiling with Scrivener 3: Contents page for an eBook

Contents Page for an eBook (Compiling with Scrivener 3) | ScrivenerVirgin

Post amended: 17 August 2019, to include the autogeneration of a ToC!

An ebook needs a dynamic contents list

The process of setting up a table of contents (TOC) is straightforward!

First, you have two choices:

  1. Let Scrivener do it for you
  2. Do it yourself

Letting Scrivener do it for you

When you choose ebook from the output options, an additional icon appears in the right-hand pane. The default setting is that Scrivener generates the ToC page for you with the title ‘Contents’.

Try this (without making any changes to the default settings) and see what you think of the ebook Scrivener produces.

I prefer to generate my own ToC, so I uncheck the ‘Generate HTML table of contents’ box and use the DIY method below.

Doing it yourself

Step 1: Decide what is to appear

Setting up the binder for a TOC | Compiling with Scrivener 3: Contents page for an eBook

Your aim is to set up the Binder so it shows whatever you want to appear in the content list.

Bear in mind that each entry will form a hyperlink, so be as helpful to your reader by providing a clear view of the structure of your book.

Expand/collapse folders to suit yourself – and your readers – and then, select them all as shown in the image.

NB: Don’t include the Contents!

Step 2: Create the contents list on the clipboard

Having set up the Binder as you wish, and selected the relevant entries, select Edit / Copy Special / Copy Documents as ToC.

 

Copy Documents as TOC

Step 3: Paste the ToC into the Contents document

I already had a document called Contents, so I Selected All before I pasted the new ToC into place.

Step 4: Choose the Table of Contents settings

As soon as you paste the ToC into place, Scrivener presents you with this pane. I didn’t argue! Click Ok.

TOC settings

This is what then appeared. The <$p> at the end of each line are for the page numbers which would be automatically calculated during the compile process.TOC with page numbers | Compiling with Scrivener 3: Contents page for an eBook

For an eBook, the page numbers are not needed, so delete them all, leaving just the hyperlinks for the titles of your documents. It should look like this before you compile.

TOC for eBook | Compiling with Scrivener 3: Contents page for an eBook

And, when you compile …

compiled TOC for eBook

You might be tempted to add more detail to the contents list, or take some material out, to make it fit better on a page. However, remember that the reader decides on the page size. Best to leave well alone. It works, and that’s enough.

Questions? Need a helping hand? Want a demo?

To watch me demonstrating how to set up the ToC for an ebook or to ask any questions, book a Simply Scrivener Special.

To help me to prepare, you could also complete this short questionnaire.

The ScrivenerVirgin blog is a journey of discovery:
a step-by-step exploration of how Scrivener can change how a writer writes.
To subscribe to this blog, click here.

Also … check out the Scrivener Tips
on my ScrivenerVirgin Facebook page.

10 Comments
  • Bob

    12 October 2021 at 15:31

    The copy and paste as TOC worked great. However, I did not get the screen asking for TOC formatting. When I compile in ebook format, scrivener does not recognize the custom contents page – still creates its own.

  • Pingback:Scrivener – Gears in Progress

    4 January 2021 at 23:09
  • Merv Miller

    24 January 2020 at 23:07

    A comment and question. Comment – the write-up above does not specifically state to paste the highlighted Binder contents to the “Contents” document. Small item but confused me.
    Question – having followed your instructions above I DO create very nicely formatted ToC and what appear to be hyperlinks, but none of these links work. They work fine in Scrivener, they do not function in my iPad 10.5 as a Kindle .mobi. The links are blue and underlined, but they are static like normal text. Trying to build a Cook Book for the wife with hyperlinks for global categories like “Main Dishes” and “Beverages” and so on with specific recipe documents under those global categories.

      • Mervin Miller

        26 January 2020 at 03:43

        Anne; thank you for the offer, but the project isn’t that important. I did export as an eBook and that failed. I also observed situations where as I tried different Binder configurations the hyperlinks were not generated, just flat lists. Cannot figure out what change did what.
        I really haven’t liked Scrivener 3 for Kindle .mobi files because paragraph indents were eliminated, making my eBooks harder to read.
        And the Kindle Previewer 3 app is not a faithful representation of the .mobi file displayed on an iPad. Nothing nice to say so won’t say more.

  • PJ

    17 August 2019 at 03:33

    Thx for creating this. Very clear, very helpful. Just curious tho: Scrivener will automatically build a TOC for ebooks from the Binder structure. What is the advantage of doing the copy-and-paste approach outlined in the article?

Post a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.