Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 03-23-2013, 05:08 AM   #1
bcamp47
Junior Member
bcamp47 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2011
Device: nook
Invisible chapter headings?

I'd like Sigil to generate TOC entries for pages (such as the dedication page) without having the title actually visible on the page (ie. "Dedication" should show up in the TOC, but I don't want the word "Dedication" to be visible on the dedication page itself. I know how to add it to toc.ncx but then you loose it if you let Sigil rebuild the TOC. I've tried adding the heading tag above the body section, and it actually works, but the clean up done by Sigil prior to a save to disk removes the <h2></h2> so that
<h2><title>Dedication</title></h2>
becomes
<title>Dedication</title>
Then, of course, it disappears from the TOC the next time I re-generate it.

Any thoughts on how I can achieve what I want?
bcamp47 is offline   Reply With Quote
Old 03-23-2013, 05:28 AM   #2
Sunlite
Zealot
Sunlite can program the VCR without an owner's manual.Sunlite can program the VCR without an owner's manual.Sunlite can program the VCR without an owner's manual.Sunlite can program the VCR without an owner's manual.Sunlite can program the VCR without an owner's manual.Sunlite can program the VCR without an owner's manual.Sunlite can program the VCR without an owner's manual.Sunlite can program the VCR without an owner's manual.Sunlite can program the VCR without an owner's manual.Sunlite can program the VCR without an owner's manual.Sunlite can program the VCR without an owner's manual.
 
Sunlite's Avatar
 
Posts: 125
Karma: 165452
Join Date: Mar 2008
Location: Berlin, Germany
Device: Kobo Aura, PRS-T1, PB602, CyBook Gen3
You can use either simply:

<h2 title="Dedication"></h2>

which should not take any space, but could. To be save you could add a style="display:none" to the heading tag.

The content of the title attribute is what Sigil will use for the TOC, if it is there. Using it is also a way to have different titles on the page and in the TOC for the same chapter.
Sunlite is offline   Reply With Quote
Old 03-23-2013, 08:51 AM   #3
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,086
Karma: 1444487
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
Be careful with display:none when it is on a line with something else. It won't display but the space that it would have used is taken anyway, leaving blank spaces in the line. I ran into this with invisible page numbers that took up the space anyway.
mrmikel is offline   Reply With Quote
Old 03-23-2013, 10:57 AM   #4
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,258
Karma: 4801165
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by mrmikel View Post
Be careful with display:none when it is on a line with something else. It won't display but the space that it would have used is taken anyway, leaving blank spaces in the line. I ran into this with invisible page numbers that took up the space anyway.
Then that's a bug in the renderer, display:none should be completely removed from the flow. What could happen is that you see the space before and after the element, resulting in a double space, which is usually not seen in HTML. The behaviour you describe it what should happen with visibility:hidden, though.

Otherwise, I wonder if <span title="Dedication"> would work. In other words, does Sigil only consider <h1-6> tags when building the TOC or does it also consider anything with a "title" attribute? (You may also need to add an "id".)
Jellby is online now   Reply With Quote
Old 03-23-2013, 11:58 AM   #5
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 3,097
Karma: 5658305
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
You need a header tag and an id is not required. At least, it worked for me without a while ago.
Toxaris is offline   Reply With Quote
Old 03-23-2013, 02:22 PM   #6
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,086
Karma: 1444487
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
I had a problem with my Sony 505 that way. Haven't checked it out with my 300 though.
mrmikel is offline   Reply With Quote
Old 03-24-2013, 01:38 AM   #7
bcamp47
Junior Member
bcamp47 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2011
Device: nook
Wow.
Code:
<h2 style="display:none" title="Dedication"></h2>
works great. Thank you! I wish I'd asked sooner.

OTOH, I do feel I need to spend some time trying to work things out for myself before I ask.
bcamp47 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre: Chapter Headings Paxman53 Introduce Yourself 5 10-22-2011 10:13 AM
Chapter Headings Paxman53 Conversion 3 10-12-2011 01:31 PM
Chapter Headings on their own page? Help! Lee5150 Calibre 3 10-06-2011 09:12 AM
Why H1 and H2 Chapter Headings? Ransom Calibre 11 08-10-2011 05:29 PM
Help converting chapter headings p3aul Conversion 6 04-03-2011 01:56 PM


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


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