10-26-2016, 05:22 PM | #1 |
Enthusiast
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 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. |
10-26-2016, 07:51 PM | #2 |
Wizard
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. |
10-26-2016, 08:13 PM | #3 |
Well trained by Cats
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;} |
10-26-2016, 11:15 PM | #4 | |
Enthusiast
Posts: 40
Karma: 1010
Join Date: Jun 2016
Device: Kobo Glo HD, Kobo Aura One
|
Quote:
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? |
|
10-27-2016, 12:00 PM | #5 |
Enthusiast
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. |
10-28-2016, 06:24 AM | #6 |
Guru
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 |
10-28-2016, 12:18 PM | #7 | |
Enthusiast
Posts: 40
Karma: 1010
Join Date: Jun 2016
Device: Kobo Glo HD, Kobo Aura One
|
Quote:
|
|
05-23-2019, 05:44 PM | #8 | |
Connoisseur
Posts: 61
Karma: 99068
Join Date: Nov 2017
Device: N/A
|
Quote:
|
|
05-23-2019, 08:43 PM | #9 |
Addict
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! |
05-23-2019, 08:49 PM | #10 |
Wizard
Posts: 1,086
Karma: 6719822
Join Date: Jul 2012
Device: Palm Pilot M105
|
|
05-24-2019, 11:50 AM | #11 |
Addict
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.
|
|
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 |