MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   Image maps as Chapter Headings? (https://www.mobileread.com/forums/showthread.php?t=59619)

kjk 10-17-2009 05:32 PM

Image maps as Chapter Headings?
 
Is there a way to use images for chapters, i.e. a bitmap that says "CHAPTER ONE", etc.., but still have the text "CHAPTER ONE" show up in the Table of Contents?

I can set the image to h3, but the TOC (of course) is blank. If I edit the TOC, it replaces the image. Is there anyway to have both, but not have the text show up? I tried using alt text in the image, but that didn't work.

AnemicOak 10-17-2009 06:03 PM

What I did was go ahead and create the book in Sigil with the 'blank' TOC entries and then unzip the epub and manually edit the toc.ncx to add the labels.

Example from a book I just worked on (the red text was what I added later the rest came out of the epub from Sigil)...
Quote:

<navPoint id="navPoint-3" playOrder="3">
<navLabel>
<text>Chapter One</text>
</navLabel>
<content src="text/content008.xhtml"/>
</navPoint>

kjk 10-17-2009 06:29 PM

Quote:

Originally Posted by AnemicOak (Post 628749)
What I did was go ahead and create the book in Sigil with the 'blank' TOC entries and then unzip the epub and manually edit the toc.ncx to add the labels.

Example from a book I just worked on (the red text was what I added later the rest came out of the epub from Sigil)...

I'll try that, thanks!

Valloric 10-17-2009 06:48 PM

You can put anything between the heading tags to make Sigil link to it in the NCX, and set the "title" attribute on the <h#> element to get the text.

So, "<h1 title='Chapter 1'><img ... ></h1>". The TOC would link to that heading element (and by extension, the images inside it) and the TOC entry would say "Chapter 1".

AnemicOak 10-17-2009 06:54 PM

Quote:

Originally Posted by Valloric (Post 628784)
You can put anything between the heading tags to make Sigil link to it in the NCX, and set the "title" attribute on the <h#> element to get the text.

So, "<h1 title='Chapter 1'><img ... ></h1>". The TOC would link to that heading element (and by extension, the images inside it) and the TOC entry would say "Chapter 1".

Good to know.

kjk 10-17-2009 06:59 PM

Quote:

Originally Posted by Valloric (Post 628784)
You can put anything between the heading tags to make Sigil link to it in the NCX, and set the "title" attribute on the <h#> element to get the text.

So, "<h1 title='Chapter 1'><img ... ></h1>". The TOC would link to that heading element (and by extension, the images inside it) and the TOC entry would say "Chapter 1".

awesome, thanks Valloric!

Valloric 10-17-2009 07:27 PM

I really need to create a FAQ wiki page... People need to be able to see how some commonly encountered problems are solved.


All times are GMT -4. The time now is 06:43 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.