Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Closed Thread
 
Thread Tools Search this Thread
Old 07-10-2022, 05:14 PM   #1
bookman156
Addict
bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.
 
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
How do I get rid of Table of Contents?

I'm making an epub3 in Sigil. It is a continuous text so has nothing to put in a Table of Contents. But Sigil puts a Table of Contents at the back with the single entry 'Start', which links back to the beginning.

Can I get rid of this as it seems a bit silly? I guess I could have:

Quote:
nav#toc {
display:none;
}
in the sgc-nav.css file, but is this good practice, will it interfere with the use of the epub?

Appreciate any advice people have.

Last edited by bookman156; 07-10-2022 at 05:17 PM. Reason: spelling
bookman156 is offline  
Old 07-11-2022, 09:36 AM   #2
un_pogaz
Chalut o/
un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.
 
un_pogaz's Avatar
 
Posts: 439
Karma: 145424
Join Date: Dec 2017
Device: Kobo
Theoricaly, the good practice for hide the toc html page, it's to set the attribue linear to no at this <itemref> in the <spine> of the OPF... however all e-reader do not seem to respect this element and still display the page, so your solution it's not so bad (as long as you put the toc page at the end of the book)
A more radical solution would be to use a ePub2.

Code:
<spine>
  ...
  <itemref idref="toc.xhtml" linear="no"/>
</spine>
un_pogaz is offline  
Advert
Old 07-11-2022, 09:55 AM   #3
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,756
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Make the ToC entries like this...

Cover
Copyright
Start Reading

And whatever else you need based on what bits your eBook contains.
JSWolf is offline  
Old 07-11-2022, 10:26 AM   #4
bookman156
Addict
bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.
 
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
@un_pogaz My EPUB3 already has automatically:

Code:
  <spine>
    <itemref idref="Section0001.xhtml"/>
    <itemref idref="nav.xhtml" linear="no"/>
  </spine>
There is no toc.xhtml. I presume you're talking about the same thing? But as you mention, it doesn't work. So it's an EPUB3 thing? I don't think I want to go back to EPUB2 but it explains why I never see this in those.

@JSWolf That's interesting. I did wonder whether I could scrape together something that at least resembled a table of contents. How would I get that at the front, or do you think it's okay at the back where Sigil seems to put it? I can't really understand why it is at the back, for all some might find it useful to go back to the beginning when reaching the end.
bookman156 is offline  
Old 07-11-2022, 10:36 AM   #5
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,570
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by bookman156 View Post
So it's an EPUB3 thing? I don't think I want to go back to EPUB2 but it explains why I never see this in those.
Yes. The NAV document is required in EPUB3. It basically replaces the NCX that was required in EPUB2. You may not have seen it in EPUB2, but even if you had no need of a TOC (and you never generated the NCX), it was still there--with "Start" as the only entry, no less. It's just that the NCX is typically used by EPUB2 rendering engines for navigation (it doesn't show in the epub itself). But its "Start"-only content would still be visible if they used their epub2 reader's built in navigation.
DiapDealer is offline  
Advert
Old 07-11-2022, 10:41 AM   #6
bookman156
Addict
bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.
 
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
@DiapDealer

Right, I see. I was hoping the 'Start' in EPUB3 would only be visible to the software, but in tests it is displayed. If I make it display none will it still be available to the software?
bookman156 is offline  
Old 07-11-2022, 10:53 AM   #7
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,763
Karma: 5706256
Join Date: Nov 2009
Device: many
The only way to completely hide the nav on broken epub3 readers that do not properly honour spine attributes is to remove its entry from the spine manually editing the opf. You may need to edit the nav as well to remove a landmark entry to the toc.

A better solution, especially for accessibility reasons is to create a proper nav as JSWolf recommends that points to the cover, and any natural sections. These not be chapters and they need not start at the top of page.
KevinH is offline  
Old 07-11-2022, 10:57 AM   #8
bookman156
Addict
bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.
 
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
@KevinH

Yes, I can see the accessibility reasons. If I make a sort of table of contents like that (I'd forgotten copyright would make a good entry as I haven't put it in yet) will it still be displayed at the back, is that the 'proper' place for it?
bookman156 is offline  
Old 07-11-2022, 12:42 PM   #9
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,763
Karma: 5706256
Join Date: Nov 2009
Device: many
Any place you want it to be. You can drag and drop the nav in BookBrowser to change order.

Or do both ... add in the landmarks to aid accessibility then remove it from the spine. That way it will be treated much like an ncx in epub2 (there only for machine parseable navigation).
KevinH is offline  
Old 07-11-2022, 01:11 PM   #10
bookman156
Addict
bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.
 
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
Thanks everybody. I have a better idea what's going on now.

I guess coming from print book publishing I find the idea of putting the cover etc in a table of contents a bit weird. Probably be better if it was called something else, like book elements or something. But I probably have to adjust. Though I may end up with display none if I can't in the end see the point of it.

Will ponder.
bookman156 is offline  
Old 07-11-2022, 06:30 PM   #11
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 bookman156 View Post
If I make a sort of table of contents like that [...] will it still be displayed at the back, is that the 'proper' place for it?
"Proper place" for a TOC is at the front. Exactly where you would place it in a Print book:
  • Cover
  • Title Page
  • Copyright
  • TOC <--- Right here in the frontmatter.
  • [... Rest of book files.]

- - - - -

Note: If this ebook is for personal usage? You can put this TOC file wherever you want.

But if you are putting this ebook up for sale? DO NOT stick the TOC at the end of the book. This will get you dinged.

(For example, see my comment in /r/selfpublish: "Going from academic writing to self-publishing" where I linked to a 2017 article describing the Amazon crackdown.)

- - - - -

Side Note: If your book is "continuous", or is very small, like a single article, stick the TOC in the front of the book as soon as possible:

- Cover.xhtml
- TOC.xhtml
- Title.of.Article.xhtml

Even if the TOC only has a single entry, this is fine.

Just give it the name of the book/pamphlet/article/chapter, and you'll be good.

TOC.xhtml:

Code:
<p class="toc"><a href="../Text/Example.Article.xhtml">“Example Article” by Tex</a></p>
Quote:
Originally Posted by bookman156 View Post
Yes, I can see the accessibility reasons.
Yes. Accessibility is one of the huge reasons why TOC files are great + needed.

This allows you to navigate around the document in alternate ways.

In the case of an extremely short, single-chapter book, it doesn't feel like a one-line TOC makes much sense, but all ebooks should be navigated the same way.

There are also a few other reasons too:
  • Some devices have a "Go to Table of Contents" button, which will jump you directly to the nav.xhtml / TOC.xhtml file.
  • Some stores "start"/open the book directly after the TOC.

Quote:
Originally Posted by bookman156 View Post
I guess I could have:

Code:
nav#toc {
display:none;
}
in the sgc-nav.css file, but is this good practice, will it interfere with the use of the epub?
No. Do not use display: none.

I described a lot of this just a few days ago in:

Some people try to "hide" footnotes/endnotes in the book, but this is horrible for Accessibility, and brings lots of bugs to things like Search/Text-to-Speech, etc.

Just leave the TOC as it is. There is no harm in a single line of text in your TOC, and only benefits from having it available + visible for all users.

Do not try to purposefully hide things from readers because you think you know better.

Quote:
Originally Posted by bookman156 View Post
I guess coming from print book publishing I find the idea of putting the cover etc in a table of contents a bit weird. Probably be better if it was called something else, like book elements or something. But I probably have to adjust. Though I may end up with display none if I can't in the end see the point of it.
There's no need to add "Cover" or "Table of Contents" in the actual toc.ncx or nav.xhtml file...

This has been discussed to death many ties over the years. (As one example, see Hitch's posts in the 2015 topic above.)

- - - - -

Complete Side Note / Rant

Has anyone else been getting really garbage search results from Google lately?

I've been doing in-depth searches for things like:

Code:
cover NCX Tex2002ans site:mobileread.com
and getting LOTS of irrelevant (and/or incomplete) results.

Another frustrating thing has been search results which DO NOT include my damn keywords. I want the EXACT THING I SEARCHED FOR, not "Well, here's a flood of results missing the word 'NCX'.".

I know this self-referential "Cover" or "Table of Contents" in the NCX has been discussed at least a dozen times over the years... but I can't seem to find my older posts on the topic.

(And yesterday, it was me looking up "Syntax Highlighting" + Tex2002ans... I had to dig through my notes to actually find the original 2019 topic!)

Last edited by Tex2002ans; 07-11-2022 at 06:46 PM.
Tex2002ans is offline  
Old 07-11-2022, 06:44 PM   #12
bookman156
Addict
bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.
 
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
Quote:
Just give it the name of the book/article/chapter, and you'll be good.
That's a good idea, then it becomes like a half title that happens to be hyperlinked. That seems more sensible. It's not going very far in the book but it can be used to jump over the full title, press name, and copyright pages to, perhaps, the epigraph page just before the book contents proper.

I'll experiment, see how these ideas look in practice.
bookman156 is offline  
Old 07-11-2022, 06:55 PM   #13
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 bookman156 View Post
That's a good idea, then it becomes like a half title that happens to be hyperlinked. That seems more sensible.


Quote:
Originally Posted by bookman156 View Post
It's not going very far in the book but it can be used to jump over the full title, press name, and copyright pages to, perhaps, the epigraph page just before the book contents proper.
Yep, and like Hitch describes in that 2015 topic... Amazon already does this.

They noticed that 99.9% of people would just click right by the frontmatter and "jump to Chapter 1" to begin reading.

... So now Amazon opens ebooks right to the "first page".

You can always click backwards if you want to, but the vast majority of people don't even look at the covers, title page, copyright pages, etc.

Way back in pre-2014(?), you had to mark a "Text" semantic in Sigil and Amazon would use that as your "Start" location in Kindles... but nowadays, it's all done through Amazon heuristics.

Many big-name publishers tried to shove the TOC at the very end of the book to:
  • try to get more of their book sampled in the "Look Inside"
  • "hide" the TOC from their readers (especially in Fiction books)

but Amazon really cracked down on that too (because of scammers). (For more info on that, see that Reddit comment + 2017 article I linked above.)

Quote:
Originally Posted by bookman156 View Post
I'll experiment, see how these ideas look in practice.
Tex2002ans is offline  
Old 07-11-2022, 07:02 PM   #14
bookman156
Addict
bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.
 
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
Code:
<p class="toc"><a href="../Text/Example.Article.xhtml">“Example Article” by Tex</a></p>
Apparently not allowed in nav.xhtml:

Quote:
Validating using EPUB version 3.2 rules.
ERROR(RSC-005): sa3new.epub/OEBPS/Text/nav.xhtml(13,20): Error while parsing file: element "p" not allowed here; expected element "h1", "h2", "h3", "h4", "h5", "h6", "hgroup" or "ol"
ERROR(RSC-005): sa3new.epub/OEBPS/Text/nav.xhtml(14,9): Error while parsing file: element "nav" incomplete; missing required element "ol"
bookman156 is offline  
Old 07-11-2022, 07:14 PM   #15
bookman156
Addict
bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.
 
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
It seems if I give the toc p class to li instead it validates, and it doesn't need a H1 'Table of Contents'.
bookman156 is offline  
Closed Thread


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Table of Contents not being identified as Table of Contents openletter Conversion 2 10-19-2012 12:54 AM
Table of Contents Help MyLittleTwi Calibre 0 02-27-2012 03:30 PM
Table of Contents stevej46 Conversion 0 08-06-2011 02:46 PM
Help with my Table of Contents Skylinefranc Calibre 0 03-19-2010 12:55 AM
Creator Table of Contents Nate the great Kindle Formats 5 07-10-2008 05:55 AM


All times are GMT -4. The time now is 05:51 PM.


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