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.
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.
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.