Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 03-10-2011, 01:27 PM   #1
vanpelten
Member
vanpelten began at the beginning.
 
vanpelten's Avatar
 
Posts: 19
Karma: 10
Join Date: Feb 2011
Device: Kindle
Can't get rid of paragraph spaces converting to Mobi

I'm just getting the handle of this business of conversions using Calibre and Sigil to reformat, tweak, etc.

I've run into a unique (for me) problem of not being able to get rid of those extra spaces between paragraphs with two similarly formatted ebooks -- despite ticking off "remove spacing between paragraphs" and later, also using heuristic processing to "delete blank lines between paragraphs".

I'm converting from ePub to Mobi. The paragraph issue isn't as prominent when viewing the Mobi in the Kindle for PC software, but when transferred to my Kindle, those blasted para spaces are still there

I have checked the stylesheet.css in Sigil and the line-hight of 1.2 seems to match other conversions and epubs that had no similar problems.

Is this a matter for the Calibre forum or Sigil? I'd love to stamp out those nasty spaces asap!!

Here's the stylesheet, just in case some maven here can spot the problem right off:

@namespace h "http://www.w3.org/1999/xhtml";
.big {
font-size: 1.29167em;
font-weight: bold;
line-height: 1.2;
}
.calibre {
display: block;
font-size: 1em;
margin-bottom: 0;
margin-left: 5pt;
margin-right: 5pt;
margin-top: 0;
padding-left: 0;
padding-right: 0;
text-align: justify
}
.calibre1 {
border-bottom: 0;
border-top: 0;
display: block;
margin-bottom: 0;
margin-top: 0;
padding-bottom: 0;
padding-top: 0;
text-align: center;
text-indent: 1.5em
}
.calibre10 {
border-bottom: 0;
border-top: 0;
display: block;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-top: 0;
text-align: justify;
text-indent: 1.5em
}
.calibre2 {
display: block;
font-size: 2em;
font-weight: bold;
line-height: 1.2;
margin-bottom: 0.67em;
margin-left: 0;
margin-right: 0;
margin-top: 0.67em
}
.calibre3 {
display: block;
line-height: 1.2;
}
.calibre4 {
display: block
}
.calibre5 {
border-bottom: 0;
border-top: 0;
display: block;
margin-bottom: 0;
margin-top: 0;
padding-bottom: 0;
padding-top: 0;
text-indent: 1.5em
}
.calibre6 {
border-bottom: 0;
border-top: 0;
display: block;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-top: 0;
text-align: center;
text-indent: 1.5em
}
.calibre7 {
font-style: italic
}
.calibre8 {
border-bottom: 0;
border-top: 0;
display: block;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-top: 0;
text-indent: 1.5em
}
.calibre9 {
border-bottom: 0;
border-top: 0;
display: block;
margin-bottom: 0;
margin-top: 0;
padding-bottom: 0;
padding-top: 0;
text-align: justify;
text-indent: 1.5em
}
vanpelten is offline   Reply With Quote
Old 03-10-2011, 02:19 PM   #2
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 15,249
Karma: 6020307
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
your stylesheet only has 1, non-zero margin (calibre2)

Your code may have blank paragraphs coded
Code:
<p class="something">&nbsp;</p>
or
Code:
<p class="something"><br />;</p>
theducks is offline   Reply With Quote
 
Advertisement
Old 03-10-2011, 02:20 PM   #3
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,473
Karma: 1053245
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
This is going to come down to how the spacing is being inserted. It might be an actual blank paragraph in between every onr containing text. Without seeing the full document its hard to say for sure why you still have spacing in the MOBI output when using the remove spacing option.
user_none is offline   Reply With Quote
Old 03-10-2011, 04:08 PM   #4
vanpelten
Member
vanpelten began at the beginning.
 
vanpelten's Avatar
 
Posts: 19
Karma: 10
Join Date: Feb 2011
Device: Kindle
Quote:
Originally Posted by theducks View Post
your stylesheet only has 1, non-zero margin (calibre2)

Your code may have blank paragraphs coded
Code:
<p class="something">&nbsp;</p>
or
Code:
<p class="something"><br />;</p>
theducks, you may be onto something. Here's some code from the first few paragraphs of the book (sorry to chew up so much space):

<?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" xml:lang="en" xmlns:xml="http://www.w3.org/XML/1998/namespace">
<head>
<title>1969-1973</title>
<link href="../Styles/stylesheet.css" rel="stylesheet" type="text/css" />

<style type="text/css">
@page { margin-bottom: 5.000000pt; margin-top: 5.000000pt; }
</style>
</head>

<body class="calibre">
<div class="calibre1"></div>

<div class="calibre5">
<br class="calibre4" />
<br class="calibre4" />
<br class="calibre4" />
</div>

<p class="calibre6"><span class="big">1969-1973</span></p>

<div class="calibre5">
<br class="calibre4" />
</div>

<div class="calibre5">
I used to love listening to stories about faraway places. It was almost pathological.<br class="calibre4" />
</div>

<div class="calibre5">
There was a time, a good ten years ago now, when I went around latching onto one person after another, asking them to tell me about the places where they were born and grew up. Times were short of people willing to lend a sympathetic ear, it seemed, so anyone and everyone opened up to me, obligingly and emphatically telling all. People I didn't even know somehow got word of me and sought me out.<br class="calibre4" />
</div>

<div class="calibre5">
It was as if they were tossing rocks down a dry well: they'd spill all kinds of different stories my way, and when they'd finished, they'd go home pretty much satisfied. Some would talk contentedly; some would work up quite an anger getting it out. Some would put things well, but just as often others would come along with stories I couldn't make head nor tail of from beginning to end. There were boring stories, pathetic tear-jerkers, jumbles of half-nonsense. Even so, I'd hold out as long as I could and give a serious listen.<br class="calibre4" />
</div>

<div class="calibre5">
Everyone had something they were dying to tell somebody or shout to the whole world – who knows why? I always felt as if I'd been handed a cardboard box crammed full of monkeys. I'd take the monkeys out of the box one at a time, carefully brush off the dust, give them a pat on the bottom, and send them scurrying off into the fields. I never knew where they went from there. They probably ended their days nibbling acorns somewhere. But that, after all, was their fate.<br class="calibre4" />
</div>

<div class="calibre5">
That was the thing about it. There was so little return on all the effort involved. Thinking back on it now, I'll bet if there had been a World's Most Earnest Listener contest that year, I'd have won hands down. And I'd probably have won a box of kitchen matches.<br class="calibre4" />
</div>


Me again:
If you think the <div class="calibre5"> at the top of each paragraph is causing the problem, I can manually do a "search & destroy" in each of the xhtml pages' codes. Or could it (also) be the </div> at the bottom of each paragraph too that have to go, too?

Thanks in advance. I HATE those spaced paragraphs!!!
vanpelten is offline   Reply With Quote
Old 03-10-2011, 04:25 PM   #5
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 15,249
Karma: 6020307
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by vanpelten View Post
theducks, you may be onto something. Here's some code from the first few paragraphs of the book (sorry to chew up so much space):

<?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" xml:lang="en" xmlns:xml="http://www.w3.org/XML/1998/namespace">
<head>
<title>1969-1973</title>
<link href="../Styles/stylesheet.css" rel="stylesheet" type="text/css" />

<style type="text/css">
@page { margin-bottom: 5.000000pt; margin-top: 5.000000pt; }
</style>
</head>

<body class="calibre">
<div class="calibre1"></div>

<div class="calibre5">
<br class="calibre4" />
<br class="calibre4" />
<br class="calibre4" />
</div>

<p class="calibre6"><span class="big">1969-1973</span></p>

<div class="calibre5">
<br class="calibre4" />
</div>

<div class="calibre5">
I used to love listening to stories about faraway places. It was almost pathological.<br class="calibre4" />
</div>

<div class="calibre5">
There was a time, a good ten years ago now, when I went around latching onto one person after another, asking them to tell me about the places where they were born and grew up. Times were short of people willing to lend a sympathetic ear, it seemed, so anyone and everyone opened up to me, obligingly and emphatically telling all. People I didn't even know somehow got word of me and sought me out.<br class="calibre4" />
</div>

<div class="calibre5">
It was as if they were tossing rocks down a dry well: they'd spill all kinds of different stories my way, and when they'd finished, they'd go home pretty much satisfied. Some would talk contentedly; some would work up quite an anger getting it out. Some would put things well, but just as often others would come along with stories I couldn't make head nor tail of from beginning to end. There were boring stories, pathetic tear-jerkers, jumbles of half-nonsense. Even so, I'd hold out as long as I could and give a serious listen.<br class="calibre4" />
</div>

<div class="calibre5">
Everyone had something they were dying to tell somebody or shout to the whole world – who knows why? I always felt as if I'd been handed a cardboard box crammed full of monkeys. I'd take the monkeys out of the box one at a time, carefully brush off the dust, give them a pat on the bottom, and send them scurrying off into the fields. I never knew where they went from there. They probably ended their days nibbling acorns somewhere. But that, after all, was their fate.<br class="calibre4" />
</div>

<div class="calibre5">
That was the thing about it. There was so little return on all the effort involved. Thinking back on it now, I'll bet if there had been a World's Most Earnest Listener contest that year, I'd have won hands down. And I'd probably have won a box of kitchen matches.<br class="calibre4" />
</div>


Me again:
If you think the <div class="calibre5"> at the top of each paragraph is causing the problem, I can manually do a "search & destroy" in each of the xhtml pages' codes. Or could it (also) be the </div> at the bottom of each paragraph too that have to go, too?

Thanks in advance. I HATE those spaced paragraphs!!!
You are seeing (the) Red
theducks is offline   Reply With Quote
Old 03-10-2011, 04:34 PM   #6
vanpelten
Member
vanpelten began at the beginning.
 
vanpelten's Avatar
 
Posts: 19
Karma: 10
Join Date: Feb 2011
Device: Kindle
Yesssir! I just experimented ridding the red in the first few chapters and ...voilalala...Calibre did it's thing, the spaces are gone.

Thank you very very much for pointing me in the right direction, this is such an educational experience,

Blessings
vanpelten is offline   Reply With Quote
Old 03-10-2011, 04:35 PM   #7
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,473
Karma: 1053245
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
It's the br before the closing div tag that is causing the blank line.
user_none is offline   Reply With Quote
Old 03-10-2011, 06:00 PM   #8
vanpelten
Member
vanpelten began at the beginning.
 
vanpelten's Avatar
 
Posts: 19
Karma: 10
Join Date: Feb 2011
Device: Kindle
Quote:
Originally Posted by user_none View Post
It's the br before the closing div tag that is causing the blank line.
You are absolutely correct -- I should have known better, even in the very short time I've been tweaking a few of my ebooks for conversion...
vanpelten is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
spaces lost during converting to fb2 format n1ch0las Calibre 13 12-24-2010 07:11 AM
Line spaces please get rid of them!!!!!!! JSWolf Calibre 2 12-13-2010 05:04 PM
I'm having a problem with extra paragraph spaces akosimike Calibre 10 05-27-2010 07:53 PM
Paragraph indendation or spaces? enarchay Sony Reader 0 05-28-2009 06:18 AM
Anyway to remove paragraph spaces in pdb files? twister Other formats 3 03-12-2009 10:36 PM


All times are GMT -4. The time now is 05:09 PM.


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