Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 10-26-2016, 05:22 PM   #1
Griu
Enthusiast
Griu can extract oil from cheeseGriu can extract oil from cheeseGriu can extract oil from cheeseGriu can extract oil from cheeseGriu can extract oil from cheeseGriu can extract oil from cheeseGriu can extract oil from cheeseGriu can extract oil from cheese
 
Posts: 40
Karma: 1010
Join Date: Jun 2016
Device: Kobo Glo HD, Kobo Aura One
Modify indent size just on indented paragraphs

Hi,

I've been trying to solve this issue for a while but I can't find the solution.

I know how to change the paragraphs' indent size converting the books.

My problem is that usually the first paragraph on the books' chapter is not indented. I would like to set up the size of the indent without indenting the paragraphs that were not.

Is there a way to do this?


Example:

Original:
This is the first paragraph
This is the second paragraph
After conversion:
This is the first paragraph.
This is the second paragraph.
How I want it:
This is the first paragraph.
This is the second paragraph.

Thanks in advance.

Last edited by Griu; 10-26-2016 at 11:11 PM.
Griu is offline   Reply With Quote
Old 10-26-2016, 07:51 PM   #2
dwig
Wizard
dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.
 
dwig's Avatar
 
Posts: 1,613
Karma: 6718479
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Surface Go & Kindle 3 - Retired: DellV8p, Clie UX50, ...
You need to edit your original post. HTML display will ignore leading spaces. Replace the spaces that illustrate the indents with underscores or some similar character.

How you would do these edits depends largely on the book's format and how well it was built. If it is EPUB or AZW3 then you should be able to open it in Calibre's Editor and alter the appropriate Style. You need to look at the HTML/xHTML code to find how the styles are applied to the type classes of paragraphs and then find the Style, either in the xHTML's Head section or in a separate CSS Stylesheet, and change the text-indent. Well built EPUBs and AZW3s will have the Styles in a separate stylesheet.

If the ebook is not one of those two formats you may need to convert it to EPUB, or AZW3, edit the conversion, and then convert back to your desired format.
dwig is offline   Reply With Quote
Old 10-26-2016, 08:13 PM   #3
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,803
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
For posting You can use the indent tool , next to the globe on the advanced mode message editor.
this is normal
this is indented
Code:
p + p {text-indent:1.5em;}
This assumes the the first P follows something other than a P (h#,div)
theducks is offline   Reply With Quote
Old 10-26-2016, 11:15 PM   #4
Griu
Enthusiast
Griu can extract oil from cheeseGriu can extract oil from cheeseGriu can extract oil from cheeseGriu can extract oil from cheeseGriu can extract oil from cheeseGriu can extract oil from cheeseGriu can extract oil from cheeseGriu can extract oil from cheese
 
Posts: 40
Karma: 1010
Join Date: Jun 2016
Device: Kobo Glo HD, Kobo Aura One
Quote:
Originally Posted by dwig View Post
You need to edit your original post. HTML display will ignore leading spaces. Replace the spaces that illustrate the indents with underscores or some similar character.

How you would do these edits depends largely on the book's format and how well it was built. If it is EPUB or AZW3 then you should be able to open it in Calibre's Editor and alter the appropriate Style. You need to look at the HTML/xHTML code to find how the styles are applied to the type classes of paragraphs and then find the Style, either in the xHTML's Head section or in a separate CSS Stylesheet, and change the text-indent. Well built EPUBs and AZW3s will have the Styles in a separate stylesheet.

If the ebook is not one of those two formats you may need to convert it to EPUB, or AZW3, edit the conversion, and then convert back to your desired format.
Thanks. I modified it.

I've been converting the files and replacing the class on those paragraphs for "non-indent" or "first" but that doesn't work on all the books, and it's a really long work.

Besides, some paragraphs inside the chapters sometimes are not indented as well, and it's really hard to find them.

I was wondering if there's a way to do this automatically, since the original file has some non indented pragraphs. Does calibre need to indent everything?
Griu is offline   Reply With Quote
Old 10-27-2016, 12:00 PM   #5
Griu
Enthusiast
Griu can extract oil from cheeseGriu can extract oil from cheeseGriu can extract oil from cheeseGriu can extract oil from cheeseGriu can extract oil from cheeseGriu can extract oil from cheeseGriu can extract oil from cheeseGriu can extract oil from cheese
 
Posts: 40
Karma: 1010
Join Date: Jun 2016
Device: Kobo Glo HD, Kobo Aura One
I found the way to do it.

I just modified the class in the stylesheet.css on the original file for the regular text

In this case calibre17 is the class for the indented paragraphs, I modified text-indent to 1em

.calibre17 {
border-bottom: currentColor none 0;
border-top: currentColor none 0;
display: block;
padding-bottom: 0;
padding-top: 0;
text-align: justify;
text-indent: 1em;
margin: 0.5em 0
}

Thanks anyway.
Griu is offline   Reply With Quote
Old 10-28-2016, 06:24 AM   #6
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 856
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Allow me to introduce to you the wonderful feature that Kovid introduced a few months ago, in response to a feature request I made:

Introducing Transform Styles...

This feature, found in the common options for conversion options has a tab called Transform Styles.

At the end (I think?) of the conversion, calibre will apply any rules set here to alter the CSS in the converted ebook.

See the attached screenshot for some examples of things you can do with this option.

Note, if you save a set of rules, you can also use them in the ebook editor for ebooks already in the desired format (epub or azw3
Attached Thumbnails
Click image for larger version

Name:	TransformStyles.png
Views:	603
Size:	49.7 KB
ID:	152633  
sherman is offline   Reply With Quote
Old 10-28-2016, 12:18 PM   #7
Griu
Enthusiast
Griu can extract oil from cheeseGriu can extract oil from cheeseGriu can extract oil from cheeseGriu can extract oil from cheeseGriu can extract oil from cheeseGriu can extract oil from cheeseGriu can extract oil from cheeseGriu can extract oil from cheese
 
Posts: 40
Karma: 1010
Join Date: Jun 2016
Device: Kobo Glo HD, Kobo Aura One
Quote:
Originally Posted by sherman View Post
Allow me to introduce to you the wonderful feature that Kovid introduced a few months ago, in response to a feature request I made:

Introducing Transform Styles...

This feature, found in the common options for conversion options has a tab called Transform Styles.

At the end (I think?) of the conversion, calibre will apply any rules set here to alter the CSS in the converted ebook.

See the attached screenshot for some examples of things you can do with this option.

Note, if you save a set of rules, you can also use them in the ebook editor for ebooks already in the desired format (epub or azw3
Thanks. Exactly what I was looking for.
Griu is offline   Reply With Quote
Old 05-23-2019, 05:44 PM   #8
bob.f
Connoisseur
bob.f has a thesaurus and is not afraid to use it!bob.f has a thesaurus and is not afraid to use it!bob.f has a thesaurus and is not afraid to use it!bob.f has a thesaurus and is not afraid to use it!bob.f has a thesaurus and is not afraid to use it!bob.f has a thesaurus and is not afraid to use it!bob.f has a thesaurus and is not afraid to use it!bob.f has a thesaurus and is not afraid to use it!bob.f has a thesaurus and is not afraid to use it!bob.f has a thesaurus and is not afraid to use it!bob.f has a thesaurus and is not afraid to use it!
 
Posts: 61
Karma: 99068
Join Date: Nov 2017
Device: N/A
Quote:
Originally Posted by sherman View Post
Allow me to introduce to you the wonderful feature that Kovid introduced a few months ago, in response to a feature request I made:

Introducing Transform Styles...

This feature, found in the common options for conversion options has a tab called Transform Styles.

At the end (I think?) of the conversion, calibre will apply any rules set here to alter the CSS in the converted ebook.

See the attached screenshot for some examples of things you can do with this option.

Note, if you save a set of rules, you can also use them in the ebook editor for ebooks already in the desired format (epub or azw3
I think I love Kovid. I have over 100 books with an insane amount of text indentation and this feature is the bomb.
bob.f is offline   Reply With Quote
Old 05-23-2019, 08:43 PM   #9
retiredbiker
Addict
retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.
 
retiredbiker's Avatar
 
Posts: 387
Karma: 1638210
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Jutoh, Kobo Forma
Excellent tool, I had not noticed it before. But I can't seem to get it to work

When I try the test, I get nothing, and the values I type in like 1.5, have the 1 in red and the .5 in green, which looks fishy. Can someone give me a pointer?

Thanks!
Attached Thumbnails
Click image for larger version

Name:	rulestest.jpg
Views:	154
Size:	193.0 KB
ID:	171592  
retiredbiker is offline   Reply With Quote
Old 05-23-2019, 08:49 PM   #10
lumpynose
Wizard
lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.
 
Posts: 1,086
Karma: 6719822
Join Date: Jul 2012
Device: Palm Pilot M105
Click image for larger version

Name:	Capture.PNG
Views:	155
Size:	22.4 KB
ID:	171593
lumpynose is offline   Reply With Quote
Old 05-24-2019, 11:50 AM   #11
retiredbiker
Addict
retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.
 
retiredbiker's Avatar
 
Posts: 387
Karma: 1638210
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Jutoh, Kobo Forma
Well, I can't get the test to work no matter what I put in, but the tool actually does the job, at least in the editor. But I've got about 100 saved searches that are very specifically tuned to my work. I'll play with this...maybe find something that could cut down on the number of searches I run.
retiredbiker is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing indent for individual paragraphs Alda ePub 3 07-15-2013 11:42 AM
Paragraphs are indented in Aldiko jhsrennie Conversion 6 10-12-2011 01:43 PM
Paragraph indent-size should not applied to centered paragraphs? ShellShock Calibre 3 01-16-2010 11:54 AM
Paragraphs and indent mrmikel Calibre 33 01-10-2009 05:37 PM
Plucker: Can I indent paragraphs? alexdouglas Reading and Management 3 08-07-2006 05:58 PM


All times are GMT -4. The time now is 02:46 AM.


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