Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 11-25-2013, 03:16 AM   #1
Peter21
Enthusiast
Peter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 29
Karma: 12580
Join Date: Aug 2013
Location: UK
Device: iPad 4
Image as Header for Chapter

Hi
In order to avoid the chapter title being separated from the image following it, due to small screen constraints, I have incorporated the chapter title into a jpeg, at the beginning of a chapter. i.e. it is no longer "text", and cannot be given the H2 tag.

Now sigil picks up H2 headings to create the TOC, and so cannot see the image as a chapter heading.
Is there any way round this?

thanks a lot

Peter
Peter21 is offline   Reply With Quote
Old 11-25-2013, 05:06 AM   #2
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
You should be able to assign the chapter heading <img> an id, and then you can use Tools - Table of Contents - Edit Table of Contents to manually add/tweak the TOC:

http://web.sigil.googlecode.com/git/..._contents.html
Tex2002ans is offline   Reply With Quote
Advert
Old 11-25-2013, 05:15 AM   #3
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,201
Karma: 57978778
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Peter21 View Post
Hi
In order to avoid the chapter title being separated from the image following it, due to small screen constraints, I have incorporated the chapter title into a jpeg, at the beginning of a chapter. i.e. it is no longer "text", and cannot be given the H2 tag.

Now sigil picks up H2 headings to create the TOC, and so cannot see the image as a chapter heading.
Is there any way round this?

thanks a lot

Peter
Code:
<h3 title="Chapter 1"><img alt="" src="../Images/chap01.jpg">
theducks is offline   Reply With Quote
Old 11-25-2013, 05:51 AM   #4
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
I would actually create a hidden header with the chapter name. In the book the image will show, but in the NCX the chapter name will be displayed.
Toxaris is offline   Reply With Quote
Old 11-25-2013, 07:07 AM   #5
drjenkins
Addict
drjenkins ought to be getting tired of karma fortunes by now.drjenkins ought to be getting tired of karma fortunes by now.drjenkins ought to be getting tired of karma fortunes by now.drjenkins ought to be getting tired of karma fortunes by now.drjenkins ought to be getting tired of karma fortunes by now.drjenkins ought to be getting tired of karma fortunes by now.drjenkins ought to be getting tired of karma fortunes by now.drjenkins ought to be getting tired of karma fortunes by now.drjenkins ought to be getting tired of karma fortunes by now.drjenkins ought to be getting tired of karma fortunes by now.drjenkins ought to be getting tired of karma fortunes by now.
 
Posts: 250
Karma: 1702156
Join Date: Nov 2010
Device: Kindle Voyage
Quote:
Originally Posted by theducks View Post
Code:
<h3 title="Chapter 1"><img alt="" src="../Images/chap01.jpg">
This is pretty much how I do it. Here's a slighlty more complete example:

Code:
<h3 title="Chapter 1"><img alt="Chapter 1" src="../Images/chapter_1.jpg" /></h3>
I set the img alt text the same as the chapter title. The title text appears in toc.ncx and the alt text is available for impaired readers.
drjenkins is offline   Reply With Quote
Advert
Old 11-25-2013, 02:12 PM   #6
Peter21
Enthusiast
Peter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 29
Karma: 12580
Join Date: Aug 2013
Location: UK
Device: iPad 4
TOC

Thanks to you all....putting the image code within the heading tag did the trick.

Peter
Peter21 is offline   Reply With Quote
Old 11-27-2013, 06:54 PM   #7
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,468
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by Peter21 View Post
Thanks to you all....putting the image code within the heading tag did the trick.

Peter
Wait.

Did you literally put the image tag inside the heading tag? Or did you do what Ducky, I think it was, advised--just create an invisible heading? That didn't wrap the image?

Depending upon where you're going from here, having the image tag inside the heading tag might cause you issues. Are you planning on converting this book to a MOBI, by any chance, and making an inline (HTML) TOC?

Hitch
Hitch is offline   Reply With Quote
Old 11-28-2013, 02:37 AM   #8
Peter21
Enthusiast
Peter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 29
Karma: 12580
Join Date: Aug 2013
Location: UK
Device: iPad 4
Thanks hitch

This is the code I used:
<h2 title="Introduction"><img alt="overviewmap" src="../Images/overviewmap.jpg" /></h2>

The book will be converted to a .mobi file, which I am previewing using kindlegen.
On the first run this line came out blue in the TOC; I got round this with the following line in CSS:
a, href {text-decoration: none; color: black;}

which I guess will turn all links black...a bit clumsy maybe? Any suggestions very welcome.

Peter
Peter21 is offline   Reply With Quote
Old 11-28-2013, 04:03 AM   #9
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
That CSS will not work on most readers, they will display it with a blue line. Hitch is right, although it is correct in essence, it can give you problems on readers. Hence my advise earlier to put the image in a <div> and create an empty hidden header with the fallback text.
Toxaris is offline   Reply With Quote
Old 11-29-2013, 01:59 AM   #10
Peter21
Enthusiast
Peter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterPeter21 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 29
Karma: 12580
Join Date: Aug 2013
Location: UK
Device: iPad 4
Quote:
Originally Posted by Toxaris View Post
That CSS will not work on most readers, they will display it with a blue line. Hitch is right, although it is correct in essence, it can give you problems on readers. Hence my advise earlier to put the image in a <div> and create an empty hidden header with the fallback text.
OK....How would I create an empty hidden header....could you give an example of the code?
Many thanks
Peter
Peter21 is offline   Reply With Quote
Old 11-29-2013, 03:43 AM   #11
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
Sure, no problem. Put this in your stylesheet:
Code:
.hidden { display: none; }
Then use the following in your HTML:
Code:
<h1 class="hidden">This is your hidden title.</h1><div>your image</div>
Word of warning. You can also use 'display: hidden', but that will occupy space. It will effectively show the header, but make the text color the same as the background. With 'display: none' it will not be displayed at all and will not occupy space on the page.
Toxaris is offline   Reply With Quote
Old 11-29-2013, 04:33 AM   #12
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,523
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Toxaris View Post
Word of warning. You can also use 'display: hidden'
That would be 'visibility: hidden', but it's not in the required CSS set for ePub 2, so you should not rely on it.
Jellby is offline   Reply With Quote
Old 11-29-2013, 05:13 AM   #13
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
Quote:
Originally Posted by Jellby View Post
That would be 'visibility: hidden', but it's not in the required CSS set for ePub 2, so you should not rely on it.
doh!
Toxaris is offline   Reply With Quote
Old 11-29-2013, 12:31 PM   #14
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
Quote:
Originally Posted by Jellby View Post
That would be 'visibility: hidden', but it's not in the required CSS set for ePub 2, so you should not rely on it.
The difference between visibility:hidden and display:none is that hidden will continue to take up the space it would have used had the characters been there while none removes the data and the space it would have taken. As noted above only display:none is mentioned in the ePub spec.

Dale
DaleDe is offline   Reply With Quote
Old 11-29-2013, 02:56 PM   #15
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,468
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by Peter21 View Post
Thanks hitch

This is the code I used:
<h2 title="Introduction"><img alt="overviewmap" src="../Images/overviewmap.jpg" /></h2>

The book will be converted to a .mobi file, which I am previewing using kindlegen.
On the first run this line came out blue in the TOC; I got round this with the following line in CSS:
a, href {text-decoration: none; color: black;}

which I guess will turn all links black...a bit clumsy maybe? Any suggestions very welcome.

Peter
Hi, Peter:

Everybody answered the other stuff, but do NOT use

Code:
a, href {text-decoration: none; color: black;}
(I didn't fix the coding) because then, when someone uses Night Mode, they won't be able to see anything that's a link. Chapter heads, if they link back, the TOC...el zippo. Don't do that. Amazon gets all frowny if they get complaints from readers that like to read in Night Mode (black background, white lettering--see what will happen if the text is set to be black permanently? ;-)

Hitch
Hitch is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter Break Image Problem Fidney Calibre 2 04-22-2012 07:25 AM
Image header on the actual auto-TOC generated page? Muckraker Calibre 1 06-05-2011 10:57 AM
Using images to make chapter header fonts in Kindle (opinions?) Stodder Kindle Formats 1 05-18-2011 12:58 AM
Strange chapter header issue? bfollowell Kindle Formats 27 04-05-2011 05:58 PM
Image maps as Chapter Headings? kjk Sigil 6 10-17-2009 06:27 PM


All times are GMT -4. The time now is 03:15 PM.


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