Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 03-28-2010, 12:32 AM   #1
Skydog
Wizard
Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.
 
Skydog's Avatar
 
Posts: 2,243
Karma: 7400001
Join Date: Mar 2009
Location: Circling Earth @ Mach .83
Device: Elipsa 2E, Sage, Forma, Libra 2, Clara 2E, Kindle Oasis3, Voyage
Help w/margin problem following conversion

Forgive me if this has been answered before, but my searches here have produced zip.

I sanitized a Topaz file, converted to HTML, cleaned it up a bit with Sigil/WYSIWYG with hopes of converting to a decent mobi file. HTML looks good in Calibre's viewer, but after Calibre converts it the right margin has a normal width and the left margin is twice as wide. What is causing Calibre to do this in the conversion? Is there something that I can do with the HTML code (I'm almost clueless in this area) to prevent Calibre from producing a larger l/h margin?

Thanks to anyone who can help...
Skydog is offline   Reply With Quote
Old 03-28-2010, 04:59 PM   #2
Skydog
Wizard
Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.
 
Skydog's Avatar
 
Posts: 2,243
Karma: 7400001
Join Date: Mar 2009
Location: Circling Earth @ Mach .83
Device: Elipsa 2E, Sage, Forma, Libra 2, Clara 2E, Kindle Oasis3, Voyage
Nobody?
Skydog is offline   Reply With Quote
Advert
Old 03-28-2010, 09:15 PM   #3
Dellaster
本の虫
Dellaster has a complete set of Star Wars action figures.Dellaster has a complete set of Star Wars action figures.Dellaster has a complete set of Star Wars action figures.Dellaster has a complete set of Star Wars action figures.
 
Dellaster's Avatar
 
Posts: 242
Karma: 344
Join Date: May 2008
Location: USA
Device: Kindle3, DXG, Fire · iPad, iPod
Quote:
Originally Posted by Skydog View Post
Thanks to anyone who can help...
I'd love to receive those thanks but I'm afraid I can't help. Similar kind of thing happened to me last week with a sanitized ePUB novel. Both the left and right margins were huge, the text column only about 50% of the screen. That was on my IREX DR800SG. Looked fine in Calibre though.

I tried simplifying the CSS, removing all but Calibre's margin settings, but no go. I ended up unzipping the ePUB, displaying the HTML files in Firefox one by one (all 24, one per chapter), copying the rich text to Atlantis WP, tidying up, then having Atlantis output the EPUB with bare bones formatting. Looked great. The original had something like five pages of CSS, a define for every little element. It was ridiculous.

I'm not suggesting this fix to you, of course.
Dellaster is offline   Reply With Quote
Old 03-29-2010, 01:04 AM   #4
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by Skydog View Post
Forgive me if this has been answered before, but my searches here have produced zip.

I sanitized a Topaz file, converted to HTML, cleaned it up a bit with Sigil/WYSIWYG with hopes of converting to a decent mobi file. HTML looks good in Calibre's viewer, but after Calibre converts it the right margin has a normal width and the left margin is twice as wide. What is causing Calibre to do this in the conversion? Is there something that I can do with the HTML code (I'm almost clueless in this area) to prevent Calibre from producing a larger l/h margin?

Thanks to anyone who can help...
I'm clueless too, but if you PM the html to me I will find out why it is doing this.
DoctorOhh is offline   Reply With Quote
Old 03-29-2010, 01:41 AM   #5
Skydog
Wizard
Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.
 
Skydog's Avatar
 
Posts: 2,243
Karma: 7400001
Join Date: Mar 2009
Location: Circling Earth @ Mach .83
Device: Elipsa 2E, Sage, Forma, Libra 2, Clara 2E, Kindle Oasis3, Voyage
Quote:
Originally Posted by dwanthny View Post
I'm clueless too, but if you PM the html to me I will find out why it is doing this.
Will do - thank you!
Skydog is offline   Reply With Quote
Advert
Old 03-29-2010, 02:21 AM   #6
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by Skydog View Post
HTML looks good in Calibre's viewer, but after Calibre converts it the right margin has a normal width and the left margin is twice as wide. What is causing Calibre to do this in the conversion?
Does the mobi file look OK in Calibre's viewer or does it only look messed up on your Kindle?
DoctorOhh is offline   Reply With Quote
Old 03-29-2010, 04:46 AM   #7
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
I reviewed the html you sent it was missing the style.css file and the images. These files are most likely in folders right next to your html.

Since the style.css file was missing, this is the file that contains your margins and all other style info for your doc. I went and found one in the epub you sent. I just had to unzip the epub file (renamed the .epub to .zip) you also sent and was able to view the .css file in it.

All you have to do to make your conversion to mobi or epub a success is to modify the style.css (create a copy of the style.css before you muck with it so you can always return to the baseline) file and get rid of the screwy margins. This is done by opening the style.css file in a text editor, I use Notepad++ because it is good, opensource and free to use. Once you have the css file open in a text editor you'll see code to determine what everything in this html looks like.

In this css file there is alot of code controlling paragraphs (p.) and headers (h1,h2,h3,h4)

One line is prefaced p.cl-1p-v1 this identifies paragraph class=cl-1p-v1, this is the line that controls all paragraphs surrounded by that P tag.

Below is one paragraph from your html. When I used my browser (Firefox) to view source for your html file I found most of the main paragraphs of text were identified by p.cl-1p-v1 as exampled below.

Quote:
<p class="cl-1p-v1">No one knew who she was. Or, more correctly perhaps, what name she might have used since 1916. And what had become of the man and the two children who had been with her at the railway station? Were they a figment of the killer's overheated imagination? Or were their bodies yet to be discovered?</p>
I went to the .css file and found the line that controls this paragraph and changed the left and right margins to 0.0% and reduced the indent to 2.5% then I saved the file.

Code:
p.cl-1p-v1 { text-indent: 2.5%; margin-left: 0.0%; margin-top: 0.0%; text-align: justify; margin-right: 0.0%; line-height: 100.0%; }
Then I refreshed the browser and saw one paragraph still messed up. I looked in the source again. This paragraph was identified by p.cl-pf-v1

Quote:
<p class="cl-pf-v1">It began simply enough, with the London train pulling into the station at the small Dorset town of Singleton Magna. The stop there was always brief. Half a dozen passengers got off, and another handful generally got on, heading south to the coast. A few boxes and sacks were offloaded with efficiency, and the train rolled out almost before the acrid smoke of its arrival had blown away.</p>
I simply made the line that controlled p.cl-pf-v1 look like the other I had changed earlier and saved the css file again.

Code:
p.cl-pf-v1 { text-indent: 2.5%; margin-left: 0.0%; margin-top: 0.0%; text-align: justify; margin-right: 0.0%; line-height: 100.0%; }
When I refreshed the browser this paragraph was fine.

There are other's that have a large left margin but you might want to leave them or change them as they are the critics blurbs in the beginning of the book.

After you change the code and the html looks as expected then add it to Calibre and convert it.

If you get lost use Google and look up css paragraph or css margins or better yet css tutorials for beginners for more info. A person who can wallow in the script world enough to change drm'd topaz books to a suitable format can handle basic css.

Anyone who knows html and css can tell I am clueless but even I can make one of these things look like the other. Poke around, get your hands dirty, you'll be fine.

I emailed you the epub back with only the 2 lines below changed in the style002.css file. View the epub and see if this corrected the worst of what you were talking about.

Code:
p.cl-1p-v1 { text-indent: 2.5%; margin-left: 0.0%; margin-top: 0.0%; text-align: justify; margin-right: 0.0%; line-height: 100.0%; }

p.cl-pf-v1 { text-indent: 2.5%; margin-left: 0.0%; margin-top: 0.0%; text-align: justify; margin-right: 0.0%; line-height: 100.0%; }
Good Luck!

Last edited by DoctorOhh; 03-29-2010 at 05:09 AM.
DoctorOhh is offline   Reply With Quote
Old 03-29-2010, 01:43 PM   #8
Skydog
Wizard
Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.
 
Skydog's Avatar
 
Posts: 2,243
Karma: 7400001
Join Date: Mar 2009
Location: Circling Earth @ Mach .83
Device: Elipsa 2E, Sage, Forma, Libra 2, Clara 2E, Kindle Oasis3, Voyage
Walt,

(Re: your previous question: the margin problem was there with the mobi file viewed in Calibre)

It looks great!

Thank you very, very much for your effort and explanation - something even I am able to understand. Whatever code with which I was experimenting was apparently wrong and I will use your result as a study guide. Your recommendation of Notepad++ is appreciated - it may be a bit easier for me.

Again, thank you very much for your time and assistance which will hopefully help clueless others as well.


-Pat
Skydog is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Margin Control with ePub/Mobi Conversion ascherjim Calibre 7 10-15-2010 03:09 AM
ibook on the iphone margin problem gandor62 Calibre 0 10-08-2010 10:41 PM
New conversion questions: Getting rid of huge left margin Epub to Mobi geekgeek Calibre 2 08-31-2010 11:00 PM
conversion problem? mountainman80 ePub 8 01-29-2010 11:54 PM
calibre ignore margin-top and margin-bottom bender Calibre 2 12-11-2009 06:58 AM


All times are GMT -4. The time now is 08:30 AM.


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