12-19-2011, 05:11 PM | #1 |
Member
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. |
12-19-2011, 05:39 PM | #2 |
Reader
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. |
Advert | |
|
12-19-2011, 05:55 PM | #3 |
Member
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? |
12-19-2011, 06:26 PM | #4 | |
Well trained by Cats
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:
Something lile Code:
<p class="calibreN"> </p> 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) |
|
12-20-2011, 02:37 AM | #5 | ||
Bookmaker & Cat Slave
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:
This: Quote:
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 |
||
Advert | |
|
12-20-2011, 02:50 AM | #6 |
Reader
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. |
12-20-2011, 12:37 PM | #7 |
Member
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.
|
12-30-2011, 02:07 PM | #8 |
Junior Member
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.
|
12-30-2011, 02:10 PM | #9 |
Resident Curmudgeon
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.
|
12-31-2011, 04:43 AM | #10 | |
Reader
Posts: 519
Karma: 24612
Join Date: Aug 2009
Location: Utrecht, NL
Device: Kobo Aura 2, iPhone, iPad
|
Quote:
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. |
|
12-31-2011, 05:55 AM | #11 |
Bookmaker & Cat Slave
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 |
01-02-2012, 05:18 AM | #12 |
Wizard
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.
|
03-17-2016, 03:53 PM | #13 |
Junior Member
Posts: 3
Karma: 10
Join Date: Mar 2016
Device: iPad
|
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?
|
03-17-2016, 04:20 PM | #14 | |
Well trained by Cats
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:
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.) |
|
03-17-2016, 04:34 PM | #15 | |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Quote:
|
|
Thread Tools | Search this Thread |
|
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 |