View Single Post
Old 04-01-2025, 04:58 PM   #105
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: 80,014
Karma: 147977995
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by .tycho View Post
Is there a way to download the latest commit as a compiled binary for macOS? I couldn't find one, so I cloned the repo using git and ran "calibre-debug -g", which showed the version as "8.1.1*", which I'm pretty sure tells me I'm running the latest commit.

I sent a KEPUB to my Kobo, checked how it looks, and what do I see? Hyphens at the end of lines!!

I opened a chapter to view the code, and here's what I now see:
Code:
    <style type="text/css" id="kobostylehacks">div#book-inner { margin-top: 0; margin-bottom: 0; }</style>
    <style type="text/css" id="kepubify-extra-css">
* {
    /* Vendor-prefixed CSS properties for hyphenation. Keep -webkit first since
     * some user agents also recognize -webkit properties and will apply them.
     */
    -webkit-hyphens: auto;
    -webkit-hyphenate-limit-after: 5;
    -webkit-hyphenate-limit-before: 3;
    -webkit-hyphenate-limit-chars: 8 3 5;
    -webkit-hyphenate-limit-lines: 2;

    /* CSS4 standard properties for hyphenation. If a property isn't represented
     * in the standard, don't put a vendor-prefixed property for it above.
     */
    hyphens: auto;
    hyphenate-limit-chars: 8 3 5;
    hyphenate-limit-lines: 2;
    hyphenate-limit-last: page;
}

h1, h2, h3, h4, h5, h6, td {
    -webkit-hyphens: none !important;
    hyphens: none !important;
}
</style>
So I think you fixed it!! It looks like adding the hyphenation under 'kepubify-extra-css' was the trick.

Thank you so much, Kovid!! Sorry to be such a bother, now I shall return to reading Dan Moren's The Nova Incident...
@kovidgoyal would it be possible to please put the hyphenation code into it's own CSS (aka hyphenation.css) so we don't have all of that code bloat? Thanks.
JSWolf is offline   Reply With Quote