![]() |
#1 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Dec 2021
Device: none
|
TOC formatting
Hi all,
I have been clearing up the html mess produced by Scrivener in my ePub 3 file. A staggering amount of spurious code - too much to cover here. All has been going well with Sigil. I have encountered an issue with my TOC. I had generated it in Sigil - results were OK. 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. How do I get rid of all the numbering and letters in the TOC? I just want the headings showing (this had been the case - no idea why Sigil has created such an ugly mess. Cheers, Mike |
![]() |
![]() |
![]() |
#2 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,765
Karma: 6000000
Join Date: Nov 2009
Device: many
|
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. Without specific examples of changes to those tags and to the resulting toc, there is no way to help. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 80
Karma: 2137678
Join Date: Dec 2021
Location: Canada
Device: none
|
I'm just learning SIGIL so I encountered that issue as well.
You have to go to the tools/table of contents/generate table of contents interface. And there you have to uncheck the "show TOC ....only" box and it will give you an overview of what's been checked and what hasn't. This should give you an idea of what you need to uncheck to clean up your mess. It takes a while to figure out what's going on with SIGIL. Like most programs, it has a mind of its own. ![]() Also, I only use H1 headings for my TOC. If you were to add subheadings, I would go with H2. In that way, you can also use the select menu to focus only on those two types of tags. Again, you have to get used to looking at SIGIL and what it's trying to do. This is based on my experience. Hence, it's not SIGIL law. |
![]() |
![]() |
![]() |
#4 | |||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Quote:
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> - Part 1 -- Chapter 1. The Beginning --- Section 1: Waking Up - Part 2 Sigil doesn't add any extra numbers or letters nonsense. Quote:
Code:
<h1 title="P1">Part 1</h1>
- 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. |
|||
![]() |
![]() |
![]() |
#5 |
Running with scissors
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,587
Karma: 14328510
Join Date: Nov 2019
Device: none
|
Expanding on what tex2002ans said, as another example, in the TOC I like to have the word Chapter in front of the chapter's number then a big dash then the chapter's title. So when it's all done my h2 tags look like the following
Code:
<h2 title="Chapter One — The place of Bruntisfield">One <span>The place of Bruntisfield</span></h2> Code:
h2 span, h1 span { display: block; font-size: larger; font-style: italic; /* overrides small-caps in 2nd .css file */ font-variant: normal; font-weight: bold; margin-top: 1.25em; } |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Dec 2021
Device: none
|
Thank you all.
I dealt with it by stripping out any <ol> and </ol> tags. Net result - a very nice TOC. Thanks for everyone's ideas. Cheers, Mike |
![]() |
![]() |
![]() |
#7 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,574
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Note that the NAV document in an Epub 3 has certain specifications it needs to follow. Stripping out the ordered list tags may not be the best answer in this case.
Sigil hides the numbering in its automatically generated nav.xhtml using css. namely: Code:
ol { list-style-type: none; } Last edited by DiapDealer; 12-13-2021 at 10:46 AM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
ToC Formatting Help? | RMOP | ePub | 16 | 07-10-2021 09:11 AM |
Aura ONE device-TOC formatting | Sam Sahara | Kobo Reader | 1 | 08-24-2018 07:36 AM |
Formatting the TOC | RickAltman | Conversion | 1 | 11-13-2014 12:43 AM |
Inline TOC formatting | phossler | Editor | 9 | 03-29-2014 06:05 AM |
Formatting TOC | jackibar | Sigil | 18 | 03-01-2012 09:02 AM |