Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 12-12-2021, 03:58 PM   #1
canine
Junior Member
canine began at the beginning.
 
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
canine is offline   Reply With Quote
Old 12-12-2021, 05:53 PM   #2
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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.
KevinH is offline   Reply With Quote
Advert
Old 12-12-2021, 06:05 PM   #3
roland1
Connoisseur
roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.
 
roland1's Avatar
 
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. I've been at it for 12 days. Getting used to it.

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.
roland1 is offline   Reply With Quote
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
Old 12-12-2021, 09:17 PM   #5
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
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>
Then in the book there is no word Chapter, just the One. (For some reason it looks sort of bare not having the word Chapter in the TOC but in the book it seems redundant given that it's at the top of the page at the start of the chapter.) Then a blank line, then the chapter title. Moving the chapter title to its own line is done with some css on the span, specifically the display:block
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;
}
I have a bunch of search and replaces in sigil's Saved Searches that reformat the chapter titles from what I originally had, h2 contains the chapter number and h3 contains the chapter title.
hobnail is offline   Reply With Quote
Advert
Old 12-13-2021, 05:33 AM   #6
canine
Junior Member
canine began at the beginning.
 
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
canine is offline   Reply With Quote
Old 12-13-2021, 10:44 AM   #7
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
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;
}
From your original comments, it sounds to me as if you may have inadvertently deleted either the link to the NAV's css, or deleted some inline styling that Scrivener output.

Last edited by DiapDealer; 12-13-2021 at 10:46 AM.
DiapDealer is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 01:34 AM.


MobileRead.com is a privately owned, operated and funded community.