Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 06-17-2014, 01:34 PM   #1
jimb949
Member
jimb949 began at the beginning.
 
Posts: 11
Karma: 10
Join Date: May 2014
Device: none
white space

When I check my book on nook there is a blank space between each and every one of my paragraphs and it looks bad. I can delete them one by one but that would take me forever because I have 28 chapters. Is there a way to add a code in html to do this for me? It's a epub and I'm using sigil to do the editing.
jimb949 is offline   Reply With Quote
Old 06-17-2014, 01:53 PM   #2
JLius
Village idiot
JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.
 
JLius's Avatar
 
Posts: 157
Karma: 519566
Join Date: Mar 2014
Location: Belgium
Device: sony PRS T-1
Is it a CSS problem, or are there empty paragraphs or breaks between those paragraphs in the html file?

If its in CSS, you can change it to this:

p {
margin: 0;
padding:0;
}

If it's in the html, you can use regex to remove those empty paragraphs or breaks. But I'm no good with regex :-)
JLius is offline   Reply With Quote
Advert
Old 06-17-2014, 02:00 PM   #3
jimb949
Member
jimb949 began at the beginning.
 
Posts: 11
Karma: 10
Join Date: May 2014
Device: none
It's in the html file. There is a blank space between the paragraphs.
jimb949 is offline   Reply With Quote
Old 06-17-2014, 02:50 PM   #4
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
It sounds like whoever did this did carriage returns in the source. If you have the source,you might be able to find and replace them there.

Lacking that, look at the code view and see what exists between the </p> at the end of the paragraph and the <p> at the start of the next one.

You can copy the </p>whatever is in between<p> to find and replace it with </p><p>.

Otherwise you can edit the stylesheet as suggested above to eliminate the space above.



http://www.w3schools.com/css/css_margin.asp

This has more about the css for the stylesheet. There is even a try it yourself so you can see the effect of various changes without messing up your epub until you understand what you need to do.
mrmikel is offline   Reply With Quote
Old 06-17-2014, 03:38 PM   #5
jimb949
Member
jimb949 began at the beginning.
 
Posts: 11
Karma: 10
Join Date: May 2014
Device: none
There is nothing between the paragraphs. It's just a blank space. So how do I use the find and replace tool to delete the blank spaces?
jimb949 is offline   Reply With Quote
Advert
Old 06-17-2014, 04:15 PM   #6
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Then it is a css problem; see post #2.
eschwartz is offline   Reply With Quote
Old 06-17-2014, 04:19 PM   #7
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
Quote:
Originally Posted by jimb949 View Post
There is nothing between the paragraphs. It's just a blank space. So how do I use the find and replace tool to delete the blank spaces?
blank spaces in html used in epub are ignored between paragraphs. There is no need to replace them. They are not your problem. Likely CSS is the culprit.

Dale
DaleDe is offline   Reply With Quote
Old 06-17-2014, 04:25 PM   #8
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,015
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by JLius View Post
Is it a CSS problem, or are there empty paragraphs or breaks between those paragraphs in the html file?

If its in CSS, you can change it to this:

p {
margin: 0;
padding:0;
}

If it's in the html, you can use regex to remove those empty paragraphs or breaks. But I'm no good with regex :-)
Actually, for a nook, that CSS is possibly incorrect. What you want is...

Code:
p {
margin-top: 0;
margin-bottom: 0;
text-indent: 1.2em
}
Just remember to set the body correctly and any style with a center needs a text indent of 0. Also, there's no need to set the padding unless you want some padding.

Code:
body {
oeb-column-number: 1;
widows: 0;
orphans: 0;
margin-top: 0;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
text-align: justify
}
The oeb-column is to keep ADE from going off into two columns when the ADE window is increased enough. It doesn't seem to bother any other ePub compatible reader that I know of.
JSWolf is offline   Reply With Quote
Old 06-17-2014, 06:11 PM   #9
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
CSS=Cascading Style Sheet. It is the stylesheet which is part of your book. In the listing for p there may be several items enclosed in the {} brackets which control what the paragraph margin is at the top and what it is at the bottom.

See the listing above. If you open the book in sigil and look at the book browser, the style folder and style sheet will be all by itself. Click on it and study it, together with the above info along with the web site I pointed out to you.

If there is no stylesheet, then the style information is located at the top of each file that makes up the book. You can check there too. Theoretically you could do both, but to avoid confusion, people either put the style information at the top of each text file, or they use a stylesheet to which all the text files refer. If it is at the top of each file, it will be enclosed with <style> tags, if I recall correctly.
mrmikel is offline   Reply With Quote
Old 06-17-2014, 07:26 PM   #10
jimb949
Member
jimb949 began at the beginning.
 
Posts: 11
Karma: 10
Join Date: May 2014
Device: none
In my style sheet there is no listing for p. I have some .MsoNormal listings and some .calibre listings. Should I add the p listing at the bottom of the stye sheet and put margin-top: 0; margin-bottom: 0; inside?
jimb949 is offline   Reply With Quote
Old 06-17-2014, 07:51 PM   #11
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,015
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
What do most of the paragraphs begin with? Is it <p or is it <div?

If it is <p, add in the code for p that I posted a few messages back. If it is <div, use the same CSS code for p that I posted and change p { to div {

Also check what the class is next to the p or div. You might have to change that as well.

For example, if you see <p class="msonormal"> or <div class="msonormal"> then change msonormal to have the same CSS as the p I posted above.

Last edited by JSWolf; 06-17-2014 at 07:54 PM.
JSWolf is offline   Reply With Quote
Old 06-17-2014, 08:07 PM   #12
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
CSS priority rules say that class (e.g. ".MsoNormal") selectors override type (e.g. "p") selectors. You will have to fix the .MsoNormal rules (assuming the margin was defined there) for anything to stick.
eschwartz is offline   Reply With Quote
Old 06-18-2014, 04:44 AM   #13
JLius
Village idiot
JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.
 
JLius's Avatar
 
Posts: 157
Karma: 519566
Join Date: Mar 2014
Location: Belgium
Device: sony PRS T-1
Quote:
Originally Posted by JSWolf View Post
Actually, for a nook, that CSS is possibly incorrect. What you want is...

Code:
p {
margin-top: 0;
margin-bottom: 0;
text-indent: 1.2em
}
What would my code look like for a nook? Does it just ignore the margin: 0?
JLius is offline   Reply With Quote
Old 06-18-2014, 05:09 AM   #14
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Quote:
Originally Posted by JLius View Post
What would my code look like for a nook? Does it just ignore the margin: 0?
At least some models of the Nook have issues with the shorthand notation. So, it is better to write them out. Ignoring can be one thing, misinterpreting another. Not that bad when the value is 0, but still.
Toxaris is offline   Reply With Quote
Old 06-18-2014, 06:16 AM   #15
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
It is not surprising you have having problems. You have Word leftovers plus Calibre leftovers. This can make it very hard to see what is affecting things.

It might be an interesting experiment to save the epub with another name, open it in Sigil, edit the stylesheet to remove everything it and save the epub, then open it in your Nook to see what the effect is.

If the effect is more to your liking, you could add back bits of the stylesheet until you find just what is causing the problem.
mrmikel is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
alternative character for white space Jpax ePub 2 02-28-2014 03:28 AM
White space inserted between paragraphs TheBean Sigil 8 07-04-2013 08:04 AM
Sigil Adding White Space? beingnickb Sigil 20 07-31-2012 07:43 AM
Tabs or White Space? anamardoll General Discussions 57 06-13-2011 02:32 PM


All times are GMT -4. The time now is 09:20 AM.


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