Register Guidelines E-Books Today's Posts Search

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: 398
Karma: 3421956
Join Date: Sep 2009
Device: various Kobo's, Onyx Note2, Pocketbook 360, 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:	229
Size:	263.6 KB
ID:	179436   Click image for larger version

Name:	balkan trilogy html screenshot.jpg
Views:	225
Size:	107.7 KB
ID:	179437  
Attached Files
File Type: txt css balkan.txt (36.0 KB, 207 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: 3,305
Karma: 10259306
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
Advert
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: 31,012
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
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: 3,305
Karma: 10259306
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: 45,894
Karma: 168959602
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, 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, 176 views)
DNSB is offline   Reply With Quote
Advert
Old 05-30-2020, 05:32 AM   #6
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: 398
Karma: 3421956
Join Date: Sep 2009
Device: various Kobo's, Onyx Note2, Pocketbook 360, Kindle Keyboard
Everybody thanks for their help. I replaced the css by David's version, *and* I replaced the page identifiers with the search and replace (thanks for helping out with the regular expressions), because even though the css solved the font problem, the Kobo reader now insisted on interpreting those as a paragraph break.

But now all is well, more or less, and I've had some valuable first experience editing an epub.
franklekens is offline   Reply With Quote
Old 05-30-2020, 06:53 AM   #7
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,657
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
@franklekens, load this eBook into the Calibre editor. Then go to Tools > Remove unused CSS Rules. Please repost the CSS again once done. This gets rid of all those extra CSS classes you find in most CSS from mainstream publishers. I'd like to see the CSS from there. Thanks.
JSWolf is offline   Reply With Quote
Reply


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 12:50 AM.


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