Thread: TOC formatting
View Single Post
Old 12-12-2021, 06:29 PM   #4
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by canine View Post
[...] I further edited my document and regenerated the TOC - it now looks horrible. The TOC now shows each entry with either a number, or next level with letters or multiple letters e.g aa, ab, ac - looks awful. The first time I generated the TOC - it just showed the headings - now I have this mess of ugly formatted lists.
Can you take a screenshot of this?

Quote:
Originally Posted by canine View Post
I have been clearing up the html mess produced by Scrivener in my ePub 3 file.
I'm assuming this Scrivener mess infected everything else in the book too.

Sigil's Tools > Table of Contents > Table of Contents generates based on your <h1> -> <h6> tags.

Code:
<h1>Part 1</h1>

<h2>Chapter 1. The Beginning</h2>

<h3>Section 1: Waking Up</h3>

[...]

<h1>Part 2</h1>
would create a TOC with:

- Part 1
-- Chapter 1. The Beginning
--- Section 1: Waking Up
- Part 2

Sigil doesn't add any extra numbers or letters nonsense.

Quote:
Originally Posted by KevinH View Post
Sigil only ever builds its toc from the contents of the heading tags h1, h2, h3, etc.
So whatever you have done has changed the contents of those tags in some way. If you want to override a heading tag you can set a different string in that tag's title attribute. This can be made easier using the TOC Editor.
Yes, like KevinH says, you can manually override what gets written in Sigil's TOC by using title:

Code:
<h1 title="P1">Part 1</h1>
which would show up in the TOC as:

- P1

... but it sounds like you have some serious underlying Scrivener issues that have to be dealt with first.

Last edited by Tex2002ans; 12-12-2021 at 06:35 PM.
Tex2002ans is offline   Reply With Quote