View Single Post
Old 07-26-2023, 02:07 PM   #23
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,183
Karma: 105212035
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Quote:
Originally Posted by SillyStegosaurus View Post
But, does Calibre remove in-line styles automatically?
I don't think so.
You can create CSS and then use regex to replace the stupid inline styles with the more sensible css Classes.

I suspect this is an old title perhaps made using some mad HTML3 software and a source MS Word with no use of paragraph styles.

Adding spaces won't work. The margins are wrong.

Edit
Replace margin:0.00% 0.00%; globally with nothing, in Sigil or Calibre as that makes no sense.

Replace style=" font-size:1.0rem" with nothing or all .0rem with .0em
Ebooks should never use rem
margins should never be 0.00%, or % at all. They are 0, or a number of em or at worst pt (1em = 12pt)
I'd only ever use % for an image width or an image height, with the other axis as auto. Nothing else should be auto.

azw3 and epub are a subset of HTML5.
Styles shouldn't exist, only CSS class names: Fivre line verse:
<p class="first-line">first line of verse</p>
<p class="verse-body">line of verse</p>
<p class="verse-body">line of verse</p>
<p class="verse-body">line of verse</p>
<p class="last-line">last line of verse</p>

Then the CSS sets top, left, right, bottom margins, text-align, font stuff

Edit
There are loads of ways to do it.

Last edited by Quoth; 07-26-2023 at 02:38 PM.
Quoth is offline   Reply With Quote