View Single Post
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