ToC and Initial Page Compile Issues

I’m running into two issues on compile with Scrivener 3. First, I’ve been adjusting compile settings for Kindle today and my ToC suddenly changed. Each chapter used to be single spaced, but now I’m getting a return after each chapter causing it to be too long to fit on a single page. I have no idea what would have caused this to happen. I didn’t make any ToC changes directly. Any thoughts?

I tried to create my own ToC, as well, naming a page the same as the name used for the ToC in compile settings, but each time I tried I got an error and no .mobi file was created.

So far I haven’t received any responses on this issue. Anyone know why my ToC is suddenly being output with a hard return after each chapter? It’s autogenerated by Scrivener.

During Compile, choose Options and select: Save source files in a folder with exported Kindle file.

Open the resulting folder and find contents.xhtml.

Right click contents.xhtml and choose Open With > TextEdit. If TextEdit isn’t available as a default option, choose Other and navigate to TextEdit.

In TextEdit, the first line under the opening tag should define the TOC with an ID. It should look like:

<nav epub:type="toc" id="toc">

Go back to the folder and find a subfolder called css and then a file inside that subfolder called stylesheet.css.

Right click stylesheet.css and choose Open With > TextEdit.

Search for the ID found in the contents.xhtml (called “toc” in this example, and probably called “toc” in your project as well), as this should have the style settings used in the TOC. Example:

/* Table of contents navigation */ nav#toc ol { list-style: none; line-height: 1.5em; margin-top: 0.5rem; margin-bottom: 0.5rem; } nav#toc ol li:before { content: none; }

If we can identify/confirm the TOC ID and the styles that are being applied to that ID, we might be able to identify the setting that needs to be tweaked when compiling the project.

Thanks for the pointer on the css file. I was able to style the ToC in the custom stylesheet to tighten up the line spacing.

I’m still having a few other issues with the ToC when complied.

  1. The ToC is off center to the right. You can see that here…

  2. I’m not sure how to style the title “Contents” to match the rest of the headers in my book.

  3. The ToC is not listing the Cover at the beginning of the list. Is that normal?

If anyone can help with the above issues, I would sincerely appreciate it. I’m trying to get the T0C figured out so I can publish the first of next week.

I had issues with text being off-centre because my default compile style was indenting all paragraphs.
To overcome it I set the text to ‘centred text’ using the paragraph styles. That seemed to override the compiler styles.

It’s in the thread here:

Thanks for the suggestion. I gave it a a try, but the ToC is still off center to the right. I was able to figure out how to style the title “Contents” to match the rest of the headers in my book through css with the following modified section of code.

.page-title { margin: 0rem 0% 1rem 0rem; text-indent: 0rem; text-align: center; text-transform: uppercase !important; line-height: 1.2em; font-size: 1.65rem; font-weight: bold; }

However, I still need a ToC solution for the off center text and to get it to add the cover at the top of the listing.

Hi, I’ve been searching, trying to find this option but can’t. Is it in the compiler somewhere?


You’ll find that setting on the lower right here…

Ah, thanks - I’d missed that! :slight_smile: