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 04-05-2026, 11:56 PM   #16
Jaws
JCL Punch-Card Collector
Jaws is out to avenge the death of his or her father, Domingo Montoya.Jaws is out to avenge the death of his or her father, Domingo Montoya.Jaws is out to avenge the death of his or her father, Domingo Montoya.Jaws is out to avenge the death of his or her father, Domingo Montoya.Jaws is out to avenge the death of his or her father, Domingo Montoya.Jaws is out to avenge the death of his or her father, Domingo Montoya.Jaws is out to avenge the death of his or her father, Domingo Montoya.Jaws is out to avenge the death of his or her father, Domingo Montoya.Jaws is out to avenge the death of his or her father, Domingo Montoya.Jaws is out to avenge the death of his or her father, Domingo Montoya.Jaws is out to avenge the death of his or her father, Domingo Montoya.
 
Posts: 99
Karma: 34468
Join Date: Jun 2014
Location: Antarctica
Device: Aggressively Device Independent
I don't entire agree with this solution, primarily because "additive css" (the "h2 + p" on the first line) just doesn't work when there are possibly tables, or possibly graphics (whether glyphs or full-on graphics), or an epigraph, at the beginning of the file. It works for plain text, but a fair proportion of books that one thinks of as "plain text" begin chapters (or sections, if the h2 is used for section headings within chapters) that have elements like this.

I prefer instead to designate a new style in the stylesheet:

Code:
.noindent {
  [the rest of the default paragraph code]
  margin-top: 1em;
  text-indent: 0;
  }
and set that search-and-replace up either in normal mode:

Code:
</h2>
<p class="calibre1">
[replace with]
</h2>
<p class="noindent">
or, as necessary, just search for the </h2> and manually change the next <p> class to "noindent" if there are elements between the heading and the first actual paragraph of text. It's rare enough to have a book with an excessive number of true chapters that this works for me… and books with 100+ chapters always have other problems that need manual attention! (And even a 100-chapter book can be done in under 3 minutes manually.)

My real point is that there's more than one way to do this, and sometimes a simple search-and-replace-with-nothing is less preferable.
Jaws is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre conversion is not using my command ryder ePub 1 03-29-2026 01:58 PM
Command line after conversion Tominator Conversion 7 07-18-2019 11:34 PM
Get Conversion Settings Command BetterRed Conversion 0 11-02-2012 11:44 PM
Command Line Conversion loo23 Conversion 3 04-07-2012 03:33 PM
Calibre Command Line Conversion bmwr1200c Calibre 1 08-10-2011 07:04 PM


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


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