04-26-2011, 11:14 AM | #1 | |
Colonel Mustard
Posts: 90
Karma: 1426
Join Date: Feb 2010
Location: Montreal
Device: iPhone 6, Kindle Paperwhite 2, iPad 2
|
ePub to Mobi with Calibre: cover is skipped when opening book
I've been working on a ePub file for a couple of days (with Sigil). The formatting seems to work fine in iBooks and ADE. But when I convert the file to Mobi with Calibre and put it on my Kindle, there is one problem: when I open the book, it skips the cover and jumps right to the "about" page.
The tite of the about page is between <h2> tags and is the first item on the TOC. The <h2> element is styled like this in CSS: Quote:
Is it the good way to solve this problem or there is a cleaner way? Also, not sure if this is a problem with the Calibre conversion? I know Calibre does the best with what input it gets, so ideally, I would prefer to add something in the original ePub with Sigil (to keep the original as good as possible). Or should I edit the output of Calibre conversion—the mobi file, directly? Thanks in advance for your help. |
|
04-26-2011, 12:13 PM | #2 |
Award-Winning Participant
Posts: 7,318
Karma: 67930154
Join Date: Feb 2010
Location: NJ, USA
Device: Kindle
|
All Kindle books open to the beginning of the text. I've never seen one open to the cover...always have to page back, or "goto cover" to see it.
I've seen mention here, I think, that if you want a Kindle book to open to the cover image, you'd have to include the cover image as a graphic on the first content page. |
04-26-2011, 02:00 PM | #3 | |
Colonel Mustard
Posts: 90
Karma: 1426
Join Date: Feb 2010
Location: Montreal
Device: iPhone 6, Kindle Paperwhite 2, iPad 2
|
Quote:
Code:
<style type="text/css"> @page {padding: 0pt; margin:0pt} body { text-align: center; padding:0pt; margin: 0pt; } div { margin: 0pt; padding: 0pt; } img.sgc-1 {height: 100%} </style> </head> <body> <div><img alt="cover" class="sgc-1" src="../Images/cover.jpg" /></div> </body> I still want to understand what I am doing wrong. Thanks for the help. |
|
04-26-2011, 02:30 PM | #4 |
Colonel Mustard
Posts: 90
Karma: 1426
Join Date: Feb 2010
Location: Montreal
Device: iPhone 6, Kindle Paperwhite 2, iPad 2
|
...I think I've found what I'm looking for on the forum: https://www.mobileread.com/forums/sho...d.php?t=106736
Gotta add a <reference type="start"> entry in the OPF. Guess it has to be added directly to the Mobi file? I'll test a bit later today and see if I can fix the problem that way. |
04-26-2011, 03:55 PM | #5 |
Grand Sorcerer
Posts: 27,551
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Yes the anchor has to be added to the source, and the reference added to the guide portion of the OPF.
|
04-26-2011, 04:17 PM | #6 |
Colonel Mustard
Posts: 90
Karma: 1426
Join Date: Feb 2010
Location: Montreal
Device: iPhone 6, Kindle Paperwhite 2, iPad 2
|
Thanks for the confirmation. I will try it tonight.
Seems like an obvious question, but just in case: can I do this in the ePub (explode it with Calibre and edit it)? Then convert to Mobi and send to Kindle. I'm asking because I don't know how to edit a .mobi file—seems much more complicated than ePub. |
04-26-2011, 04:36 PM | #7 |
Wizard
Posts: 2,251
Karma: 3720310
Join Date: Jan 2009
Location: USA
Device: Kindle, iPad (not used much for reading)
|
You edit the source that you used for .mobi - usually HTML.
|
04-26-2011, 04:46 PM | #8 |
Colonel Mustard
Posts: 90
Karma: 1426
Join Date: Feb 2010
Location: Montreal
Device: iPhone 6, Kindle Paperwhite 2, iPad 2
|
|
04-26-2011, 06:32 PM | #9 |
Colonel Mustard
Posts: 90
Karma: 1426
Join Date: Feb 2010
Location: Montreal
Device: iPhone 6, Kindle Paperwhite 2, iPad 2
|
Hrm, it doesn't work to add <reference type="start" title="Start here" href="starthere.html"/> in the OPF—"start" type isn't a an accepted value in ePub so I can't do that (since my source file for mobi is ePub). My original file doesn't pass the Flight Crew validation if I leave this part in the OPF...
I guess I could do it just to convert the file to Mobi and then remove it after to keep the original file accepted by validation tools. But it doesn't exactly sound like a clean solution. I'm looking for something I could put in the original ePub file (that would pass validation), so that once converted to Mobi by Calibre my Kindle would open the book (for the first time) at the cover page (which is on titlepage.xhtml)... Is this possible? Sorry to insist—just trying to find a good/clean workflow before I format/convert more books. I appreciate your help. |
04-26-2011, 06:33 PM | #10 | |
Grand Sorcerer
Posts: 27,551
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
|
|
04-26-2011, 06:54 PM | #11 |
Wizzard
Posts: 11,517
Karma: 33048258
Join Date: Mar 2010
Location: Roundworld
Device: Kindle 2 International, Sony PRS-T1, BlackBerry PlayBook, Acer Iconia
|
I think for ePubs, you're supposed to use type="text" rather than "start", which is a Mobi-ism.
But I've never actually bothered creating real ePubs back from my converted/fixed files; just Mobis good enough to work on my Kindle, so I have no idea whether it'll validate or not. |
04-26-2011, 07:22 PM | #12 | |
Colonel Mustard
Posts: 90
Karma: 1426
Join Date: Feb 2010
Location: Montreal
Device: iPhone 6, Kindle Paperwhite 2, iPad 2
|
Quote:
Unfortunately, there still must be something I'm doing wrong because it doesn't pass Flight Crew. I get this message "attribute 'name' is not declared for element 'a'"... Here is the line in question: <div><a name="text"/><img alt="cover" class="sgc-1" src="../Images/cover.jpg" /></div> Does anyone know what I'm doing wrong with this <a name="text"/> thingy? It's getting more ePub-specific though so maybe I will try the ePub forum if I can't find an answer soonish. Thanks again! |
|
04-26-2011, 07:37 PM | #13 | |
sleepless reader
Posts: 4,763
Karma: 615547
Join Date: Jan 2008
Location: Germany, near Stuttgart
Device: Sony PRS-505, PB 360° & 302, nook wi-fi, Kindle 3
|
Quote:
Yes, "text" is an accepted value for ePub but doesn't give the expected result after conversion to mobi. Use the id-attribute instead of name. (<a id=".."/>) |
|
04-26-2011, 07:43 PM | #14 | |
Grand Sorcerer
Posts: 27,551
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
|
|
04-26-2011, 07:51 PM | #15 |
sleepless reader
Posts: 4,763
Karma: 615547
Join Date: Jan 2008
Location: Germany, near Stuttgart
Device: Sony PRS-505, PB 360° & 302, nook wi-fi, Kindle 3
|
Yes, i think calibre just ignores type="text" (as well as almost all other guide reference types) when converting to mobi.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ePub to Mobi cover art - inconsistent | wannabee | Conversion | 5 | 03-15-2011 12:02 PM |
PRS-650 Exclamation Point error opening epub book | TimeTraveler | Sony Reader | 3 | 02-15-2011 10:38 PM |
Pixelated font in e-book reader when opening EPUB format | mst | Recipes | 7 | 02-13-2011 10:09 PM |
Opening hyperlinks in Calibre EPUB news documents on the Nook | TimboK | Barnes & Noble NOOK | 4 | 11-29-2010 04:18 PM |
Calibre and sony formatting when opening book | motero57 | Calibre | 2 | 01-29-2010 12:24 PM |