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-08-2020, 10:10 PM   #16
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,807
Karma: 6000000
Join Date: Nov 2009
Device: many
What happens if you make the no:display versions some other header level that is typically unused in ToC like h5 or h6?

Or you can add the class "sigil_not_in_toc" to the header elements you do not want to be used to create the ToC. This is what the HeadingSelector does. If a class attribute already exists for that element concatenate a space and sigil_not_in_toc to that class value.

Last edited by KevinH; 12-08-2020 at 10:20 PM.
KevinH is offline   Reply With Quote
Old 12-08-2020, 10:42 PM   #17
Banjo
Zealot
Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!
 
Banjo's Avatar
 
Posts: 120
Karma: 5276
Join Date: Feb 2013
Device: Asus Zen Pad
Quote:
Originally Posted by KevinH View Post
What happens if you make the no:display versions some other header level that is typically unused in ToC like h5 or h6?

Or you can add the class "sigil_not_in_toc" to the header elements you do not want to be used to create the ToC. This is what the HeadingSelector does. If a class attribute already exists for that element concatenate a space and sigil_not_in_toc to that class value.
I did not know about that class. I will give that a try tomorrow so see what it does. It's too late tonight to jump back into it.
Banjo is offline   Reply With Quote
Advert
Old 12-09-2020, 03:26 AM   #18
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,731
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Banjo View Post
I spoke too soon. The additional anchor text is invisible in the body of the book, but it shows up in the TOC.
If you add a title attribute to heading tags, Sigil will use its value for the TOC. For example:

Code:
<h1 title="Heading text for TOC">Actual heading text</h1>
If you generate the TOC, it'll add "Heading text for TOC" to the TOC.
Doitsu is offline   Reply With Quote
Old 12-09-2020, 09:51 AM   #19
Banjo
Zealot
Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!
 
Banjo's Avatar
 
Posts: 120
Karma: 5276
Join Date: Feb 2013
Device: Asus Zen Pad
I put KevinH's suggestion into my book, and it appears to be the cleanest solution so far.

I added an <h2> tag with the alternative text in it next to the <h1> chapter heading tag. I marked the <h2> text for inclusion in the index. I added the invisibility class, "display:none" to the sigil_index_marker class. When I create the index, the link shows up properly, and the <h2> text does not appear in the book.

When I create the TOC, the h2 tag shows up beneath the <h1> tag, so I mark it for deletion from the TOC.

That sequence appears to do what I was trying to do. It works in my two readers, FBReader and the Calibre reader. I have one Linux based reader, CoolReader3, that shows the <h2> text even with display set to "none", but that is a rather primitive reader that doesn't even remember where I left off reading. I might be one of a half dozen people on the planet that knows it exists, so that doesn't concern me very much.

I don't currently have any other readers to test it on. My concern would be the hidden text appearing in the display of the book.

Thanks to Doitsu for the suggestion on how to change the text in the TOC. I don't know if I will have a need for that, but it is good to know that the capability is there.

Thanks to all for the help.
Banjo is offline   Reply With Quote
Old 12-09-2020, 12:30 PM   #20
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,082
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Banjo View Post
I did not know about that class. I will give that a try tomorrow so see what it does. It's too late tonight to jump back into it.
That class entry is also added when you remove the tick in the TOC tool.
It does nothing if you do not generate the TOC using the tool.
I have a number of Sigil Specials as clips (faster than drilling down in other places)
theducks is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to put the Index in the TOC Banjo Sigil 3 09-17-2018 10:18 PM
Put Flightcrew PI in Index BetterRed Plugins 1 12-16-2016 04:47 PM
Plugboard "Metadata: Show series [series index] - title as title (Kindle)" Deep Cover Library Management 6 11-30-2012 05:17 PM
Feature request: Ability to put a book in a series without an index number lunixer Calibre 6 08-29-2011 11:37 AM
Can't extract article title in parse index hiperlink Recipes 19 01-18-2011 11:00 AM


All times are GMT -4. The time now is 04:08 AM.


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