View Single Post
Old 06-20-2022, 03:21 PM   #21
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,163
Karma: 105212035
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Quote:
Originally Posted by JSWolf View Post
Thing is, most eBooks that I've seen the code for use <p> for chapter headers. So how would you suggest you override the font size for <p> if you want to override for the body text but you are also overriding the header text size. It doesn't work well for an override.
I got an ebook from Amazon by a big publisher and it had NO <p> or <hn> tags at all! Every paragraph and heading was a <div> with a suitable CSS.
So I used Calibre Editor with "Plugins -> Edit Span and Div" to replace preserving class to either <h2 class="cs"> or <p class="bs"> and then global edit to replace the first <p class="bs"> after an </h2> with <p class="no-indent">, created by copying bs and changing text-indent: 0

I only opened it for edit because the line-height was fixed and stupid, so I simply deleted ALL line-height settings in the style file (CSS classes).

My automatically converted by Calibre from docx exported by Save As from Libra Office Writer are consistently better than ebooks by big publishers. I do have to edit css classes for any images (I don't usually have many) to either an absolute pixels high or a percent width depend what they are for as the Styles for images don't map well. All the text paragraph styles / headings etc map perfectly to CSS classes.

Last edited by Quoth; 06-20-2022 at 03:25 PM.
Quoth is offline   Reply With Quote