Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 07-17-2020, 07:27 PM   #1
HFM1101
Member
HFM1101 began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Jul 2018
Device: Kindle Voyage
Indent issue with paragraph spacing

Hi,

On probably 90% of books I convert in Calibre, I usually encounter an aesthetic problem where the paragraph indents are two large.

I use the 'Look & Feel' tab to fix the text by going to 'Layout', checking the box that says 'Remove spacing between paragraphs' and change the indent size from 1.5em to 0.9em.

This usually works for the indents, but it also removes the spacing between paragraphs and sometimes the spacing is very necessary, especially in history texts where there are quotes from other sources. If I use the above method for these, all the paragraphs become squashed together.

Is there a way to only change the indent size but not remove the spacing? I have tried to change the indent size and then UNCHECKING the box, but that does not make the indents smaller.
Any help gratefully received.
HFM1101 is offline   Reply With Quote
Old 07-17-2020, 08:58 PM   #2
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: 79,752
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
The solution is to load the eBook into Calibre editor (KF8 or ePub) and edit the CSS to fix the indent.
JSWolf is offline   Reply With Quote
Advert
Old 07-17-2020, 11:37 PM   #3
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,587
Karma: 14328510
Join Date: Nov 2019
Device: none
In my experience calibre can create both the specified indent and have spacing between paragraphs. I'm wondering if the books that don't work are using a div instead of a p for making paragraphs. Although that's a quirk that I don't often see.
hobnail is offline   Reply With Quote
Old 07-18-2020, 12:31 AM   #4
ps67
Guru
ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.
 
Posts: 755
Karma: 7025494
Join Date: Aug 2017
Location: Italy
Device: Kindle Paperwhite, Kobo Elipsa, Pocketbook Inkpad 4, Inkpad Color
Yes, with calibre when you make the conversion you can have both the indentation and the space between the lines.

Of course this solution can properly handle only books formatted in a very simple way, otherwise You need to edit css.

For example, citations usually have the space before and after but may not have indentation, at least in the first paragraph (in addition to having a larger margin on the right and left and usually a slightly smaller font size). Often, however, in plain text there is no space between paragraphs (and sometimes the first paragraph is not indented).

If you use the conversion to set the indentation and the space between paragraphs You will obtain the same settings for all the paragraphs: You will have space and indentation also where You don't want it.

Last edited by ps67; 07-18-2020 at 12:34 AM.
ps67 is offline   Reply With Quote
Old 07-18-2020, 12:39 AM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,347
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
theres no way for conversion to selectively affect some paras and not others. if you want to simply change text-indent you can use the extra css setting, with

p { text-indent: 1em !important }
kovidgoyal is offline   Reply With Quote
Advert
Old 07-19-2020, 05:05 AM   #6
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: 79,752
Karma: 145864619
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 kovidgoyal View Post
theres no way for conversion to selectively affect some paras and not others. if you want to simply change text-indent you can use the extra css setting, with

p { text-indent: 1em !important }
But the problem is that a lot of eBooks use p without an indent and then they use a class for for p to define p including indents. So when there are other classes that are used with p such as one that has a center, sometimes they have no defined indent of 0 and if you do add an indent to p, you then take these classes that should have no indent and add an indent to them. If you are going to add an indent to p, you have to make sure all the classes that should have an indent of 0 have one.

Last edited by JSWolf; 07-19-2020 at 05:14 AM.
JSWolf is offline   Reply With Quote
Old 08-01-2020, 03:55 AM   #7
deback
Book E d i t o r
deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.
 
Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
Here's what I do to change all indents to 1.2em:

Under Common Options, Look & Feel, Transform Styles:

Click the Add Rule button.
In the first box, type: text-indent
In the first drop-down box, choose: Is greater than
In the second box, type: .01em
In the second drop-down box, choose: Change the value to
In the third box, type: 1.2em. (You would want to enter .9em, but 1.2em is the most common text-indent.)
Click Save.

To remove spacing between paragraphs, I have many paragraph classes listed under Styling that change all margins to zero. I've edited thousands of books, so for a while, I added various class names to the Styling section (as I came to them), and since then, I've rarely had to manually edit the CSS to fix the spacing between paragraphs.

Example:

.text {
margin-top: 0;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
text-align: justify;
}

You can uncheck "remove spacing between paragraphs" and then manually edit the appropriate classes in the CSS file to fix the spacing between paragraphs, if you don't want to add the various paragraph classes to the Styling section.
deback is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Paragraph Spacing Issue Similar to Phyllis rosshalde Sigil 30 10-25-2014 02:13 AM
Paragraph Spacing/Page Break Issue Flux84 Conversion 0 04-02-2014 08:17 AM
How do I set paragraph indent? pargoo Sigil 17 11-09-2013 06:38 PM
Selective paragraph indent Leonatus Writer2ePub 8 10-31-2013 04:22 PM
Preference: Paragraph indent or a little paragraph spacing? 1611mac General Discussions 48 11-11-2011 12:43 AM


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


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