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

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 12-19-2011, 06:11 PM   #1
henrypartridge
Member
henrypartridge began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Apr 2011
Device: kindle
Please help with line spacing

The whole book is double spaced, i.e. a space betwen every single line. I've scoured the forum and it seems that every line is being treated as a a paragraph because in code view every line ends with </p>
The advice given was to go to stylesheet CSS and in paragraph put for line-space 1.2 em. However, in CSS I don't have paragraph or line spacing, this is what I have.

@namespace h "http://www.w3.org/1999/xhtml";
.bold {
font-weight: bold
}
.calibre {
display: block;
font-size: 1em;
line-height: 1.2;
margin-bottom: 0;
margin-left: 5pt;
margin-right: 5pt;
margin-top: 0;
padding-left: 0;
padding-right: 0;
text-align: justify
}
.calibre1 {
display: block
}
.calibre2 {
display: block;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
margin-top: 1em;
text-indent: 0
}
.calibre3 {
display: block;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
margin-top: 1em;
text-align: center;
text-indent: 0
}
.calibre4 {
font-size: 1.5em;
line-height: 1.2
}
.calibre5 {
display: block;
margin-bottom: 0;
margin-left: 19pt;
margin-right: 0;
margin-top: 1em;
text-indent: -19pt
}
.calibre6 {
color: blue;
cursor: pointer;
text-decoration: underline
}
.calibre7 {
color: blue
}
.mbppagebreak {
display: block;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
margin-top: 0
}
.underline {
text-decoration: underline
}

So, I'm stuck and any help would be most appreciated. I'm a total newbie with this program- sorry.
henrypartridge is offline   Reply With Quote
Old 12-19-2011, 06:39 PM   #2
pietvo
Reader
pietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notes
 
pietvo's Avatar
 
Posts: 514
Karma: 24612
Join Date: Aug 2009
Location: Cochabamba, BO
Device: Onyx Boox 60, iPod Touch
Line spacing within a paragraph is the line-height parameter. You have 1.2 which is a normal value, nothing exceptional. Spacing between paragraphs is determined by margin-top and margin-bottom. As you state that all lines are a paragraph, these would probably cause the extra spacing. Only the calibre2, 3 and 5 have additional margin-top.

You should start with removing the additional paragraph breaks and see if that solves the problem. It could be that there are also empty paragraphs (lines) between the text lines. There have been some discussions in this forum about how to remove the spurious </p>'s with regexp replace.
pietvo is offline   Reply With Quote
 
Advertisement
Old 12-19-2011, 06:55 PM   #3
henrypartridge
Member
henrypartridge began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Apr 2011
Device: kindle
You should start with removing the additional paragraph breaks and see if that solves the problem.


Thanks: sorry to be thick but how do remove the additional paragraph breaks?
henrypartridge is offline   Reply With Quote
Old 12-19-2011, 07:26 PM   #4
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,082
Karma: 5939999
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by henrypartridge View Post
You should start with removing the additional paragraph breaks and see if that solves the problem.


Thanks: sorry to be thick but how do remove the additional paragraph breaks?
to search for additional paragraph breaks, you first need to know what they look like
Something lile
Code:
<p class="calibreN">&nbsp;</p>
where you see the wide gaps.
That is what you search for in CODE VIEW
You replace with an (empty) string (Tidy will clean up the extra space in CV later on)
theducks is offline   Reply With Quote
Old 12-20-2011, 03:37 AM   #5
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 2,589
Karma: 14407087
Join Date: Apr 2010
Location: Phoenix, AZ
Device: Kindle2, iPad, KindleFire and NookColor
Quote:
Originally Posted by henrypartridge View Post
You should start with removing the additional paragraph breaks and see if that solves the problem.


Thanks: sorry to be thick but how do remove the additional paragraph breaks?
Henry:

This:

Quote:
<p></p>
is a pair of paragraph TAGS. The one without the slash is the opening tag, and tells the renderer (browser, ebook reader, etc.) that whatever comes immediately after it is the BEGINNING of a new paragraph; the tag WITH the slash tells the renderer that it's the END of the paragraph. This is html 101.

You need to start here: http://www.w3schools.com and walk through their html "course"/tutorial. If you're attempting to use Sigil to edit an ePUB, when you don't know what a paragraph tag is, you are attempting to GALLOP before you have learnt to walk. Just because Calibre can turn something--anything, nearly--into an ePUB doesn't mean one doesn't need some basic markup language skills in order to edit it correctly. Despite Valloric's initial intent, Sigil is not really a "WYSIWYG" epub editor. You might be better off with Jutoh, which is probably a more familiar interface for you.

Hitch
Hitch is offline   Reply With Quote
Old 12-20-2011, 03:50 AM   #6
pietvo
Reader
pietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notes
 
pietvo's Avatar
 
Posts: 514
Karma: 24612
Join Date: Aug 2009
Location: Cochabamba, BO
Device: Onyx Boox 60, iPod Touch
@henrypartridge:
Can you show us a small part of the lines that you want to change from the code view?

If you created the epub for example from a PDF with Calibre, you could try to redo the conversion with the option unwrap lines in heuristic processing. That often solves these kinds of problems.

Last edited by pietvo; 12-20-2011 at 03:55 AM.
pietvo is offline   Reply With Quote
Old 12-20-2011, 01:37 PM   #7
henrypartridge
Member
henrypartridge began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Apr 2011
Device: kindle
Yes, that worked really well: many thanks very good of you. And thanks to other repliers: I am looking at that course and Jutoh.
henrypartridge is offline   Reply With Quote
Old 12-30-2011, 03:07 PM   #8
nymormon
Junior Member
nymormon began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Dec 2011
Location: New York
Device: kindle
I've been trying to convert some text files to EPUB, and I am not getting the correct format. I have a doublespace between some paragraphs, yet in the finished product it looks triple spaced. On some lines that should be singlespaced, it is doublespaced. I've looked at the code, and it appears that the culprit is the <p></p>. When I try to remove the first <p>, and replace the </p> with a <br>, it won't let me. I'm not sure what to do to get the formatting that I want.
nymormon is offline   Reply With Quote
Old 12-30-2011, 03:10 PM   #9
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: 37,822
Karma: 18755150
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
I would remove the line-space of 1.2em as it made th spacing between the lines too big.
JSWolf is offline   Reply With Quote
Old 12-31-2011, 05:43 AM   #10
pietvo
Reader
pietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notes
 
pietvo's Avatar
 
Posts: 514
Karma: 24612
Join Date: Aug 2009
Location: Cochabamba, BO
Device: Onyx Boox 60, iPod Touch
Quote:
Originally Posted by nymormon View Post
I've been trying to convert some text files to EPUB, and I am not getting the correct format. I have a doublespace between some paragraphs, yet in the finished product it looks triple spaced. On some lines that should be singlespaced, it is doublespaced. I've looked at the code, and it appears that the culprit is the <p></p>. When I try to remove the first <p>, and replace the </p> with a <br>, it won't let me. I'm not sure what to do to get the formatting that I want.
The spacing between paragraphs comes from margin-bottom of the first paragraph and/or margin-top of the second. When there are also the corresponding paddings they also contribute but they aren't often used with <p>.

And in XHTML the <br> should be spelled <br /> or <br/> (the first one being HTML compatible). The spacing between lines inside a paragraph, including those induced by <br />, is determined by line-height.
pietvo is offline   Reply With Quote
Old 12-31-2011, 06:55 AM   #11
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 2,589
Karma: 14407087
Join Date: Apr 2010
Location: Phoenix, AZ
Device: Kindle2, iPad, KindleFire and NookColor
Ditto what Pietvo said--you clearly have differently styled paragraph tags in there. You see how some of the .calibre style classes have "top-margin" settings, while some don't? This is why I said you needed to spend some time at W3schools--so you can get a grasp of what those styles mean and do, and so you can far more easily figure out just WHY some of your paragaphs have the correct amount of space, some have two, some have three--you really are trying to push a chain up a hill, beating your head against the wall.

Hitch
Hitch is offline   Reply With Quote
Old 01-02-2012, 06:18 AM   #12
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: 3,097
Karma: 5658305
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
I agree with Hitch, get some basic knowledge about x(HTML) and CSS. Otherwise, try the tutorial by Pablo.
Toxaris 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
One line spacing every sentence edy101edy Conversion 9 08-15-2011 08:29 PM
Need help with line spacing ficbot Sigil 4 05-31-2011 02:52 PM
7.34 line spacing??? JSWolf Calibre 18 12-20-2010 12:09 AM
Line spacing Ivo Kobo Reader 3 06-30-2010 01:54 PM
Reducing line spacing rjcroy Kobo Reader 3 06-11-2010 10:23 PM


All times are GMT -4. The time now is 06:25 PM.


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