|
|
#1 |
|
Chasing Butterflies
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,129
Karma: 5058657
Join Date: Mar 2011
Location: American Southwest
Device: Uses batteries.
|
Calibre ePUB to mobi conversion help (with images)
I'm trying to convert an ePUB book to a mobi book via Calibre 0.8.35. The conversion seems pretty good except I'm bumping up into a problem with the images. Images that should be on the same page as the following text are sometimes cordoned off on their own page and I don't want that. The weird thing is that this isn't occurring everywhere -- so I can see that I can get what I want, I just can't figure out how. Help! --- The Chapter1 picture (attached) is bad. You can see that the image is on a separate page from the text. The ePUB code (pre-conversion) is here: Code:
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Chapter 1 - Rosella</title>
<link href="../Styles/stylesheet.css" rel="stylesheet" type="text/css" />
<style type="text/css">
/*<![CDATA[*/
@page { margin-bottom: 5.000000pt; margin-top: 5.000000pt; }
p.sgc-1 {text-align: center;}
/*]]>*/
</style>
</head>
<body style="">
<p class="sgc-1"><img alt="Chapter 1 - Rosella" src="../Images/Chapter%2001%20-%20Rosella.png" /></p>
<h1 id="heading_id_2" title="Chapter 1 - Rosella">Chapter 1 - <i>Rosella</i></h1>
<p class="text">Rosella eyed the darkening sky appreciatively as she walked the dirt-packed road. The sky had threatened rain all day, and she was thrilled to see thick thunderclouds rolling overhead as dusk approached. She hadn't planned on a downpour, and did not have the necessary skill with weather to create one even if she had, but a storm would add a nice touch to tonight's events.</p>
Code:
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Rosella</title>
<link href="../Styles/stylesheet.css" rel="stylesheet" type="text/css" />
<style type="text/css">
/*<![CDATA[*/
@page { margin-bottom: 5.000000pt; margin-top: 5.000000pt; }
p.sgc-1 {text-align: center;}
/*]]>*/
</style>
</head>
<body style="">
<p class="sgc-1"><img alt="Character Portrait: Rosella" src="../Images/Chapter%2001%20-%20Rosella.png" /></p>
<h2 id="heading_id_2" title="Character Portrait: Rosella">Character Portrait: <i>Rosella</i></h2>
<p class="text">When I started <i>Pulchritude</i>, the "Beauty and the Beast" story most firmly fixed in my mind was the Disney version, which starts with a curse. A beautiful fairy disguises herself as a beggar and then curses a prince for his selfishness when he refuses to give her lodging for the night.</p>
__________________
Email me for a free copy. Visit my site for deconstructions and indie interviews. ~ Ana Mardoll |
|
|
|
|
|
#2 |
|
Staff to 4 Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,698
Karma: 2485850
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2,Black Astak PEz, K4NT(now Wifes)
|
look at your stylesheet.
see if you have styles for h1 and h2 (note there is no leading dot as these apply at the Tag Level) Post those sections (guessing h1 has a page-break-before: always ) and you want that to happen before you image and page-break-before: never for the h2 tag
__________________
Using: Ubuntu(32 bit):Oneric,Precise and XPpro SP3, W7HP(64)- - Libre Office w/Writer2EPUB
|
|
|
|
|
Enthusiast
|
|
|
|
#3 |
|
Chasing Butterflies
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,129
Karma: 5058657
Join Date: Mar 2011
Location: American Southwest
Device: Uses batteries.
|
Thank you for responding.
![]() This is my stylesheet: Code:
@namespace h "http://www.w3.org/1999/xhtml";
body { margin: 0; }
h1 { text-align: left; }
h2 { text-align: left;}
img {text-align: center;}
__________________
Email me for a free copy. Visit my site for deconstructions and indie interviews. ~ Ana Mardoll |
|
|
|
|
|
#4 | |
|
Staff to 4 Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,698
Karma: 2485850
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2,Black Astak PEz, K4NT(now Wifes)
|
Quote:
Note doing this at the Tag level affects all IMG tags and All H1 and H2 tags it might be better to create some classes and style the appropriate locations. KISS is not always appropriate
__________________
Using: Ubuntu(32 bit):Oneric,Precise and XPpro SP3, W7HP(64)- - Libre Office w/Writer2EPUB
|
|
|
|
|
|
|
#5 |
|
Chasing Butterflies
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,129
Karma: 5058657
Join Date: Mar 2011
Location: American Southwest
Device: Uses batteries.
|
Unfortunately, that didn't change the behavior seen in conversion.
![]() I really am not against making it more complicated if it makes the conversion act as I need it to, but it sure would be nice to understand why the Character Portrait instance works fine but the Chapter 1 instance doesn't. That seems significant to me, somehow.
__________________
Email me for a free copy. Visit my site for deconstructions and indie interviews. ~ Ana Mardoll |
|
|
|
|
|
#6 |
|
Chasing Butterflies
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,129
Karma: 5058657
Join Date: Mar 2011
Location: American Southwest
Device: Uses batteries.
|
Well, by trial and error I have narrowed it down.
This works: Code:
<h1 id="heading_id_2" title="Chapter 1 - Rosella">Character Portrait: <i>Rosella</i></h1> Code:
<h1 id="heading_id_2" title="Chapter 1 - Rosella">Chapter 1: <i>Rosella</i></h1> It almost seems like the page is being split because of the word "Chapter". Can that be possible? Is there a way to prevent that?
__________________
Email me for a free copy. Visit my site for deconstructions and indie interviews. ~ Ana Mardoll |
|
|
|
|
|
#7 |
|
Chasing Butterflies
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,129
Karma: 5058657
Join Date: Mar 2011
Location: American Southwest
Device: Uses batteries.
|
Now I knew what to look for, I found a previous thread and solved it. Thank you!
![]() http://www.mobileread.com/forums/sho...d.php?t=101467
__________________
Email me for a free copy. Visit my site for deconstructions and indie interviews. ~ Ana Mardoll |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| problem with images - epub to mobi conversion | LynnGHughes | Mobi | 18 | 04-17-2012 09:56 AM |
| Calibre MOBI to EPUB conversion error | spanishgirl94 | Conversion | 3 | 03-19-2011 05:22 PM |
| help mobi to epub conversion: lost all images | Sylver | Calibre | 10 | 01-13-2011 08:31 PM |
| Automatic Web conversion to mobi/epub and send mail by Calibre | bthoven | Amazon Kindle | 0 | 11-14-2010 09:56 PM |
| Conversion Error lrf -> mobi/epub (Calibre 0.6.33) | Joerg_Mosthaf | Calibre | 2 | 01-13-2010 07:40 AM |