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, 05: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, 05: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: 519
Karma: 24612
Join Date: Aug 2009
Location: Utrecht, NL
Device: Kobo Aura 2, iPhone, iPad
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
Advert
Old 12-19-2011, 05: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, 06:26 PM   #4
theducks
Well trained by Cats
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: 29,691
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
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, 02: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: 11,448
Karma: 157030631
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
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
Advert
Old 12-20-2011, 02: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: 519
Karma: 24612
Join Date: Aug 2009
Location: Utrecht, NL
Device: Kobo Aura 2, iPhone, iPad
@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 02:55 AM.
pietvo is offline   Reply With Quote
Old 12-20-2011, 12: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, 02: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, 02: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: 73,668
Karma: 127838212
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
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, 04: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: 519
Karma: 24612
Join Date: Aug 2009
Location: Utrecht, NL
Device: Kobo Aura 2, iPhone, iPad
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, 05: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: 11,448
Karma: 157030631
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
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, 05: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: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
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
Old 03-17-2016, 03:53 PM   #13
KatyPerryFan4Eva
Junior Member
KatyPerryFan4Eva began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Mar 2016
Device: iPad
Question

I have tried this method that has been mentioned and it STILL won't work in sigil for me, I also need to know how to indent the first line of paragraphs as I'm having trouble there too. Can anyone help me out please?
KatyPerryFan4Eva is offline   Reply With Quote
Old 03-17-2016, 04:20 PM   #14
theducks
Well trained by Cats
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: 29,691
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by KatyPerryFan4Eva View Post
I have tried this method that has been mentioned and it STILL won't work in sigil for me, I also need to know how to indent the first line of paragraphs as I'm having trouble there too. Can anyone help me out please?
Learn CSS and XHTML.
I know this sounds harsh, but what you want, needs user action.
Sigil (and Calibre) Editors are not WYSIWYG GUI editors.

What you want is trivial to code, but you need to know how to apply the code (and have it be robust across devices. Coding for a single device is easy.)
theducks is offline   Reply With Quote
Old 03-17-2016, 04:34 PM   #15
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 KatyPerryFan4Eva View Post
I have tried this method that has been mentioned and it STILL won't work in sigil for me, I also need to know how to indent the first line of paragraphs as I'm having trouble there too. Can anyone help me out please?
As TheDucks said, learn the basics of XHTLM/CSS. The tutorial form Pablo is a very good place to start. To get you started, here is the link: https://wiki.mobileread.com/wiki/EPub_Tutorial
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 07:29 PM
Need help with line spacing ficbot Sigil 4 05-31-2011 01:52 PM
7.34 line spacing??? JSWolf Calibre 18 12-19-2010 11:09 PM
Line spacing Ivo Kobo Reader 3 06-30-2010 12:54 PM
Reducing line spacing rjcroy Kobo Reader 3 06-11-2010 09:23 PM


All times are GMT -4. The time now is 03:40 AM.


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