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 01-31-2025, 06:28 AM   #1
Ianos
Junior Member
Ianos began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2024
Device: kindle paperwhite 11
How to add a blank lines for a new paragraph in a chapter

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!
Ianos is offline   Reply With Quote
Old 01-31-2025, 06:44 AM   #2
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,016
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Edit class "GT-1LZ_before ParaOverride-11" to have a suitable top margin, say
margin-top: 1em;
OR
Edit the class of the item before the first paragraph
margin-bottom: 1em;

eBooks should never have actual blank lines, just the appearance of one. Change 1em to any number you prefer. Also for most ereaders 12pt = 1em if font sizes are in pt.
Quoth is offline   Reply With Quote
Advert
Old 01-31-2025, 07:19 AM   #3
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: 79,745
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
You should be converting your ePub to KF8 as that will look better and Mobi is obsolete. Plus with KF8, you can use your choice of font to read with and adjust the weight as needed.
JSWolf is offline   Reply With Quote
Old 01-31-2025, 10:07 AM   #4
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: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Old Mobi did not have a CSS.
AZW3 (KF8) does.
You have a device made after the Kindle3, so why use a boat anchor of a format?
theducks is offline   Reply With Quote
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: 79,745
Karma: 145864619
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
Advert
Old 01-31-2025, 12:02 PM   #6
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,016
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Quote:
Originally Posted by theducks View Post
Old Mobi did not have a CSS.
AZW3 (KF8) does.
You have a device made after the Kindle3, so why use a boat anchor of a format?
Only the K1, K2, DX and DXG HAVE to use mobi (KF7, sometimes an azw ending without a digit). It's terrible as it's HTML 3 with no CSS and some custom extensions.

As theducks says, use KF8 / azw3.

If an older Kindle other than those has no "Publisher" option on Fonts Aa, then it hasn't got the backported Firmware updates:
https://www.amazon.com/gp/help/custo...MQC26VQQMM8XSW

First hit with DuckDuckGo Kindle Firmware Updates.
Quoth is offline   Reply With Quote
Old 03-10-2025, 09:25 AM   #7
Ianos
Junior Member
Ianos began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2024
Device: kindle paperwhite 11
Thanks a lot for your help! I will use azw3 now!
Ianos is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reduce paragraph breaks from 3 lines to 1. ChopperRated Calibre 3 06-22-2021 08:00 PM
How do I remove two blank lines after a paragraph? arast Editor 21 01-12-2018 02:46 PM
Add blank lines between paragraphs. bn_el KOReader 5 11-02-2017 11:14 AM
Help with Chapter seperators (lines underneath chapter headings) indieauthor83 Sigil 9 06-23-2017 06:01 AM
Add blank line between two lines coolpixel Sigil 1 11-08-2014 02:13 PM


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


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