View Single Post
Old 07-19-2025, 11:53 PM   #9
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,589
Karma: 14328510
Join Date: Nov 2019
Device: none
I get those occasionally. I have an involved song and dance for how I convert a Kindle book to epub. Part of the work is done when Calibre converts it. The final/second step is opening it in Sigil and taking a big sledgehammer to its CSS with the following regexp which replaces these with nothing:
Code:
(  display: block;
|  font-size: .*
|  letter-spacing:.*
|  line-break: strict;
|  line-height: .*
| page-break-after:.*
| page-break-before:.*
| page-break-inside:.*
|  vertical-align: .*
|  white-space: pre-wrap;
)
If I see it using divs for paragraphs I use Diap's gizmo to convert all divs that are using the class it's using to ps.

This often messes up the chapter titles making them the same size as the paragraph text because many if not most ebooks use the p tag instead of the h tags for chapter titles (another unforgivable sin).

Edit: I should fix the above regexp and instead of having a space after the colon use a regexp for 0 or more spaces. I'm guessing that calibre's conversion is always putting a space after the colon.

Last edited by hobnail; 07-20-2025 at 12:00 AM.
hobnail is offline   Reply With Quote