10-13-2012, 08:21 PM | #1 |
Member
Posts: 12
Karma: 10
Join Date: Oct 2012
Location: Bradford, MA
Device: Kindle (all generations)
|
Title page does not "translate" as TOC item
First post...sorry for not introducing myself previously.
Thank you kindly in advance for any and all help. So here's my question, and I hope it's clear: I have generated a TOC in Sigil. The TOC includes my title page as it's first item. Now, the title page I designed, happens to not be text. It's an image. Something I wanted to try out. This means, of course, that I have not assigned any tags to it. It's not an h1, or h2. It is simply an <img>... At any rate, this item, which is the first item in my TOC, needs to be converted to MOBI, (or any Kindle format, let's say). The problem is that, after conversion (with Calibre), the generated TOC does not include this item. This means that my book ends up beginning at its copyright page. There is no sign of the title page. I can tweak conversions so that the title page is parsed to the MOBI format, but it is NEVER present as a TOC item. It's just not there. Sometimes I can "scroll" back to it when previewing with Adobe Digital Editions, or the Kindle previewer. The point is, this item is not present in the output file (MOBI eBook) By the way...I don't know if this is a post that should go on the Caliber area, but I might post there as well. ...which brings me to another point: should I not be using both programs to tweak/convert eBooks? Any better ideas are very welcome. Thank you once again to anyone that can help me understand a bit more of the process. |
10-14-2012, 03:30 AM | #2 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
You can use <h1> with your image if that's what you want:
Code:
<h1 title="Title Page"><img src="..." alt="..."/></h1> |
Advert | |
|
10-14-2012, 03:48 PM | #3 | |
Member
Posts: 12
Karma: 10
Join Date: Oct 2012
Location: Bradford, MA
Device: Kindle (all generations)
|
Quote:
Many thanks, by the way. I've yet to try it, but I would like to understand how to use tags properly...especially when I understood them to be markers for formatting text. |
|
10-14-2012, 06:22 PM | #4 | |
Well trained by Cats
Posts: 29,801
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
No: h3 {text-align: center;} Yes: .chapno {text-align: center;} <h3 class="chapno" title="Other">A centered Heading</h3> <h3 title="Normal">A normal Heading</h3> |
|
10-15-2012, 01:26 AM | #5 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
No, most (X)HTML is about structure. You structure the document with the correct tags and do the formatting in your stylesheet. Sometimes I think it is very unfortunate that browser have a built-in stylesheet for tags which creates this confusion.
A good example is <strong> and <em>. It is structurally good to use. However, it is not the same as <b> and <i>. Those are about layout. The internal stylesheet of the browsers display <strong> as <b> and <em> as <i>, but that is not obligatory. Therefore they are not the same, they only might look the same. It is all about structuring the document. By the way, you could in this case also create a dummy <h1> and set it to display: none. However, that might disrupt your image in the screen (it should not). I like the option from Jellby better. |
Advert | |
|
10-15-2012, 11:40 AM | #6 | |
Member
Posts: 12
Karma: 10
Join Date: Oct 2012
Location: Bradford, MA
Device: Kindle (all generations)
|
Thank you everyone for this.
So, if I understand this correctly, in an XHTML doc, the H1 is (or can be), nothing but hierarchy? Quote:
However, I tried this solution and my image, which used to be centered, now has aligned itself to the left. I assume this is because I had created a style for the img tag in the stylesheet: Code:
img.center { display: block; margin-left: auto; margin-right: auto; |
|
10-15-2012, 12:17 PM | #7 | |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
Code:
<div class="center"><img ... /></div> Code:
div.center { text-align: center } Code:
<h1 class="title" title="Title Page"><img ... /></h1> Code:
h1.title { margin: 0; padding: 0; text-align: center } In any case, this is only to have Sigil automatically add the title page to the TOC. But if you can (and are willing to) manually edit the NCX file, you can always add a link to anywhere without adding an <h1> or any other trick. |
|
10-15-2012, 12:51 PM | #8 | |
Member
Posts: 12
Karma: 10
Join Date: Oct 2012
Location: Bradford, MA
Device: Kindle (all generations)
|
A-HA!!!
This actually brings up two questions, one was my original source of frustration. First: Is there a particular issue with using display: block in this case? After some research, it seemed to be the way to go in regards to centering images. When the page does show up in the resulting .mobi file (buit again, not in its TOC) the image is centered perfectly. Do you have any preference to using text-align in this case? And my second question, thank you for reminding me, was my original headache: Quote:
This is why I'm interested in this h1 solution...I am hoping that the Chapter Detection functionality in Calibre will read the h1 and give it its "rightful place" in the resulting eBook, because h1 is used everywhere else in the book as, both the Chapter title's formatting and obviously the chapter marker to create the TOC. All these other pages using the h1 show up on both Sigil's TOC and the end product's TOC. |
|
10-15-2012, 03:33 PM | #9 |
Member
Posts: 12
Karma: 10
Join Date: Oct 2012
Location: Bradford, MA
Device: Kindle (all generations)
|
Update:
Still no luck. The Calibre conversion does not recognize the title page as a TOC item in the resulting eBook. I am using the h1 tag for it, but it disappears from the final TOC. |
10-15-2012, 07:44 PM | #10 |
Groupie
Posts: 184
Karma: 2572
Join Date: Aug 2010
Device: Kindle
|
I have been using the Semantics tool to identify the title page as the ... title page. Should I be using title="Title Page" instead?
|
10-16-2012, 02:19 AM | #11 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
|
10-16-2012, 02:19 AM | #12 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
|
10-16-2012, 02:28 AM | #13 | |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Quote:
The blog from Liz is recommended anyway, but keep in mind that it mainly directed to iBooks. There is good stuff there. |
|
10-16-2012, 04:06 AM | #14 | ||
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
As I said, you need to include the <img> tag inside a block element (<div> or <p>), so it's easier to just give "text-align: center" to the container. Note that "text-align" controls the alignment of the contents of an element, while with "display" and "margin" you try to control the position of the element itself. Quote:
|
||
10-16-2012, 12:05 PM | #15 | ||
Member
Posts: 12
Karma: 10
Join Date: Oct 2012
Location: Bradford, MA
Device: Kindle (all generations)
|
To Jellby:
Quote:
Quote:
In any case, you are right in regards to asking in the Calibre forum. I actually posted the same question there, but I think because of the forum policy (not posting the same question in different places), it might not have any traction. I will try to maybe rephrase it and ask again, but either way..I DID think it to be a Calibre issue, but I also wanted to make absolutely sure that my Sigil XHTML/CSS were not keeping Calibre from detecting chapters and thus, incorrectly compiling the elements for the final .mobi structure. In the end, the result is the same, Calibre just does not recognize this first page as a TOC item, even as it includes it in the structure. Color me lost. Toxaris: Thank you VERY much for recommending L Castro's blog. I'm currenlty using her CSS3/HTML5 quickstart guide in looking for answers to a gazillion questions I have about this. If it's not obvious, I am a man of the print era...so I'm slogging along this, but with high hopes. Last edited by Caleñ0; 10-16-2012 at 12:30 PM. |
||
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Try to remove : This item was downloaded by caliber from .... and "Section Menu", "Ma | poulardalber | Recipes | 4 | 08-21-2012 05:23 AM |
"Copyright" page in .mobi toc.ncx | twedigteam | Kindle Formats | 12 | 03-04-2011 08:33 PM |
Any way to create a "toc" guide item when converting HTML to MOBI? | DMSmillie | Calibre | 2 | 12-16-2010 06:47 PM |
TOC for news only shows "Front Page"? | etienne66 | Calibre | 10 | 12-05-2010 10:05 AM |
Getting calibre to detect "Prologue" and "Epilogue" for TOC | sherman | Calibre | 2 | 09-20-2010 02:21 AM |