Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 05-23-2020, 04:34 AM   #1
franklekens
Addict
franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.
 
franklekens's Avatar
 
Posts: 286
Karma: 659674
Join Date: Sep 2009
Device: Kobo Forma, Kobo Aura ONE, Kindle Oasis 2, Kindle Keyboard
how to edit this book?

I bought Olivia Manning's The Balkan Trilogy at Kobo. However, something seems to be wrong with the lay-out of the book. Every now and then a chunk of text is randomly displayed in a bigger font, like in the screenshot.

I've found that this occurs after page identifiers, like <a id="page_6"/>: see the other screenshot. The weird thing: Manning's Levant Trilogy, from the same publisher, also has these page identifier codes, but doesn't display this problem.

Calibre displays the text just fine, but my Kobo Forma insists on giving all text after the page identifier in a bigger font. (It doesn't matter whether I use Bookerly, like in the screenshot, or the Publisher default font.)

Does anybody know what it is in the css (or elsewhere?) that causes this, and how to fix it?

I've already tried comparing the css of the Balkan Trilogy with that of the Levant Trilogy, to see if a file comparer could quickly spot the fatal difference. But they're so wildly different that it's no use. And I know too little about html, css and epub &c to really know what to look for.

I'll add the css file here.

Thanks.
Attached Thumbnails
Click image for larger version

Name:	balkan trilogy screenshot.jpg
Views:	51
Size:	263.6 KB
ID:	179436   Click image for larger version

Name:	balkan trilogy html screenshot.jpg
Views:	50
Size:	107.7 KB
ID:	179437  
Attached Files
File Type: txt css balkan.txt (36.0 KB, 35 views)
franklekens is offline   Reply With Quote
Old 05-23-2020, 05:26 AM   #2
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 2,792
Karma: 5333506
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
what a hideous overcomplicated css

by far the quickest fix is to regex out all the <a... page Id...> stuff. book will work fine without it
the code i use in Sigil - which removes all <a > entries - is find
</?a ?([^>]+)?>
replace all with nothing

my alternative lazy option would be an epub to epub conversion in calibre which hopefully will tidy up the mess and either fix it, or make it more fixable
stumped is offline   Reply With Quote
Old 05-23-2020, 05:28 AM   #3
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: 25,051
Karma: 34462661
Join Date: Aug 2009
Location: The Central Coast of California
Device: K4NT(Fixed,New Bat.), Galaxy Tab A, Kobo Aura2
Gah! what a cluttered CSS.
You failed to include the piece that set the style for the large paragraph
(the <a tag bit is a red herring in this case)

1) Clean it of unused selectors using the tool in the Editor. It makes things easier to read.

2) (IMHO) the excessive use of font-size: small. Blow that away, (your 'large' is really a 'Normal'. The rest has been forced Small.

Any Body font should be the device default (AKA Normal. I rarely set font-size any place other than when needed to be other than 1em/normal)
theducks is offline   Reply With Quote
Old 05-23-2020, 06:10 AM   #4
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 2,792
Karma: 5333506
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
red herring or not, i bet that removing the <a > stuff fixes it
its exposing a glitch/bug in the kobo renderer , because other renderers e.g. calibre viewer are apparently Ok
the <a is somehow triggering a font change e.g. from small to normal. but its not reverting back as it should after the tag close
a class statement for the para is shown - bodytext - but there could be other inheritance rules involved. its arguably worst CSS file I have ever seen
e.g. the <a... having no inserted class of its own , may take on the overall body style
bodytext includes font-size: small ,
but body does not

it's unclear because <a ... > does not introduce any rendered text
.

Last edited by stumped; 05-23-2020 at 06:17 AM.
stumped is offline   Reply With Quote
Old 05-23-2020, 03:27 PM   #5
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 7,453
Karma: 32971131
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Forma, Clara HD, Nexus 7 HD, iPad Pro, Tolino epos
Why does the CSS have an embedded font for CharisSILR and then sets the font-family for almost every class to Times New Roman, serif?

I suspect it won't matter what font you select. Unless you have Times New Roman on your Kobo, the serif is going to force the default serif font which is unlikely to be Bookerly. The exception would be if you are looking at text inside a <span class="font">blahblahblah</span> which should use CharisSILR.

I did a bit of quick cleanup on the CSS and have attached it to this message.
Attached Files
File Type: txt css balkan.txt (28.1 KB, 11 views)
DNSB is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Edit book/Check book/Parsing failed: Inconsistencies in counting chaot Editor 4 06-02-2016 11:20 AM
How do you Edit a Book bookaho!ic Calibre 2 05-31-2016 08:11 PM
Edit book: Inconsistencies in Check Book chaot Editor 1 05-18-2016 11:16 PM
Calibre:Book Cover size in Book Details side pane & Edit Metadata Individually window Volfer Calibre 3 01-05-2016 01:56 PM
Default Edit Book Edit Window Font? lhuxley Editor 2 03-26-2015 11:11 PM


All times are GMT -4. The time now is 03:41 PM.


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