Register Guidelines E-Books Today's Posts Search

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
Addict
Sunlite ought to be getting tired of karma fortunes by now.Sunlite ought to be getting tired of karma fortunes by now.Sunlite ought to be getting tired of karma fortunes by now.Sunlite ought to be getting tired of karma fortunes by now.Sunlite ought to be getting tired of karma fortunes by now.Sunlite ought to be getting tired of karma fortunes by now.Sunlite ought to be getting tired of karma fortunes by now.Sunlite ought to be getting tired of karma fortunes by now.Sunlite ought to be getting tired of karma fortunes by now.Sunlite ought to be getting tired of karma fortunes by now.Sunlite ought to be getting tired of karma fortunes by now.
 
Sunlite's Avatar
 
Posts: 206
Karma: 547516
Join Date: Mar 2008
Location: Berlin, Germany
Device: KObo Clara, 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
Advert
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,089
Karma: 1445295
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: 7,536
Karma: 19000001
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 offline   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: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
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
Advert
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,089
Karma: 1445295
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


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 01:03 AM.


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