|
|
#16 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 605
Karma: 641742
Join Date: Mar 2012
Location: DE
Device: Kobo Glo
|
Anwer by Deepseek:
Rule 1 — Turn hyphenation ON everywhere
Rule 2 — Turn hyphenation OFF for headings and table cells This overrides the universal rule for a specific set of elements:
Why this pattern is common in EPUBs EPUB renderers are essentially mini web browsers, so standard CSS applies. Hyphenation is one of the few typographic features that meaningfully improves readability on the small screens typical of e-readers and phones — but only for body prose. Applying it globally and then explicitly excluding headings and tables is a compact, robust way to get the best of both worlds: Element Hyphenation Reason Body text ✅ on Reduces ragged edges / word gaps in justified text Headings ❌ off Short text, visual clarity Table cells ❌ off Preserves column alignment and readability Minor style notes type="text/css" is deprecated in HTML5 and unnecessary in modern XHTML, but it's still widely used in EPUB 2 files for compatibility with older reading systems. EPUB 3 files can drop it. Splitting the CSS across two <style> blocks is unnecessary — it could be a single block — but it's harmless and often results from how a tool generated the file. |
|
|
|
|
|
#17 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,766
Karma: 154365285
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Since my Kobo is not the best to test this due to config settings and patches, would hyphenation work in KePub if the code to turn it on was put in the CSS once instead of in each of the HTML files? If the answer is yes, I would prefer the code in CSS not in HTML.
|
|
|
|
|
|
#18 | |
|
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 55,965
Karma: 182837452
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
You can add this into a CSS file instead of a style block in a XHTML files but check the positioning. Cascading style sheets are position sensitive hence the !importants. Last edited by DNSB; 10-22-2026 at 06:09 PM. |
|
|
|
|
|
|
#19 | ||
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 294
Karma: 364036
Join Date: Jul 2026
Location: Planet Earth
Device: Kobo Forma
|
Quote:
So the Kobo reads the rule from a CSS file just as it does from a style element. Why kepubverto still writes it into each chapter: a separate file means adding a file to the book, listing it in the OPF and linking it from every chapter. kepubverto does not touch the OPF, and the style element at the end of the head is always the last rule in the cascade, so the result does not depend on where the book's own stylesheets are linked. On the device the two give the same result. If you prefer the rule in the book's CSS, you can add it there yourself before converting and leave --hyphens off; kepubverto keeps your CSS as it is. Quote:
One correction to the explanation in #16: hyphenation on the Kobo does not need lang on the html element. On my Kobo, a Turkish book whose language was declared only in the OPF was hyphenated by Turkish rules. Since my last post, kepubverto 0.3.0 is out. It adds --css, which puts your own CSS into every converted chapter, after kepubverto's rules. It refuses CSS that refers to a file, has @font-face, or would make epubveri report a problem in the book, and says why. The web page has the same option as an Extra CSS box: https://veripublica.github.io/kepubverto/ https://github.com/veripublica/kepub...ses/tag/v0.3.0 https://crates.io/crates/kepubverto https://www.npmjs.com/package/@verip...epubverto-wasm |
||
|
|
|
|
|
#20 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,766
Karma: 154365285
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Can you make it an option to have the hyphenation code in the CSS or the HTML? I really dislike every HTML getting the same code when it can be done once in CSS.
I've not seem hyphens manual that I can recall. I have seen code to disable hyphenation. I don't see any reason not to add the hyphenation code to the CSS. But if it's an option, everybody will be happy. |
|
|
|
|
|
#21 | |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 294
Karma: 364036
Join Date: Jul 2026
Location: Planet Earth
Device: Kobo Forma
|
kepubverto now has a calibre plugin. It converts the EPUBs in your calibre library and adds the KEPUB to each book beside its EPUB, which it leaves unchanged. It hands kepubverto the EPUB exactly as it is stored, so the book never goes through calibre's own conversion. It has its own thread in the Plugins forum, with the download: https://www.mobileread.com/forums/sh...d.php?t=375915
Questions about the plugin (installing, the menu, the report, the settings) belong there. Questions about the conversion itself, what kepubverto does to a book, stay here. Quote:
Today, when hyphenation is turned on, kepubverto writes the rule into every chapter. It never changes the book's CSS files. The calibre plugin does not change that. Its Hyphenation setting (as the book says, on, off) is the same as --hyphens: it decides whether the book is hyphenated, not where the rule goes. With "on", the rule is still written into every chapter. Putting the rule in a CSS file instead means one of two things: changing one of the book's own CSS files, or adding a new CSS file to the book. Both need care. A book can have several CSS files, and different chapters can use different ones. I want to be sure the book stays valid before I offer it as an option, so I am not promising it yet. Until then, you can already get what you want: add the rule to the book's CSS yourself, and convert with hyphenation left as the book says (no --hyphens). kepubverto keeps your CSS exactly as it is, and the test in #19 showed that the Kobo reads the rule from a CSS file. https://github.com/veripublica/calib...ubverto-v0.1.0 https://github.com/veripublica/kepub...ses/tag/v0.3.0 https://crates.io/crates/kepubverto https://www.npmjs.com/package/@verip...epubverto-wasm |
|
|
|
|
|
|
#22 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,766
Karma: 154365285
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
delete post
Last edited by JSWolf; 10-24-2026 at 08:21 PM. |
|
|
|
|
|
#23 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 294
Karma: 364036
Join Date: Jul 2026
Location: Planet Earth
Device: Kobo Forma
|
kepubverto 0.4.0 is out. If you don't use --css, nothing changes: on my 562-book test shelf, the converted books are byte for byte the same as before.
If you do use --css, one thing to know: a value its property cannot take is now refused, such as p { font-style: bold } or p { width: 150 }. Nothing is written and your book is not touched, and the message says what was wrong. Before, those values went into the book, where a reader would ignore them. Some CSS that was refused is accepted now. That covers names the specifications define, such as size, and in an EPUB 2 book, CSS2's own names, such as marker-offset. I also moved to zip 9.3.0, which is stricter about how it reads archive files. No book on my shelf that opened before is refused now. If one of yours is, please tell me here. Why this exists, for anyone new: some of my books passed validation and stopped passing once converted to KEPUB. kepubverto adds the markup a Kobo needs and leaves the rest of the book as it was. It's written in Rust so it can be one file with no Java or C, and the same code runs in the browser, in the plugins and as a library. Bug fixes come first, then features one at a time. A Sigil plugin will come when time allows. The calibre plugin has its own thread. You can try it in your browser. Your book stays on your computer, and nothing is uploaded. https://github.com/veripublica/kepub...ses/tag/v0.4.0 https://crates.io/crates/kepubverto https://www.npmjs.com/package/@verip...epubverto-wasm |
|
|
|
|
|
#24 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 294
Karma: 364036
Join Date: Jul 2026
Location: Planet Earth
Device: Kobo Forma
|
kepubverto 0.5.0 is out. It fixes one case where a converted book could fail validation although the original passed. Most books don't have it, and if yours did, the fix is to convert the original EPUB again.
The case: HTML lets an image leave out its alt text when it is alone in a figure with a caption, because the caption describes it. kepubverto wrapped that image in a span, and the span ended the exception, so every such image became an error (RSC-005). A reader found it in a technical book that gained 36 of them, and reported it on GitHub with the smallest example and the versions. Thank you for that. Now the image gets no span. It is still counted, so every other span keeps the same id as before. If you converted such a book with an earlier version, convert the original EPUB, not the KEPUB: kepubverto leaves an already converted chapter as it is. Why my tests missed it: they checked the output with epubveri 0.37.1, which did not look for missing alt text, and EPUBCheck 5.4.0 doesn't either. They now use epubveri 0.40.1, which does, with a test book for this case. On my 562-book test shelf, checked with it, the conversion adds no findings. kepubverto writes a new file and never changes the EPUB you give it. You can try it in your browser. Your book stays on your computer, and nothing is uploaded. https://github.com/veripublica/kepub...ses/tag/v0.5.0 https://crates.io/crates/kepubverto https://www.npmjs.com/package/@verip...epubverto-wasm |
|
|
|
|
|
#25 | |
|
deeply chilled
![]() Posts: 2
Karma: 10
Join Date: Nov 2026
Location: EU
Device: Clara HD / Forma / Libra 2
|
Quote:
I encountered an issue with your web service. After conversion your website reported "16 of 16 content documents converted, 2,434 spans added" and properly renamed mybook.epub to mybook.kepub.epub. However, after adding the converted file to calibre it was not recognised as a kepub file and still showed up as a regular epub. I checked the file using your online validator and received no errors or warnings. Any idea what went wrong here? |
|
|
|
|
|
|
#26 |
|
deeply chilled
![]() Posts: 2
Karma: 10
Join Date: Nov 2026
Location: EU
Device: Clara HD / Forma / Libra 2
|
btw, I got the same result using kepubify.
Only Calibre's own conversion recognised the file as kepub. |
|
|
|
|
|
#27 |
|
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 55,965
Karma: 182837452
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
calibre stores it's conversions to kepub as .kepub and not the double-barrelled .kepub.epub extension used by Kobo's ereaders. For a .kepub.epub, calibre uses the .epub end of the extension to determine the filetype. In theory, calibre could introspect the file to determine if it was actually a kepub or simply a renamed epub but that is more complexity than, IMNSHO, is unneeded. Since most kepub conversions are done on the fly when sending a book to a Kobo ereader, I personally don't keep kepub conversions in my calibre library.
|
|
|
|
|
|
#28 | |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 294
Karma: 364036
Join Date: Jul 2026
Location: Planet Earth
Device: Kobo Forma
|
Quote:
If you want calibre to keep it as a KEPUB, rename it to mybook.kepub before you add it. calibre then lists it as KEPUB, and its Kobo driver puts the .epub back on the name when it sends the book to your Kobo. If your books are in calibre anyway, the kepubverto plugin for calibre skips the round trip: it converts the books you select and adds the result to each book as a KEPUB format. It has its own thread: https://www.mobileread.com/forums/sh...d.php?t=375915 kepubverto 0.5.1 is out as well. On my 562-book test shelf it converts every book byte for byte as 0.5.0 did, so there is no need to convert anything again. The only change is in extra CSS: in an EPUB 3 book it now accepts nested CSS rules, such as p { span { color: red } }, because they are valid CSS there, and it refuses a few values it let through before, with a message that says why. A reader that does not know nesting skips such a rule. https://github.com/veripublica/kepub...ses/tag/v0.5.1 https://crates.io/crates/kepubverto https://www.npmjs.com/package/@verip...epubverto-wasm |
|
|
|
|
|
|
#29 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 294
Karma: 364036
Join Date: Jul 2026
Location: Planet Earth
Device: Kobo Forma
|
kepubverto 0.5.2 is out. It fixes a problem some of you may have seen on a Kobo: a converted book that opens halfway through, with its page count doubled.
It happens when a book's table of contents spells a file name one way and its manifest another, for example Agatha%27nin.html and Agatha'nin.html. Both mean the same file, but a Kobo matches them by the name as written, so it counts the book twice. On my Kobo, a Turkish novel converted by 0.5.1 opened on page 89 of 178. With the names written the same way, which is what 0.5.2 does, it showed the normal page count. kepubify v5 fixed the same problem (kepubify issue #107). 9 of the 562 books on my test shelf had it. 0.5.2 now writes both names the same way, in a valid spelling. Nothing else in the book changes. If a KEPUB of yours has the problem, convert it again: the chapters stay as they are and only the names change. Your original EPUB is not modified; kepubverto always writes a new file. https://github.com/veripublica/kepub...ses/tag/v0.5.2 https://crates.io/crates/kepubverto https://www.npmjs.com/package/@verip...epubverto-wasm |
|
|
|
|
|
#30 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,766
Karma: 154365285
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I don't know if this is the correct place to post this.
I'm on Windows 11 26H2 with calibre 9.18.0. epubcheck, kepubverto, and epubvari along with the plugins are all up-to-date. I've attached a scrambled eBook that shows these errors as does the unscrambled version. The original ePub and the scrambled ePub validate with no errors using calibre's error checker. epubcheck, and epubveri. I've run into some major bugs using kepubverto, epubvari, and epubcheck in the calibre editor. When I try to validate the KePub (created with kepubverto) using epubcheck, the editor closes. When I try to validate the KePub using epubveri. I get this totally incorrect output. Code:
ERROR OEBPS/package.opf 53 92 RSC-005: attribute "properties" is not allowed here ERROR OEBPS/cover.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/cover.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/copyright.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/copyright.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/title.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/title.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter01.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter01.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter02.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter02.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter03.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter03.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter04.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter04.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter05.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter05.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter06.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter06.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter07.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter07.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter08.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter08.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter09.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter09.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter10.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter10.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter11.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter11.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter12.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter12.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter13.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter13.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter14.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter14.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter15.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter15.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter16.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter16.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter17.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter17.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter18.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter18.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter19.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter19.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter20.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter20.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter21.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter21.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter22.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter22.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter23.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter23.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter24.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter24.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter25.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter25.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter26.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter26.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter27.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter27.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter28.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/chapter28.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/appendix001.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/appendix001.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/appendix003.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/appendix003.html 9 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/intro.html 8 28 RSC-005: attribute "id" is not allowed here ERROR OEBPS/intro.html 9 28 RSC-005: attribute "id" is not allowed here ADVISORY OEBPS/package.opf 53 1 ADV-010: '../kobo-cover-image-generated-by-calibre.jpeg' is declared in the manifest, but no document draws, applies or loads it (epubcheck does not report this; the verdict is unaffected) Last edited by JSWolf; 11-14-2026 at 10:40 AM. |
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Libra Colour How to sort EPUB and KEPUB on Kobo | raydawson | Kobo Reader | 15 | 01-10-2025 07:33 AM |
| KEPUB and non-breaking space | Vetchy | Kobo Developer's Corner | 33 | 11-13-2024 03:44 PM |
| New Kobo, ePub vs Kepub | Pjama | Kobo Reader | 8 | 04-07-2021 01:26 PM |
| What will happen/I gain if I forced an ePub book to a KePub book? | andsoitgoes | Kobo Reader | 4 | 04-04-2012 05:33 PM |
| Kobo Adobe Epub is a Kepub instead | rashkae | Kobo Reader | 61 | 01-13-2012 07:15 AM |