03-23-2013, 05:08 AM | #1 |
Junior Member
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? |
03-23-2013, 05:28 AM | #2 |
Addict
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. |
Advert | |
|
03-23-2013, 08:51 AM | #3 |
Color me gone
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.
|
03-23-2013, 10:57 AM | #4 | |
frumious Bandersnatch
Posts: 7,536
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
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".) |
|
03-23-2013, 11:58 AM | #5 |
Wizard
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.
|
Advert | |
|
03-23-2013, 02:22 PM | #6 |
Color me gone
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.
|
03-24-2013, 01:38 AM | #7 |
Junior Member
Posts: 4
Karma: 10
Join Date: Jan 2011
Device: nook
|
Wow.
Code:
<h2 style="display:none" title="Dedication"></h2> OTOH, I do feel I need to spend some time trying to work things out for myself before I ask. |
|
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 |