Thread: Text Indent
View Single Post
Old 11-07-2014, 04:01 AM   #9
Phssthpok
Age improves with wine.
Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.
 
Posts: 583
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
I used to convert to RTF and fiddle about, but as I've got more used to Calibre I now do it all with the EPUB editor:

* joining split paras: the second para of the split generally starts with a lower-case letter, so use use find-and-replace for All Text Files, Regex mode, Case sensitive, Wrap, Dot all and use the following RE: replace "</p>\s*<p[^>]+>([a-z])" by " \1" (that's "space backslash one")

* indenting paras: click on a word in a para of the same style as you want to indent, look at the Live CSS panel (open from View menu if necessary) to find the CSS style name and edit the corresponding entry in the CSS stylesheet to use styles like "text-indent: 1.5em; margin: 0;" or similar

* make the first para in a chapter unindented by copying the basic style (e.g. calibre2 to calibre2a) and replace the original "text-indent: 1.5em; margin: 0;" by "text-indent: 0; margin: 1em 0 0;". Now change every para after </h2> to calibre2a using an RE like "</h2>\s*<p class="calibre2">" and replace with "</h2>\s*<p class="calibre2a">"

There are *so* many things you can do with a well-chosen RE! Test them first with "Find" and then "Replace" before hitting "Replace all", but if necessary you can revert a "replace all" from the Edit menu.

HTH!
Phssthpok is offline   Reply With Quote