View Single Post
Old 01-31-2025, 10:15 AM   #5
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: 80,009
Karma: 147977995
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 Ianos View Post
I regularly convert from ePub to mobi for my Kindle Paperwhite and usually the formatting looks good.

Now I have a book here where a new paragraph in a chapter is formatted with the class <p class="GT-1LZ_vor ParaOverride-11">Text (...)</p>. In the eBook, a blank line should actually appear so that the reader understands that something new is starting. In HTML and mobi, however, no blank line is displayed.

The structure of the HTML looks like this:

Code:
<p class="GT">Text (...)</p>
<p class="GT">Text (...)</p>
<p class="GT">Text (...)</p>
      <p class="GT-1LZ_vor ParaOverride-11">New paragraph (...)</p> 
<p class="GT">Text (...)</p>
<p class="GT">Text (...)</p>
<p class="GT">Text (...)</p>
Two questions:

1. How can I modify the CSS so that an empty line is output before the class "GT-1LZ_before ParaOverride-11"?

2. I have done a few spot checks and it looks as if separate CSS classes are used for each book or series. Is that the case? How does Calibre translate all these classes in a meaningful way? If the answer is already available somewhere, a link would suffice.

Many thanks in advance!
Instead of using a blank space for a section break, you are best to use something visible to show the break. I use a 20% long 2px centered line for the section break.

HTML
Code:
<hr/>
<p>
CSS
Code:
p {
  margin-top: 0;
  margin-bottom: 0;
  widows: 1;
  orphans: 1;
  text-indent: 1.2em;
}
hr {
  margin-top: 0.9em;
  margin-right: 40%;
  margin-bottom: 0.9em;
  margin-left: 40%;
  border-top: 2px solid;
}
hr + p {
  text-indent: 0;
}
JSWolf is offline   Reply With Quote