![]() |
#1 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
Code:
<h3 title="Chapter 1"><img alt="" src="../Images/chap01.jpg">
|
|
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
#5 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 250
Karma: 1702156
Join Date: Nov 2010
Device: Kindle Voyage
|
Quote:
Code:
<h3 title="Chapter 1"><img alt="Chapter 1" src="../Images/chapter_1.jpg" /></h3> |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 |
![]() |
![]() |
![]() |
#7 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
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 |
|
![]() |
![]() |
![]() |
#8 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 |
![]() |
![]() |
![]() |
#9 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
#10 | |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29
Karma: 12580
Join Date: Aug 2013
Location: UK
Device: iPad 4
|
Quote:
Many thanks Peter |
|
![]() |
![]() |
![]() |
#11 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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; } Code:
<h1 class="hidden">This is your hidden title.</h1><div>your image</div> |
![]() |
![]() |
![]() |
#12 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,523
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
|
![]() |
![]() |
![]() |
#13 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
|
![]() |
![]() |
![]() |
#14 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
Dale |
|
![]() |
![]() |
![]() |
#15 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
Everybody answered the other stuff, but do NOT use Code:
a, href {text-decoration: none; color: black;} Hitch |
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |