I’ve been playing around with the Scrivener 3 Win Beta (RC17) to try and output an epub. It has been mostly painless until compiling an epub. Most of the issue has been around the creation of a Table of Contents.
I have resorted to creating a manual table of contents after various issues with the automatic creation.
I have created a page entitled Contents in the Front Matter section.
I created a Heading saying Contents using the Heading 1 style.
I have selected the items I wanted to be in the table of contents then used Edit > Copy Special > Copy Documents as Structured Link List, pasting the result to my Contents page under the Heading.
The ToC looks fine at this point so I choose to compile with the epub format.
I assign the Contents page as a Table of Contents section type, changing its section layout to be ‘as is’ (or ‘new section’ or even ‘table of contents’. Nothing seems to make a difference).
I enable convert document links to HTML links, otherwise I get no links in the output.
I set the ToC to flat and turn off the generation of an HTML contents page.
When I open the resulting epub, the ToC looks fine except that from the second item onwards, everything as a text-indent when they should all be aligned to the left margin like the first item.
I have looked at this page which appears to have a similar issue. The first image on the page looks exactly like the issue I am having: [url]https://forum.literatureandlatte.com/t/removing-indents-in-custom-toc-for-epubs/43707/1]
It didn’t appear to have any official solution or acknowledgement of a bug.
I’m not sure how accurate it is, but I inspected the code in Calibre, and that suggests that the ToC is a series of
tags. The CSS code declares that p + p must have a text indent. While this is normal behavior for the body text it is undesirable for a table of contents.
If I place a blank line between each item in the ToC it outputs fine with everything have a uniform indentation. This isn’t the look I want and is also extra work and takes up much more space.
I suspect that the use of a custom compile format and CSS code etc may provide a work around, but that shouldn’t be the answer for a very basic ToC.
Can I also get confirmation that the whole <$toc> thing has yet to be implemented in the Windows Beta? (There’s a thread somewhere where someone suggeted this was the case. It will explain while all my attempts to get an auto generated ToC that was not at the very front of the ebook were failing)